aboutsummaryrefslogtreecommitdiffstats log msg author committer range
diff options
 context: 12345678910152025303540 space: includeignore mode: unifiedssdiffstat only
-rw-r--r--CHANGES229
-rw-r--r--CMakeLists.txt4
-rw-r--r--Makefile.in3
-rw-r--r--Makefile.win10
-rw-r--r--NOTICE2
-rw-r--r--NWGNUmakefile1
-rw-r--r--apr.dsp127
-rw-r--r--apr.mak528
-rw-r--r--apr.spec4
-rw-r--r--build-outputs.mk178
-rw-r--r--config.layout1
-rwxr-xr-xconfigure2508
-rw-r--r--configure.in69
-rw-r--r--docs/APRDesign.html10
-rw-r--r--docs/canonical_filenames.html26
-rw-r--r--docs/incomplete_types6
-rw-r--r--docs/pool-design.html4
-rw-r--r--encoding/apr_escape.c71
-rw-r--r--file_io/unix/copy.c1
-rw-r--r--file_io/unix/flock.c8
-rw-r--r--file_io/unix/pipe.c64
-rw-r--r--file_io/unix/seek.c7
-rw-r--r--include/apr.h.in1
-rw-r--r--include/apr.hnw1
-rw-r--r--include/apr.hw42
-rw-r--r--include/apr.hwc40
-rw-r--r--include/apr_allocator.h10
-rw-r--r--include/apr_atomic.h2
-rw-r--r--include/apr_cstr.h292
-rw-r--r--include/apr_errno.h31
-rw-r--r--include/apr_escape.h56
-rw-r--r--include/apr_file_info.h4
-rw-r--r--include/apr_file_io.h34
-rw-r--r--include/apr_general.h25
-rw-r--r--include/apr_global_mutex.h21
-rw-r--r--include/apr_hash.h3
-rw-r--r--include/apr_network_io.h47
-rw-r--r--include/apr_perms_set.h65
-rw-r--r--include/apr_poll.h45
-rw-r--r--include/apr_portable.h47
-rw-r--r--include/apr_proc_mutex.h19
-rw-r--r--include/apr_shm.h21
-rw-r--r--include/apr_skiplist.h126
-rw-r--r--include/apr_strings.h4
-rw-r--r--include/apr_tables.h28
-rw-r--r--include/apr_version.h8
-rw-r--r--include/arch/unix/apr_arch_networkio.h3
-rw-r--r--include/arch/unix/apr_arch_poll_private.h19
-rw-r--r--include/arch/unix/apr_arch_proc_mutex.h26
-rw-r--r--include/arch/unix/apr_arch_shm.h1
-rw-r--r--include/arch/unix/apr_private.h.in24
-rw-r--r--libapr.dsp118
-rw-r--r--libapr.mak526
-rw-r--r--locks/unix/global_mutex.c18
-rw-r--r--locks/unix/proc_mutex.c488
-rw-r--r--memory/unix/apr_pools.c379
-rw-r--r--misc/unix/errorcodes.c2
-rw-r--r--network_io/unix/multicast.c2
-rw-r--r--network_io/unix/sockets.c61
-rw-r--r--network_io/unix/sockopt.c35
-rw-r--r--poll/unix/epoll.c43
-rw-r--r--poll/unix/kqueue.c44
-rw-r--r--poll/unix/poll.c28
-rw-r--r--poll/unix/pollcb.c63
-rw-r--r--poll/unix/pollset.c141
-rw-r--r--poll/unix/port.c105
-rw-r--r--poll/unix/select.c10
-rw-r--r--poll/unix/wakeup.c151
-rw-r--r--poll/unix/z_asio.c19
-rw-r--r--shmem/unix/shm.c51
-rw-r--r--strings/apr_cpystrn.c2
-rw-r--r--strings/apr_cstr.c403
-rw-r--r--strings/apr_fnmatch.c2
-rw-r--r--strings/apr_snprintf.c2
-rw-r--r--tables/apr_skiplist.c211
-rw-r--r--tables/apr_tables.c4
-rw-r--r--time/unix/time.c3
-rw-r--r--tools/gen_test_char.c18
83 files changed, 5000 insertions, 2985 deletions

