summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2001-04-12 13:51:44 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2001-04-12 13:51:44 +0000
commit48c9fdba46265b23e5d96f7636189e53674ab47f (patch)
tree0073fd3c49389f61029e8a6a45931c668fd87673 /include
parent357cfda4a6b2e10667be91bf19a1710bf89d571d (diff)
downloadlibapr-48c9fdba46265b23e5d96f7636189e53674ab47f.tar.gz
Include windows headers in apr.h (.hw) and include apr.h within
apr_private.h for consistency. Also provide exceptions for many common errors when compiling /W4. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61511 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r--include/apr.hw12
-rw-r--r--include/arch/win32/apr_private.h36
2 files changed, 17 insertions, 31 deletions
diff --git a/include/apr.hw b/include/apr.hw
index 9fa0043b7..70e1c3466 100644
--- a/include/apr.hw
+++ b/include/apr.hw
@@ -97,6 +97,7 @@
* winsock headers were excluded by WIN32_LEAN_AND_MEAN, so include them now
*/
#define SW_HIDE 0
+#include <wtypes.h>
#include <winsock2.h>
#include <mswsock.h>
#endif /* !_WINDOWS_ */
@@ -108,6 +109,17 @@
#include <process.h>
#include <stdlib.h>
+/* disable or reduce the frequency of...
+ * C4057: indirection to slightly different base types
+ * C4075: slight indirection changes (unsigned short* vs short[])
+ * C4100: unreferenced formal parameter
+ * C4127: conditional expression is constant
+ * C4201: nonstandard extension nameless struct/unions
+ * C4244: int to char/short - precision loss
+ *
+ */
+#pragma warning(disable: 4100 4127 4201; once: 4057 4075 4244)
+
#define APR_INLINE __inline
#define APR_HAS_INLINE 1
#define __attribute__(__x)
diff --git a/include/arch/win32/apr_private.h b/include/arch/win32/apr_private.h
index d2cbc8ded..8fc85510a 100644
--- a/include/arch/win32/apr_private.h
+++ b/include/arch/win32/apr_private.h
@@ -63,45 +63,19 @@
#ifndef APR_PRIVATE_H
#define APR_PRIVATE_H
-/* Has windows.h already been included? If so, our preferences don't matter,
- * but we will still need the winsock things no matter what was included.
- * If not, include a restricted set of windows headers to our tastes.
+/* Include the public APR symbols, include our idea of the 'right'
+ * subset of the Windows.h header. This saves us repetition.
*/
-#ifndef _WINDOWS_
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#ifndef _WIN32_WINNT
+#include "apr.h"
-/* Restrict the server to a subset of Windows NT 4.0 header files by default
- */
-#define _WIN32_WINNT 0x0400
-#endif
-#ifndef NOUSER
-#define NOUSER
-#endif
-#ifndef NOGDI
-#define NOGDI
-#endif
-#ifndef NONLS
-#define NONLS
-#endif
-#ifndef NOMCX
-#define NOMCX
-#endif
-#ifndef NOIME
-#define NOIME
-#endif
-#include <windows.h>
/*
* Add a _very_few_ declarations missing from the restricted set of headers
* (If this list becomes extensive, re-enable the required headers above!)
* winsock headers were excluded by WIN32_LEAN_AND_MEAN, so include them now
*/
+#ifndef SW_HIDE
#define SW_HIDE 0
-#include <winsock2.h>
-#include <mswsock.h>
-#endif /* !_WINDOWS_ */
+#endif
#include <sys/types.h>
#include <stddef.h>