]> granicus.if.org Git - apache/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@90491 13f79535-47bb-0310-9956-ffa450edef68

modules/aaa/mod_auth_ldap.c
modules/ldap/util_ldap.c
modules/ssl/mod_ssl.h
modules/ssl/ssl_expr_scan.c
server/mpm/worker/fdqueue.h
support/suexec.c

index 0beeda8c89dc373a76914f4bc129bb5ae8820ce4..c23cffcd9b153b6e89a391f7eb101c139ab10ac2 100644 (file)
  * Copyright 1999-2001 Dave Carrigan
  */
 
-/* for getpid() */
-#include <unistd.h>
-
 #include <apr_ldap.h>
 #include <apr_strings.h>
 
 #include "ap_config.h"
+#if APR_HAVE_UNISTD_H
+/* for getpid() */
+#include <unistd.h>
+#endif
 #include "httpd.h"
 #include "http_config.h"
 #include "http_core.h"
index 5f3387a6ba2b5ad055a956d23799756175880f4f..433ea097e3670d6c0e0acc373e548fa7bb63bd5d 100644 (file)
@@ -77,7 +77,9 @@
 #include "util_ldap.h"
 #include "util_ldap_cache.h"
 
+#if APR_HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 
 module AP_MODULE_DECLARE_DATA ldap_module;
 
index c3afa4e34956500aaa0a8f27e224a09b10981067..83b5d42afa0f7713260b091191024e9ff1b3fbeb 100644 (file)
@@ -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
index a253bbfb287ac90cfab6f8c1445afeb874b80532..c59ea254ebc8dced99d2426f1f0bdb561ffef0cc 100644 (file)
@@ -60,7 +60,9 @@
 #define FDQUEUE_H
 #include "httpd.h"
 #include <stdlib.h>
+#if APR_HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <pthread.h>
 #include <sys/types.h>
 #include <sys/socket.h>
index 8550ba9abefc33e916d2062a626a9154e4f5a279..1d77833a897bf32bf1a61132b735792a0b3cc1c7 100644 (file)
@@ -74,7 +74,9 @@
 #include <sys/types.h>
 #include <string.h>
 #include <time.h>
+#if APR_HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 
 #include <stdio.h>
 #include <stdarg.h>