You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2015/10/09 14:58:14 UTC

svn commit: r1707712 - in /apr/apr/branches/1.6.x/include: apr.hw apr.hwc

Author: trawick
Date: Fri Oct  9 12:58:14 2015
New Revision: 1707712

URL: http://svn.apache.org/viewvc?rev=1707712&view=rev
Log:
modest apr.h improvements for Windows, from various trunk commits

* Ignore certain warnings with MSVC.
* Align whitespace and improve some comments
* Conditionally include additional header files as on Unix (none of these
  will be included without modifying defines)

Also, the cmake build for Windows now defines APR_HAVE_SOCKADDR_UN.

PR: this is tiny help for 58476

Modified:
    apr/apr/branches/1.6.x/include/apr.hw
    apr/apr/branches/1.6.x/include/apr.hwc

Modified: apr/apr/branches/1.6.x/include/apr.hw
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.6.x/include/apr.hw?rev=1707712&r1=1707711&r2=1707712&view=diff
==============================================================================
--- apr/apr/branches/1.6.x/include/apr.hw (original)
+++ apr/apr/branches/1.6.x/include/apr.hw Fri Oct  9 12:58:14 2015
@@ -25,7 +25,7 @@
  * And please, make an effort to stub apr.hnw and apr.h.in in the process.
  *
  * This is the Win32 specific version of apr.h.  It is copied from
- * apr.hw by the apr.dsp and libapr.dsp projects. 
+ * apr.hw by the apr.dsp and libapr.dsp projects.
  */
 
 /**
@@ -60,7 +60,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
@@ -212,25 +214,42 @@
 /** @} */
 /** @} */
 
-/* We don't include our conditional headers within the doxyblocks 
- * or the extern "C" namespace 
+/* We don't include our conditional headers within the doxyblocks
+ * or the extern "C" namespace
  */
 
 #if APR_HAVE_STDLIB_H
 #include <stdlib.h>
 #endif
+
 #if APR_HAVE_STDIO_H
 #include <stdio.h>
 #endif
+
 #if APR_HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
+
 #if APR_HAVE_STDDEF_H
 #include <stddef.h>
 #endif
+
+#if APR_HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
+#if APR_HAVE_STDINT_H
+#include <stdint.h>
+#endif
+
+#if APR_HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+
 #if APR_HAVE_TIME_H
 #include <time.h>
 #endif
+
 #if APR_HAVE_PROCESS_H
 #include <process.h>
 #endif
@@ -261,12 +280,12 @@ extern "C" {
 #define APR_USE_SHMEM_MMAP_ANON    0
 #define APR_USE_SHMEM_BEOS         0
 
-#define APR_USE_FLOCK_SERIALIZE           0 
+#define APR_USE_FLOCK_SERIALIZE           0
 #define APR_USE_POSIXSEM_SERIALIZE        0
 #define APR_USE_SYSVSEM_SERIALIZE         0
 #define APR_USE_FCNTL_SERIALIZE           0
-#define APR_USE_PROC_PTHREAD_SERIALIZE    0 
-#define APR_USE_PTHREAD_SERIALIZE         0 
+#define APR_USE_PROC_PTHREAD_SERIALIZE    0
+#define APR_USE_PTHREAD_SERIALIZE         0
 
 #define APR_HAS_FLOCK_SERIALIZE           0
 #define APR_HAS_SYSVSEM_SERIALIZE         0
@@ -355,7 +374,7 @@ extern "C" {
 
 /* Is the O_NONBLOCK flag inherited from listening sockets?
  */
-#define APR_O_NONBLOCK_INHERITED  1
+#define APR_O_NONBLOCK_INHERITED 1
 
 /* Typedefs that APR needs. */
 
@@ -627,18 +646,20 @@ typedef  int         gid_t;
      && (*(const apr_uint32_t *)(const void *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff)))
 #endif
 
-#endif /* APR_HAS_IPV6 */
+#endif /* APR_HAVE_IPV6 */
 
 #ifdef __cplusplus
 }
 #endif
 
-/* Done with badly written headers
+/* Done with badly written headers, leave 'deprecated CRT' undeprecated
  */
 #if defined(_MSC_VER) && _MSC_VER >= 1200
 #pragma warning(pop)
