You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2009/12/18 07:33:50 UTC

svn commit: r892154 - in /apr/apr/trunk/include: apr.h.in apr.hw arch/win32/apr_private.h

Author: wrowe
Date: Fri Dec 18 06:33:49 2009
New Revision: 892154

URL: http://svn.apache.org/viewvc?rev=892154&view=rev
Log:
Further synchronization, hide internals

Modified:
    apr/apr/trunk/include/apr.h.in
    apr/apr/trunk/include/apr.hw
    apr/apr/trunk/include/arch/win32/apr_private.h

Modified: apr/apr/trunk/include/apr.h.in
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr.h.in?rev=892154&r1=892153&r2=892154&view=diff
==============================================================================
--- apr/apr/trunk/include/apr.h.in (original)
+++ apr/apr/trunk/include/apr.h.in Fri Dec 18 06:33:49 2009
@@ -56,7 +56,10 @@
  * means.  In particular it's missing inline and the __attribute__
  * stuff.  So we hack around it.  PR#1613. -djg
  */
-#if !defined(__GNUC__) || __GNUC__ < 2 || \
+#if defined(_MSC_VER)
+#define APR_INLINE __inline
+#define APR_HAS_INLINE		1
+#elif !defined(__GNUC__) || __GNUC__ < 2 || \
     (__GNUC__ == 2 && __GNUC_MINOR__ < 7) ||\
     defined(NEXT)
 #ifndef __attribute__
@@ -115,6 +118,9 @@
  * or the extern "C" namespace 
  */
 
+/* If windows.h was already included, our preferences don't matter.
+ * If not, include a restricted set of windows headers to our tastes.
+ */
 #if APR_HAVE_WINDOWS_H
 #ifndef _WINDOWS_
 

Modified: apr/apr/trunk/include/apr.hw
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr.hw?rev=892154&r1=892153&r2=892154&view=diff
==============================================================================
--- apr/apr/trunk/include/apr.hw (original)
+++ apr/apr/trunk/include/apr.hw Fri Dec 18 06:33:49 2009
@@ -28,7 +28,8 @@
  * apr.hw by the apr.dsp and libapr.dsp projects. 
  */
 
-/* Ignore most warnings (back down to /W3) for poorly constructed headers
+/* Ignore most warnings (back down to /W3) for poorly constructed headers,
+ * excluded from doxygen parsing
  */
 #if defined(_MSC_VER) && _MSC_VER >= 1200
 #pragma warning(push, 3)
@@ -44,7 +45,9 @@
  *   C4244: int to char/short - precision loss
  *   C4514: unreferenced inline function removed
  */
+#if defined(_MSC_VER)
 #pragma warning(disable: 4100 4127 4163 4201 4514; once: 4057 4075 4244)
+#endif
 
 /* Ignore Microsoft's interpretation of secure development
  * and the POSIX string handling API
@@ -76,62 +79,48 @@
  * are platform specific and should NOT be relied upon!</em></strong>
  */
 
+/* So that we can use inline on some critical functions, and use
+ * GNUC attributes (such as to get -Wall warnings for printf-like
+ * functions).  Only do this in gcc 2.7 or later ... it may work
+ * on earlier stuff, but why chance it.
+ *
+ * We've since discovered that the gcc shipped with NeXT systems
+ * as "cc" is completely broken.  It claims to be __GNUC__ and so
+ * on, but it doesn't implement half of the things that __GNUC__
+ * means.  In particular it's missing inline and the __attribute__
+ * stuff.  So we hack around it.  PR#1613. -djg
+ */
+#if defined(_MSC_VER)
 #define APR_INLINE __inline
-#define APR_HAS_INLINE          1
-#if !defined(__GNUC__) && !defined(__attribute__)
+#define APR_HAS_INLINE		1
+#elif !defined(__GNUC__) || __GNUC__ < 2 || \
+    (__GNUC__ == 2 && __GNUC_MINOR__ < 7) ||\
+    defined(NEXT)
+#ifndef __attribute__
 #define __attribute__(__x)
 #endif
+#define APR_INLINE
+#define APR_HAS_INLINE		0
+#else
+#define APR_INLINE __inline__
+#define APR_HAS_INLINE		1
+#endif
 
