summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2002-01-28 19:34:10 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2002-01-28 19:34:10 +0000
commit9da220b48ecf3876d7a185a9de52ffca0ae828e8 (patch)
tree2f6225473b042d9d3f794647d19aef283d452937
parenta577de0569e027dbfba6c9eafaaca3a759855020 (diff)
downloadlibapr-9da220b48ecf3876d7a185a9de52ffca0ae828e8.tar.gz
Some changes proposed by Mladen Turk <mturk@mappingsoft.com> that simplify
the Windows CE port, this patch does little, on it's own, other than to respect the APR_HAVE_FOO_H headers we already defined. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62838 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--include/apr.hw110
1 files changed, 56 insertions, 54 deletions
diff --git a/include/apr.hw b/include/apr.hw
index 5de59ccf3..ed68bbc97 100644
--- a/include/apr.hw
+++ b/include/apr.hw
@@ -65,7 +65,6 @@
* @{
*/
-
#ifdef WIN32
#ifndef APR_H
#define APR_H
@@ -76,59 +75,6 @@
#pragma warning(push, 3)
#endif
-/* 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.
- */
-#ifndef _WINDOWS_
-#ifndef WIN32_LEAN_AND_MEAN
-#define WIN32_LEAN_AND_MEAN
-#endif
-#ifndef _WIN32_WINNT
-
-/* 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
- */
-#define SW_HIDE 0
-#include <winsock2.h>
-#include <mswsock.h>
-#endif /* !_WINDOWS_ */
-
-#include <sys/types.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <process.h>
-#include <stdlib.h>
-
-/* Done with badly written headers
- */
-#if defined(_MSC_VER) && _MSC_VER >= 1200
-#pragma warning(pop)
-#endif
-
/* disable or reduce the frequency of...
* C4057: indirection to slightly different base types
* C4075: slight indirection changes (unsigned short* vs short[])
@@ -220,10 +166,60 @@
#define APR_HAVE_UNION_SEMUN 0
+/* 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.
+ */
+#ifndef _WINDOWS_
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+#ifndef _WIN32_WINNT
+
+/* 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
+ */
+#define SW_HIDE 0
+#include <winsock2.h>
+#include <mswsock.h>
+#endif /* !_WINDOWS_ */
+
+#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
+#include <stddef.h>
+#include <time.h>
+#include <process.h>
+
/* APR Feature Macros */
#define APR_HAS_SHARED_MEMORY 1
#define APR_HAS_THREADS 1
@@ -366,6 +362,12 @@ struct iovec {
#define APR_PATH_MAX MAX_PATH
#endif
+/* Done with badly written headers
+ */
+#if defined(_MSC_VER) && _MSC_VER >= 1200
+#pragma warning(pop)
+#endif
+
#endif /* APR_H */
#endif /* WIN32 */
/** @} */