]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Use uniform wrapping for unistd.h, and don't include it if it's aready included via...
authorMartin Kraemer <martin@apache.org>
Wed, 22 Aug 2001 15:40:29 +0000 (15:40 +0000)
committerMartin Kraemer <martin@apache.org>
Wed, 22 Aug 2001 15:40:29 +0000 (15:40 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/ssl@90491 13f79535-47bb-0310-9956-ffa450edef68

mod_ssl.h
ssl_expr_scan.c

index c3afa4e34956500aaa0a8f27e224a09b10981067..83b5d42afa0f7713260b091191024e9ff1b3fbeb 100644 (file)
--- a/mod_ssl.h
+++ b/mod_ssl.h
@@ -97,9 +97,6 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <time.h>
-#if APR_HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
 /* XXX: these better go away */
 #include <assert.h>
 
 #include "ssl_util_ssl.h"
 #include "ssl_util_table.h"
 
+/* The #ifdef macros are only defined AFTER including the above
+ * therefore we cannot include these system files at the top  :-(
+ */
+#if APR_HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#if APR_HAVE_UNISTD_H
+#include <unistd.h> /* needed for STDIN_FILENO et.al., at least on FreeBSD */
+#endif
+
 /*
  * Provide reasonable default for some defines
  */
index a2f29924e31935854fdebf767659d9e09a9deaa7..ddfa2fd5a895a9ab7f4c9df23831f1ce425eaf0f 100644 (file)
@@ -38,7 +38,6 @@
 #ifdef __cplusplus
 
 #include <stdlib.h>
-#include <unistd.h>
 
 /* Use prototypes in function declarations. */
 #define YY_USE_PROTOS