-#ifndef _WIN32_WCE
-#define APR_HAVE_ARPA_INET_H    0
-#define APR_HAVE_CONIO_H        1
-#define APR_HAVE_CRYPT_H        0
-#define APR_HAVE_CTYPE_H        1
-#define APR_HAVE_DIRENT_H       0
-#define APR_HAVE_ERRNO_H        1
-#define APR_HAVE_FCNTL_H        1
-#define APR_HAVE_IO_H           1
-#define APR_HAVE_LIMITS_H       1
-#define APR_HAVE_NETDB_H        0
-#define APR_HAVE_NETINET_IN_H   0
-#define APR_HAVE_NETINET_SCTP_H 0
-#define APR_HAVE_NETINET_SCTP_UIO_H 0
-#define APR_HAVE_NETINET_TCP_H  0
-#define APR_HAVE_PTHREAD_H      0
-#define APR_HAVE_SEMAPHORE_H    0
-#define APR_HAVE_SIGNAL_H       1
-#define APR_HAVE_STDARG_H       1
-#define APR_HAVE_STDDEF_H       1
-#define APR_HAVE_STDINT_H       0
-#define APR_HAVE_STDIO_H        1
-#define APR_HAVE_STDLIB_H       1
-#define APR_HAVE_STRING_H       1
-#define APR_HAVE_STRINGS_H      0
-#define APR_HAVE_SYS_IOCTL_H    0
-#define APR_HAVE_SYS_SENDFILE_H 0
-#define APR_HAVE_SYS_SIGNAL_H   0
-#define APR_HAVE_SYS_SOCKET_H   0
-#define APR_HAVE_SYS_SOCKIO_H   0
-#define APR_HAVE_SYS_SYSLIMITS_H 0
-#define APR_HAVE_SYS_TIME_H     0
-#define APR_HAVE_SYS_TYPES_H    1
-#define APR_HAVE_SYS_UIO_H      0
-#define APR_HAVE_SYS_UN_H       0
-#define APR_HAVE_SYS_WAIT_H     0
-#define APR_HAVE_TIME_H         1
-#define APR_HAVE_UNISTD_H       0
-#define APR_HAVE_WINDOWS_H      1
-#define APR_HAVE_WINSOCK2_H     1
+#ifdef _WIN32_WCE
+#define APR_NOT_IN_WCE          0
 #else
+#define APR_NOT_IN_WCE          1
+#endif
+
 #define APR_HAVE_ARPA_INET_H    0
-#define APR_HAVE_CONIO_H        0
+#define APR_HAVE_CONIO_H        APR_NOT_IN_WCE
 #define APR_HAVE_CRYPT_H        0
-#define APR_HAVE_CTYPE_H        0
+#define APR_HAVE_CTYPE_H        APR_NOT_IN_WCE
 #define APR_HAVE_DIRENT_H       0
-#define APR_HAVE_ERRNO_H        0
-#define APR_HAVE_FCNTL_H        0
-#define APR_HAVE_IO_H           0
-#define APR_HAVE_LIMITS_H       0
+#define APR_HAVE_ERRNO_H        APR_NOT_IN_WCE
+#define APR_HAVE_FCNTL_H        APR_NOT_IN_WCE
+#define APR_HAVE_IO_H           APR_NOT_IN_WCE
+#define APR_HAVE_LIMITS_H       APR_NOT_IN_WCE
 #define APR_HAVE_NETDB_H        0
 #define APR_HAVE_NETINET_IN_H   0
 #define APR_HAVE_NETINET_SCTP_H 0
@@ -139,9 +128,9 @@
 #define APR_HAVE_NETINET_TCP_H  0
 #define APR_HAVE_PTHREAD_H      0
 #define APR_HAVE_SEMAPHORE_H    0
-#define APR_HAVE_SIGNAL_H       0
-#define APR_HAVE_STDARG_H       0
-#define APR_HAVE_STDDEF_H       0
+#define APR_HAVE_SIGNAL_H       APR_NOT_IN_WCE
+#define APR_HAVE_STDARG_H       APR_NOT_IN_WCE
+#define APR_HAVE_STDDEF_H       APR_NOT_IN_WCE
 #define APR_HAVE_STDINT_H       0
 #define APR_HAVE_STDIO_H        1
 #define APR_HAVE_STDLIB_H       1
@@ -154,15 +143,14 @@
 #define APR_HAVE_SYS_SOCKIO_H   0
 #define APR_HAVE_SYS_SYSLIMITS_H 0
 #define APR_HAVE_SYS_TIME_H     0
