1) possible future binary compatibility concern
apr_proc_t has this optional field which could be always defined in case other platforms want to implement it later without breaking binary compatibility
#if APR_HAS_PROC_INVOKED || defined(DOXYGEN) /** Diagnositics/debugging string of the command invoked for * this process [only present if APR_HAS_PROC_INVOKED is true] * @remark Only enabled on Win32 by default. * @bug This should either always or never be present in release * builds - since it breaks binary compatibility. We may enable * it always in APR 1.0 yet leave it undefined in most cases. */ char *invoked; #endif
2) places where we define symbols normally defined by the system or other applications/libraries (not in our namespace)
potentially we can clash with application or other libraries which try to make similar compensation; generally when some feature foo isn't available everywhere we create apr_foo feature to stand in its place, and implement apr_foo based on system foo or our own logic as appropriate
apr_signal.h defines SIG_DFL, SIG_IGN, and SIG_ERR under some circumstances
apr_network_io.h defines struct in_addr
apr.h on Unix can define WEXITSTATUS and WTERMSIG; why not private if we really need it??
apr_general.h defines TRUE and FALSE (water under the bridge I suppose)
apr_general.h and code in apr makes sure there is strcasecmp() and strncasecmp() and memcpy() and memchr() (water under the bridge I suppose)
apr.hw defines /* XXX These simply don't belong here, perhaps in apr_portable.h * based on some APR_HAVE_PID/GID/UID? */ typedef int pid_t; (water under the bridge I suppose) typedef int uid_t; <- not part of our API, is it? typedef int gid_t; <- not part of our API, is it?
apr.hw has this stuff too:
/* Appears in later flavors, not the originals. */ #ifndef in_addr6 #define in6_addr in_addr6 #endif
#ifndef WS2TCPIP_INLINE <- WTH??
6:09 PM 11/16/2003#define IN6_IS_ADDR_V4MAPPED(a) \
( (*(const apr_uint64_t *)(const void *)(&(a)->s6_addr[0]) == 0) \
&& (*(const apr_uint32_t *)(const void *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff)))
#endif
/* Nasty Win32 .h ommissions we really need */ #define STDIN_FILENO 0 <- can this stuff be moved to private .h? #define STDOUT_FILENO 1 <- what code on Win32 uses this anyway #define STDERR_FILENO 2 <- can't we just yank it?
apr.hnw has #define READDIR_IS_THREAD_SAFE 1 <- I guess Netware uses <- file_io/unix/dir.c which uses this? <- move to private .h?
#define ENUM_BITFIELD(e,n,w) signed int n : w <- not referenced anywhere?
3) other symbols not in our namespace
apr_lib.h defines HUGE_STRING_LEN