+#if _MSC_VER >= 1400
 #pragma warning(disable: 4996)
 #endif
+#endif
 
 #endif /* WIN32 */
 

Modified: apr/apr/branches/1.6.x/include/apr.hwc
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.6.x/include/apr.hwc?rev=1707712&r1=1707711&r2=1707712&view=diff
==============================================================================
--- apr/apr/branches/1.6.x/include/apr.hwc (original)
+++ apr/apr/branches/1.6.x/include/apr.hwc Fri Oct  9 12:58:14 2015
@@ -25,7 +25,7 @@
  * And please, make an effort to stub apr.hnw and apr.h.in in the process.
  *
  * This is the Win32 specific version of apr.h.  It is copied from
- * apr.hw by the apr.dsp and libapr.dsp projects. 
+ * apr.hw by the apr.dsp and libapr.dsp projects.
  */
 
 /**
@@ -60,7 +60,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
@@ -209,25 +211,42 @@
 /** @} */
 /** @} */
 
-/* We don't include our conditional headers within the doxyblocks 
- * or the extern "C" namespace 
+/* We don't include our conditional headers within the doxyblocks
+ * or the extern "C" namespace
  */
 
 #if APR_HAVE_STDLIB_H
 #include <stdlib.h>
 #endif
+
 #if APR_HAVE_STDIO_H
 #include <stdio.h>
 #endif
+
 #if APR_HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
+
 #if APR_HAVE_STDDEF_H
 #include <stddef.h>
 #endif
+
+#if APR_HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
+#if APR_HAVE_STDINT_H
+#include <stdint.h>
+#endif
+
+#if APR_HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+
 #if APR_HAVE_TIME_H
 #include <time.h>
 #endif
+
 #if APR_HAVE_PROCESS_H
 #include <process.h>
 #endif
@@ -258,12 +277,12 @@ extern "C" {
 #define APR_USE_SHMEM_MMAP_ANON    0
 #define APR_USE_SHMEM_BEOS         0
 
-#define APR_USE_FLOCK_SERIALIZE           0 
+#define APR_USE_FLOCK_SERIALIZE           0
 #define APR_USE_POSIXSEM_SERIALIZE        0
 #define APR_USE_SYSVSEM_SERIALIZE         0
 #define APR_USE_FCNTL_SERIALIZE           0
-#define APR_USE_PROC_PTHREAD_SERIALIZE    0 
-#define APR_USE_PTHREAD_SERIALIZE         0 
+#define APR_USE_PROC_PTHREAD_SERIALIZE    0
+#define APR_USE_PTHREAD_SERIALIZE         0
 
 #define APR_HAS_FLOCK_SERIALIZE           0
 #define APR_HAS_SYSVSEM_SERIALIZE         0
@@ -280,6 +299,7 @@ extern "C" {
 #define APR_HAVE_INET_ADDR      1
 #define APR_HAVE_INET_NETWORK   0
 #define APR_HAVE_IPV6           @apr_have_ipv6_10@
+#define APR_HAVE_SOCKADDR_UN    0
 #define APR_HAVE_MEMMOVE        1
 #define APR_HAVE_SETRLIMIT      0
 #define APR_HAVE_SIGACTION      0
@@ -351,7 +371,7 @@ extern "C" {
 
 /* Is the O_NONBLOCK flag inherited from listening sockets?
  */
-#define APR_O_NONBLOCK_INHERITED  1
+#define APR_O_NONBLOCK_INHERITED 1
 
 /* Typedefs that APR needs. */
 
@@ -623,18 +643,20 @@ typedef  int         gid_t;
      && (*(const apr_uint32_t *)(const void *)(&(a)->s6_addr[8]) == ntohl(0x0000ffff)))
 #endif
 
-#endif /* APR_HAS_IPV6 */
+#endif /* APR_HAVE_IPV6 */
 
 #ifdef __cplusplus
 }
 #endif
 
-/* Done with badly written headers
+/* Done with badly written headers, leave 'deprecated CRT' undeprecated
  */
 #if defined(_MSC_VER) && _MSC_VER >= 1200
 #pragma warning(pop)
+#if _MSC_VER >= 1400
 #pragma warning(disable: 4996)
 #endif
+#endif
 
 #endif /* WIN32 */