Changes with APR b1 *) Introduce apr_get_userid to return a named user's apr_uid_t and apr_gid_t across platforms [Cliff Woolley, William Rowe] *) In apr_shm_init(), check the retcode from mm_malloc(). Previously, we segfaulted here if mm_malloc() failed to get a lock. An example error scenario is when the lock file lives on a filesystem which doesn't support locking. [Jeff Trawick] *) Name protected the autoconf macros defined by APR. Moved the REENTRANCY_FLAGS settings into apr_hints.m4. Inlined the APR_PREPARE_MM_DIR macro because it could only be used once. Removed the unused macros MY_TRY_RUN, MY_TRY_RUN_NATIVE, and AC_USE_FUNCTION. Added some macro comments. [Roy Fielding] *) Cope with BSDi installations where the default make has been replaced with GNU make. [Joe Orton ] *) Changed apr/helpers to apr/build to be consistent with other Apache source trees. Added make variables to rules.mk.in that point to the builders directory and its scripts. Updated buildconf, configure.in, and Makefile.in files to create and use the new scripts. Moved scandoc to scandoc.pl and its default.pl template to scandoc_template.pl. [Roy Fielding] *) Updated config.guess and config.sub to GNU libtool 1.3.5 features, with the Apache additions for OS/390 and OS/2 emx. [Roy Fielding] *) Moved hints.m4, apr_common.m4, and helpers/apr-conf.m4 into the new build directory as apr_hints.m4, apr_common.m4, apr_network.m4, and apr_threads.m4. [Roy Fielding] *) Get apr_sendfile() working on HP-UX. This gets APR to build on HP-UX without having to turn off APR_HAS_SENDFILE. [Jeff Trawick] *) Force FreeBSD to compile without threads by default. To enable threads, use --enable-threads on the configure line. [Ryan Bloom] *) Purge system password buffer before returning from apr_password_get. No longer abuses bufsize argument on return. [William Rowe] *) Moved the prototypes for apr_snprintf and apr_vsnprintf to the apr_strings.h header, from apr_lib.h. This location makes more sense. [Ryan Bloom] *) Added the APR_TRY_COMPILE_NO_WARNING configure macro for testing a compile with -Werror as well as the APR_CHECK_ICONV_INBUF macro to test for annoying iconv prototype differences. [Jeff Trawick, Roy Fielding] *) Fix a problem with configure on NetBSD. We must include sys/types.h for some platforms. [jun-ichiro hagino ] *) Some fixes in the Win32 time support. (IsLeapYear): New macro for quickly figgerin' out if a given year is a leap year. (SystemTimeToAprExpTime): Perform the calculation of tm_yday. Also, negate the sign of the tm_gmtoff field to be consistent with Unix platforms and APR header file comments. [Mike Pilato] *) Implement WinNT Unix'ish permissions. [William Rowe] *) Corrected an OS2'ism of apr_get_home_directory. OS2 now returns the proper directory, including the user's name. *) Removed private os2errno.h and integrated the OS2 network error codes into apr_errno.h for optimized error tests (APR_STATUS_IS_EFOO(rv)). [William Rowe] *) Moved inclusion of header from multiple modules into apr.h [William Rowe] *) Added apr_compare_users() and apr_compare_groups() for more complex apr_uid_t and apr_gid_t structures. Enabled both .user and .group results from WinNT/2000 stat/getfileinfo, but expect to find that .group is 'None' in most cases. [William Rowe] *) Replace configure --with-optim option by using the environment variable OPTIM instead. This is needed because configure options do not support multiple flags separated by spaces. [Roy Fielding] *) Eliminate the APR_SIG* aliases for standard signal names, since they serve no useful purpose. [Roy Fielding] *) Abstracted apr_get_username and apr_get_groupname for unix and win32. Modified Win32 apr_uid_t and apr_gid_t to use PSIDs, and elimintated the uid_t and gid_t definitions. [William Rowe] *) Radically refactored apr_stat/lstat/getfileinfo/dir_read for Win32 to assure we are retrieving what we expect to retrieve, and reporting the correct result (APR_SUCCESS or APR_INCOMPLETE). The potential for a bit more optimization still remains. [William Rowe] *) While we have the future opportunity to cache the apr_stat'ed file handle for a very fast open (dup handle) on Win32, patched to close that file after a stat always. Needs a new semantic before we leave handles dangling when the user intends to rm. [William Rowe] *) Correct Win32 apr_stat/lstat/getfileinfo/dir_read to all zero out the finfo buffer on success (or incomplete success). [William Rowe] *) Fix Win32/Unix apr_lstat to throw the .valid bit APR_FINFO_LINK to indicate we attempted to open the link. Only the .filetype APR_LNK reflects if the file found was, in fact, a link. [William Rowe] *) Fixed apr_open and apr_rename to function on Win9x. [Mike Pilato ] *) Add apr_open_stdout. This mirrors apr_open_stderr, except it works on stdout. [cmpilato@collab.net] *) Fix bug in file_io/unix/dir.c. There is no such thing as a dirent, it must be a struct dirent. [Kevin Pilch-Bisson ] *) Fix the configure script so that we can build from a different directory. [Kevin Pilch-Bisson ] *) Introduce the wanted flag argument to the apr_stat/lstat/getfileinfo family of functions. This change allows the user to determine what platform-specific file information is retrieved, to optimize both portability and performance. [William Rowe] *) Fix make depend. [Ryan Bloom] *) All dso implementations now register a cleanup to unload the DSO when it is loaded. If the pool is removed, we really do need to remove the DSO. In the past, different platforms behaved differently it this respect. [Ryan Bloom] *) Add linkage declarations to the DSO code. [Gregory Nicholls ] *) Some adjustment of hints.m4 setting flags (used to check if null first) and added some verbosity. [Jim Jagielski] *) Specify APR_DECLARE to some of the APR functions. This helps linking on some operating systems. [Gregory Nicholls ] *) Libtool'ized APR and converted all the makefiles to share rules from helpers/rules.mk. [Greg Stein] *) Remove a warning on FreeBSD. FreeBSD defines TCP_NO_PUSH, but we don't actually use it. This causes os_cork to be defined but not used. This patch keeps us from defining os_cork and os_uncork on FreeBSD. [Ryan Bloom] *) Keep apr_terminate from seg faulting on terminate. This is happening on systems that do not NULL out locks when they are destroyed. To keep this from happening, we set the locks to NULL after destroying them in apr_terminate, and we have to check for NULL in free_blocks. [Allan Edwards and Gregory Nicholls ] *) Remove the ability to allocate memory out of a NULL pool. [Ryan Bloom] *) Add an APR_GET_POOL macro to get a pool from any APR type that has a pool. This requires that ALL apr types put the pool as the first field in their structure. [Ryan Bloom] *) Begin to remove the ability to allocate out of NULL pools. The first problem to solve, is that we need an apr_lock in order to allocate pools, so that we can lock things out when allocating. So, how do we allocate locks without a pool to allocate from? The answer is to create a global_apr_pool, which is a bootstrapping pool. There should NEVER be a sub-pool off this pool, and it is static to an APR file. This is only used to allow us to allocate the locks cleanly, without using the NULL pool hack. [Ryan Bloom] *) Fix a logic error in the poll code when implemented using select. [Nick Caruso ] *) FreeBSD does not support sendfile() in combination with threads before version 4.2. We no longer even try to support it. [Ryan Bloom] *) On FreeBSD, it is possible for the first call to sendfile to get EAGAIN, but still send some data. This means that we cannot call sendfile and then check for EAGAIN, and then wait and call sendfile again. If we do that, then we are likely to send the first chunk of data twice, once in the first call and once in the second. If we are using a timed write, then we check to make sure we can send data before trying to send it. [Ryan Bloom] *) Cleanup to help Apache support programs build cleanly. [Cliff Woolley ] *) Cleanup some compiler warnings on Solaris [Dale Ghent ] *) apr_getaddrinfo() can now return multiple addresses for a host via the next field in apr_sockaddr_t. [Jeff Trawick] *) Tighten up the check for getaddrinfo(). If it can't figure out the appropriate address family for 127.0.0.1, it fails. Unfortunately, Tru64 fails this test so we won't do IPv6 on Tru64. [Jeff Trawick] *) Rename apr_opendir to apr_dir_open. [Ryan Bloom] *) apr_snprintf()'s %pI format string now takes apr_sockaddr_t * instead of sockaddr_in *. [Jeff Trawick] *) Fix a bug in apr_accept() for Win32 and Unix where the local apr_sockaddr_t in the new connected socket was not initialized properly. This could result in a bad string for apr_get_ipaddr(), among other things. [Jeff Trawick] *) Add apr_getnameinfo(), a replacement for apr_get_hostname() which supports IPv6 and will be friendlier for use with eventual SOCK_DGRAM support. apr_get_hostname() is gone. [Jeff Trawick] Changes with APR a9 *) Removed the iconv implementation from the i18n/unix/iconv branch. This now resides in the apr-iconv repository, and will be ported over time to use native apr types (e.g. apr_dso) for portability. *) Only support IPv6 if we have sockaddr_in and a working getaddrinfo(). [Jeff Trawick] *) Add apr_parse_addr_port() for parsing the hostname:port portion of URLs and similar strings. [Jeff Trawick] *) Add Win32 MMAP support [William Rowe] *) Allow the APR programmer to specify if the MMAP is read-only or write-able. [Ryan Bloom and Will Rowe] *) Check more carefully for getaddrinfo(). Accept those that require to be included (e.g., Tru64). Reject those that fail a very basic operational test (e.g., AIX). [Jeff Trawick] *) Add apr_make_os_sock() for constructing a fully-capable APR socket. [Jeff Trawick] *) Make APR's shared memory routines always allocate enough memory for the requested segment, the MM internal types, and the APR internal types. [Ryan Bloom] *) Add APR_SIZE_T_FMT. Get the other APR_xx_T_FMT variables defined properly on AIX. [Jeff Trawick] *) network API changes: get rid of apr_get_socket_inaddr(), apr_get_remote_name(), and apr_get_local_name() [Jeff Trawick] *) Add a step at configure time to create a file at the top-level, apr.exports, which lists every function exported by APR. The file is generated by a script in helpers, that reads each header file. [Ryan Bloom] *) Lock config changes: Detect SysV sem capability by the presence of sempaphore functions, not by the presence of union semun. New config variable apr_lock_method can override autodetection of the apr_lock implementation method. For now, hints.m4 uses it to select SysV semaphores for OS/390. New config variable apr_process_lock_is_global specifies that the selected inter-process lock method is sufficient for APR_LOCKALL (i.e., it blocks all threads and processes). For now, hints.m4 turns on this flag for OS/390. [Jeff Trawick] *) Get APR_OFF_T_FMT defined properly on Solaris Sparc. [Jeff Trawick] Changes with APR a8 *) Change the name of the sa_len field in apr_sockaddr_t to salen. Some platforms have a macro named sa_len. [Tony Finch] *) apr_set_port(), apr_get_port(), apr_set_ipaddr(), and apr_get_ipaddr() now take apr_sockaddr_t as a parameter instead of apr_socket_t + apr_interface_e. This will allow the same routines to be used with datagram APIs to be added later. Note that code which calls apr_set_ipaddr() should probably be changed to call apr_getaddrinfo() for protocol independence. [Jeff Trawick] *) apr_create_tcp_socket() has been removed. Use apr_create_socket() instead. [Jeff Trawick] *) Source was moved from the apache-2.0 repository. For all CHANGES prior to this time, please see the apache-2.0 repository