-#define APR_HAVE_SYS_TYPES_H    0
+#define APR_HAVE_SYS_TYPES_H    APR_NOT_IN_WCE
 #define APR_HAVE_SYS_UIO_H      0
 #define APR_HAVE_SYS_UN_H       0
 #define APR_HAVE_SYS_WAIT_H     0
-#define APR_HAVE_TIME_H         0
+#define APR_HAVE_TIME_H         APR_NOT_IN_WCE
 #define APR_HAVE_UNISTD_H       0
 #define APR_HAVE_WINDOWS_H      1
-#define APR_HAVE_WINSOCK2_H     0
-#endif
+#define APR_HAVE_WINSOCK2_H     APR_NOT_IN_WCE
 
 /** @} */
 /** @} */
@@ -312,7 +300,9 @@
 #define APR_HAVE_SIGWAIT        0
 #define APR_HAVE_STRCASECMP     0
 #define APR_HAVE_STRDUP         1
+#define APR_HAVE_STRICMP        APR_NOT_IN_WCE
 #define APR_HAVE_STRNCASECMP    0
+#define APR_HAVE_STRNICMP       APR_NOT_IN_WCE
 #define APR_HAVE_STRSTR         1
 #define APR_HAVE_MEMCHR         1
 #define APR_HAVE_STRUCT_RLIMIT  0
@@ -320,17 +310,10 @@
 #define APR_HAVE_SCTP           0
 #define APR_HAVE_IOVEC          0
 
-#ifndef _WIN32_WCE
-#define APR_HAVE_STRICMP        1
-#define APR_HAVE_STRNICMP       1
-#else
-#define APR_HAVE_STRICMP        0
-#define APR_HAVE_STRNICMP       0
-#endif
-
 /*  APR Feature Macros */
 #define APR_HAS_SHARED_MEMORY     1
 #define APR_HAS_THREADS           1
+#define APR_HAS_SENDFILE          APR_NOT_IN_WCE
 #define APR_HAS_MMAP              1
 #define APR_HAS_FORK              0
 #define APR_HAS_RANDOM            1
@@ -339,21 +322,12 @@
 #define APR_HAS_SO_ACCEPTFILTER   0
 #define APR_HAS_UNICODE_FS        1
 #define APR_HAS_PROC_INVOKED      1
+#define APR_HAS_USER              APR_NOT_IN_WCE
+#define APR_HAS_LARGE_FILES       APR_NOT_IN_WCE
+#define APR_HAS_XTHREAD_FILES     APR_NOT_IN_WCE
 #define APR_HAS_OS_UUID           1
 
-#ifndef _WIN32_WCE
-#define APR_HAS_SENDFILE          1
-#define APR_HAS_USER              1
-#define APR_HAS_LARGE_FILES       1
-#define APR_HAS_XTHREAD_FILES     1
-#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 1
-#else
-#define APR_HAS_SENDFILE          0
-#define APR_HAS_USER              0
-#define APR_HAS_LARGE_FILES       0
-#define APR_HAS_XTHREAD_FILES     0
-#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0
-#endif
+#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD  APR_NOT_IN_WCE
 
 /* APR sets APR_FILES_AS_SOCKETS to 1 on systems where it is possible
  * to poll on files/pipes.
@@ -367,7 +341,7 @@
 /* If we have a TCP implementation that can be "corked", what flag
  * do we use?
  */
-#define APR_TCP_NOPUSH_FLAG       @apr_tcp_nopush_flag@
+#xxxdefine APR_TCP_NOPUSH_FLAG       @apr_tcp_nopush_flag@
 
 /* Is the TCP_NODELAY socket option inherited from listening sockets?
  */

Modified: apr/apr/trunk/include/arch/win32/apr_private.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/arch/win32/apr_private.h?rev=892154&r1=892153&r2=892154&view=diff
==============================================================================
--- apr/apr/trunk/include/arch/win32/apr_private.h (original)
+++ apr/apr/trunk/include/arch/win32/apr_private.h Fri Dec 18 06:33:49 2009
@@ -37,6 +37,16 @@
 #define SW_HIDE             0
 #endif
 
+#ifndef STDIN_FILENO
+#define STDIN_FILENO  0
+#endif
+#ifndef STDOUT_FILENO
+#define STDOUT_FILENO 1
+#endif
+#ifndef STDERR_FILENO
+#define STDERR_FILENO 2
+#endif
+
 /* For the misc.h late-loaded dynamic symbols, we need some obscure types 
  * Avoid dragging in wtypes.h unless it's absolutely necessary [generally
  * not with APR itself, until some GUI-related security is introduced.]