Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 95064 invoked from network); 13 Jun 2004 15:35:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 13 Jun 2004 15:35:20 -0000 Received: (qmail 64042 invoked by uid 500); 13 Jun 2004 15:35:17 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 64012 invoked by uid 500); 13 Jun 2004 15:35:17 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 63998 invoked by uid 99); 13 Jun 2004 15:35:17 -0000 Message-ID: <40CC73B8.9070902@attglobal.net> Date: Sun, 13 Jun 2004 11:33:12 -0400 From: Jeff Trawick User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.6) Gecko/20040117 X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@apr.apache.org Subject: minor API issues Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Symantec AntiVirus Scan Engine X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N some look like easy cleanups for platform folks to look at more closely; others are just accepted incompatibilities with our general philosophy (e.g., instead of defining apr_strcasecmp() we ensure that Unix-ish strcasecmp() is available everywhere) 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