The current design of APR requires that most APR types be incomplete. It is not possible to write flexible portable code if programs can access the internals of APR types. This is because different platforms are -likely to define different native types. There are only two execptions to+likely to define different native types. There are only two exceptions to this rule:

@@ -227,7 +227,7 @@ file.

For an actual example, look at any file in the include directory. The reason the docs are in the header files is to ensure that the docs always-reflect the current code. If you change paramters or return values for a +reflect the current code. If you change parameters or return values for a function, please be sure to update the documentation.

APR Error reporting

@@ -246,7 +246,7 @@ Unless you are sure, return an ap_status_t.

All platforms return errno values unchanged. Each platform can also have one system error type, which can be returned after an offset is added. -There are five types of error values in APR, each with it's own offset.

+There are five types of error values in APR, each with its own offset.

@@ -277,7 +277,7 @@ There are five types of error values in APR, each with it's own offset.

The difference in naming between APR_OS_START_ERROR and APR_OS_START_STATUS mentioned above allows programmers to easily determine if-the error code indicates an error condition or a status codition.+the error code indicates an error condition or a status condition.

If your function has multiple return codes that all indicate success, but with different results, or if your function can only return PASS/FAIL, you @@ -345,7 +345,7 @@ codes to a common code, and most of the time programs want to just output an error string. If we convert all errors to a common subset, we have four steps to output an error string:

-

The seocnd problem with option 1, is that it is a lossy conversion. For+

The second problem with option 1, is that it is a lossy conversion. For example, Windows and OS/2 have a couple hundred error codes, but POSIX errno only defines about 50 errno values. This means that if we convert to a canonical error value immediately, there is no way for the programmer todiff --git a/docs/canonical_filenames.html b/docs/canonical_filenames.htmlindex 2bd9bdba822b..c1c03b1d5434 100644--- a/docs/canonical_filenames.html+++ b/docs/canonical_filenames.html@@ -8,10 +8,10 @@

APR porters need to address the underlying discrepancies between file systems. To achieve a reasonable degree of security, the program depending upon APR needs to know that two paths may be-compared, and that a mismatch is guarenteed to reflect that the+compared, and that a mismatch is guaranteed to reflect that the two paths do not return the same resource

. -

The first discrepancy is in volume roots. Unix and pure deriviates+

The first discrepancy is in volume roots. Unix and pure derivatives have only one root path, "/". Win32 and OS2 share root paths of the form "D:/", D: is the volume designation. However, this can be specified as "//./D:/" as well, indicating D: volume of the @@ -21,7 +21,7 @@ specified network server. Finally, NetWare root paths are of the form "server/volume:/", or the simpler "volume:/" syntax for 'this' machine. All these non-Unix file systems accept volume:path, without a slash following the colon, as a path relative to the-current working directory, which APR will treat as ambigious, that+current working directory, which APR will treat as ambiguous, that is, neither an absolute nor a relative path per se.

The second discrepancy is in the meaning of the 'this' directory.@@ -39,35 +39,35 @@ It's also critical to simply truncate leading "/../" paths to "/", since the parent of the root is root. This gets tricky on the Win32 and OS2 platforms, since the ".." element is invalid before the "//server/share/" is complete, and the "//server/share/../"-seqence is the complete UNC root "//server/share/". In relative+sequence is the complete UNC root "//server/share/". In relative paths, leading ".." elements are significant, until they are merged with an absolute path. The relative form must only retain the ".." segments as leading segments, to be resolved once merged to another relative or an absolute path.

The fourth discrepancy occurs with acceptance of alternate character-codes for the same element. Path seperators are not retained within+codes for the same element. Path separators are not retained within the APR canonical forms. The OS filesystem and APR (slashed) forms can both be returned as strings, to be used in the proper context. Unix, Win32 and Netware all accept slashes and backslashes as the-same path seperator symbol, although unix strictly accepts slashes.+same path separator symbol, although unix strictly accepts slashes. While the APR form of the name strictly uses slashes, always consider that there could be a platform that actually accepts slashes as a character within a segment name.

-

The fifth and worst discrepancy plauges Win32, OS2, Netware, and some+

The fifth and worst discrepancy plagues Win32, OS2, Netware, and some filesystems mounted in Unix. Case insensitivity can permit the same file to slip through in both it's proper case and alternate cases. Simply changing the case is insufficient for any character set beyond-ASCII, since various dilectic forms of characters suffer from one to+ASCII, since various dialectic forms of characters suffer from one to many or many to one translations. An example would be u-umlaut, which might be accepted as a single character u-umlaut, a two character sequence u and the zero-width umlaut, the upper case form of the same,-or perhaps even a captial U alone. This can be handled in different+or perhaps even a capital U alone. This can be handled in different ways depending on the purposes of the APR based program, but the one requirement is that the path must be absolute in order to resolve these ambiguities. Methods employed include comparison of device and inode-file uniqifiers, which is a fairly fast operation, or quering the OS+file uniqifiers, which is a fairly fast operation, or querying the OS for the true form of the name, which can be much slower. Only the acknowledgement of the file names by the OS can validate the equality of two different cases of the same filename.

@@ -76,7 +76,7 @@ of two different cases of the same filename.

significant in non-unix file systems. Trailing periods are accepted but never stored, therefore trailing periods must be ignored for any form of comparison. And all OS's have certain expectations of what-characters are illegal (or undesireable due to confusion.)

+characters are illegal (or undesirable due to confusion.)

A final warning, canonical functions don't transform or resolve case or character ambiguity issues until they are resolved into an absolute@@ -111,10 +111,10 @@ system to return the proper form of the name.

In any case, returning the char* path, with a flag to request the proper case, forces the OS calls to resolve the true names of each segment. Where-there is a penality for this operation and the stat device and inode test+there is a penalty for this operation and the stat device and inode test is faster, case correction is postponed until the char* result is requested. On platforms that identify the inode, device, or proper name interchangably-with no penalities, this may occur when the name is initially processed.

+with no penalties, this may occur when the name is initially processed.

diff --git a/docs/incomplete_types b/docs/incomplete_typesindex cbed7774232d..08b0c0a522e3 100644--- a/docs/incomplete_types+++ b/docs/incomplete_types@@ -38,7 +38,7 @@ typedef struct ap_file_t { #endif } ap_file_t; -This captures the essense of what is currently being defined for ap_file_t+This captures the essence of what is currently being defined for ap_file_t using incomplete types. However, using this structure leads developers to believe that they are safe accessing any of the fields in this structure. This is not true. On some platforms, such as Windows, about half of the@@ -53,7 +53,7 @@ macros, for example: #define filetype int #endif -And then in the defintion for ap_file_t, we could say:+And then in the definition for ap_file_t, we could say: filetype filedes; This gets rid of some of the complexity, by moving it off to the side, but@@ -73,7 +73,7 @@ Having said all of that, sometimes incomplete types just don't make sense. For example, the first implementation of time functions used incomplete types, which added a layer of complexity that turned out to be unnecessary. If a platform cannot provide a simple number that represents the number of seconds-elapsed since a specifed date and time, then APR doesn't really want to +elapsed since a specified date and time, then APR doesn't really want to provide support for that platform. APR is trying hard to provide a balance of incomplete and complete types, diff --git a/docs/pool-design.html b/docs/pool-design.htmlindex 90d845257c1a..46b63d62b2b2 100644--- a/docs/pool-design.html+++ b/docs/pool-design.html@@ -3,10 +3,6 @@ Using APR Pools -
- Last modified at [\$Date: 2004-11-24 17:51:51 -0500 (Wed, 24 Nov 2004) \$]-
-

Using APR Pools