summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--file_io/unix/dir.c4
-rw-r--r--file_io/unix/flock.c2
-rw-r--r--file_io/unix/readwrite.c2
-rw-r--r--file_io/win32/dir.c2
-rw-r--r--i18n/unix/xlate.c10
-rw-r--r--include/apr.h.in3
-rw-r--r--include/apr.hw5
-rw-r--r--include/arch/os2/networkio.h2
-rw-r--r--include/arch/unix/fileio.h10
-rw-r--r--include/arch/unix/locks.h7
-rw-r--r--include/arch/unix/misc.h4
-rw-r--r--include/arch/unix/networkio.h22
-rw-r--r--include/arch/unix/threadproc.h6
-rw-r--r--include/arch/win32/apr_private.h6
-rw-r--r--include/arch/win32/fileio.h7
-rw-r--r--include/arch/win32/misc.h4
-rw-r--r--lib/apr_pools.c10
-rw-r--r--memory/unix/apr_pools.c10
-rw-r--r--misc/unix/errorcodes.c2
-rw-r--r--misc/unix/getuuid.c2
-rw-r--r--misc/unix/rand.c2
-rw-r--r--mmap/unix/mmap.c6
-rw-r--r--network_io/unix/inet_ntop.c8
-rw-r--r--network_io/unix/inet_pton.c8
-rw-r--r--network_io/unix/sa_common.c2
-rw-r--r--passwd/apr_getpass.c6
-rw-r--r--passwd/apr_md5.c6
-rw-r--r--strings/apr_cpystrn.c4
-rw-r--r--strings/apr_fnmatch.c2
-rw-r--r--strings/apr_snprintf.c10
-rw-r--r--tables/apr_hash.c4
-rw-r--r--tables/apr_tables.c4
-rw-r--r--test/testoc.c2
-rw-r--r--threadproc/unix/procsup.c2
-rw-r--r--threadproc/unix/signals.c2
-rw-r--r--threadproc/win32/signals.c2
-rw-r--r--time/unix/time.c6
-rw-r--r--time/unix/timestr.c6
-rw-r--r--user/win32/groupinfo.c3
39 files changed, 100 insertions, 105 deletions
diff --git a/file_io/unix/dir.c b/file_io/unix/dir.c
index 57fbea0fd..b4ee74f8b 100644
--- a/file_io/unix/dir.c
+++ b/file_io/unix/dir.c
@@ -55,10 +55,10 @@
#include "fileio.h"
#include "apr_strings.h"
#include "apr_portable.h"
-#ifdef HAVE_SYS_SYSLIMITS_H
+#if APR_HAVE_SYS_SYSLIMITS_H
#include <sys/syslimits.h>
#endif
-#ifdef HAVE_LIMITS_H
+#if APR_HAVE_LIMITS_H
#include <limits.h>
#endif
diff --git a/file_io/unix/flock.c b/file_io/unix/flock.c
index 7765a392a..e656b1baf 100644
--- a/file_io/unix/flock.c
+++ b/file_io/unix/flock.c
@@ -54,7 +54,7 @@
#include "fileio.h"
-#ifdef HAVE_FCNTL_H
+#if APR_HAVE_FCNTL_H
#include <fcntl.h>
#endif
#ifdef HAVE_SYS_FILE_H
diff --git a/file_io/unix/readwrite.c b/file_io/unix/readwrite.c
index 9f4795a73..7de554342 100644
--- a/file_io/unix/readwrite.c
+++ b/file_io/unix/readwrite.c
@@ -281,7 +281,7 @@ apr_status_t apr_file_writev(apr_file_t *thefile, const struct iovec *vec,
apr_size_t nvec, apr_size_t *nbytes)
{
#ifdef HAVE_WRITEV
- int bytes;
+ int bytes;
if ((bytes = writev(thefile->filedes, vec, nvec)) < 0) {
*nbytes = 0;
diff --git a/file_io/win32/dir.c b/file_io/win32/dir.c
index 514d25f62..0e1e900ed 100644
--- a/file_io/win32/dir.c
+++ b/file_io/win32/dir.c
@@ -62,7 +62,7 @@
#if APR_HAVE_ERRNO_H
#include <errno.h>
#endif
-#ifdef HAVE_STRING_H
+#if APR_HAVE_STRING_H
#include <string.h>
#endif
#if APR_HAVE_DIRENT_H
diff --git a/i18n/unix/xlate.c b/i18n/unix/xlate.c
index 07ea14650..c46c7a0c3 100644
--- a/i18n/unix/xlate.c
+++ b/i18n/unix/xlate.c
@@ -95,7 +95,7 @@ struct apr_xlate_t {
char *frompage;
char *topage;
char *sbcs_table;
-#ifdef HAVE_ICONV
+#ifdev HAVE_ICONV
iconv_t ich;
#endif
};
@@ -173,7 +173,7 @@ static const char *handle_special_names(const char *page)
static apr_status_t apr_xlate_cleanup(void *convset)
{
-#ifdef HAVE_ICONV
+#ifdev HAVE_ICONV
apr_xlate_t *old = convset;
if (old->ich != (iconv_t)-1) {
@@ -185,7 +185,7 @@ static apr_status_t apr_xlate_cleanup(void *convset)
return APR_SUCCESS;
}
-#ifdef HAVE_ICONV
+#ifdev HAVE_ICONV
static void check_sbcs(apr_xlate_t *convset)
{
char inbuf[256], outbuf[256];
@@ -251,7 +251,7 @@ apr_status_t apr_xlate_open(apr_xlate_t **convset, const char *topage,
set found to non-zero if found in the cache
#endif
-#ifdef HAVE_ICONV
+#ifdev HAVE_ICONV
if (!found) {
new->ich = iconv_open(topage, frompage);
if (new->ich == (iconv_t)-1) {
@@ -287,7 +287,7 @@ apr_status_t apr_xlate_conv_buffer(apr_xlate_t *convset, const char *inbuf,
apr_size_t *outbytes_left)
{
apr_status_t status = APR_SUCCESS;
-#ifdef HAVE_ICONV
+#ifdev HAVE_ICONV
size_t translated;
if (convset->ich != (iconv_t)-1) {
diff --git a/include/apr.h.in b/include/apr.h.in
index 13a09a4ec..8d8a802af 100644
--- a/include/apr.h.in
+++ b/include/apr.h.in
@@ -24,6 +24,7 @@
#endif
#define APR_HAVE_ARPA_INET_H @arpa_ineth@
+#define APR_HAVE_CONIO_H @conioh@
#define APR_HAVE_CRYPT_H @crypth@
#define APR_HAVE_CTYPE_H @ctypeh@
#define APR_HAVE_DIRENT_H @direnth@
@@ -37,6 +38,7 @@
#define APR_HAVE_STDARG_H @stdargh@
#define APR_HAVE_STDIO_H @stdioh@
#define APR_HAVE_STDLIB_H @stdlibh@
+#define APR_HAVE_SIGNAL_H @signalh@
#define APR_HAVE_STRING_H @stringh@
#define APR_HAVE_STRINGS_H @stringsh@
#define APR_HAVE_SYS_SIGNAL_H @sys_signalh@
@@ -44,7 +46,6 @@
#define APR_HAVE_SYS_SYSLIMITS_H @sys_syslimitsh@
#define APR_HAVE_SYS_TYPES_H @sys_typesh@
#define APR_HAVE_SYS_UIO_H @sys_uioh@
-#define APR_HAVE_SIGNAL_H @signalh@
#define APR_HAVE_SYS_WAIT_H @sys_waith@
#define APR_HAVE_UNISTD_H @unistdh@
diff --git a/include/apr.hw b/include/apr.hw
index bdb105cc9..e5cc8589f 100644
--- a/include/apr.hw
+++ b/include/apr.hw
@@ -115,16 +115,18 @@
#define NO_USE_SIGACTION
#define APR_HAVE_ARPA_INET_H 0
+#define APR_HAVE_CONIO_H 1
#define APR_HAVE_CRYPT_H 0
#define APR_HAVE_CTYPE_H 1
#define APR_HAVE_DIRENT_H 0
#define APR_HAVE_ERRNO_H 1
#define APR_HAVE_FCNTL_H 1
#define APR_HAVE_IO_H 1
-#define APR_HAVE_LIMITS_H 0
+#define APR_HAVE_LIMITS_H 1
#define APR_HAVE_NETDB_H 0
#define APR_HAVE_NETINET_IN_H 0
#define APR_HAVE_PTHREAD_H 0
+#define APR_HAVE_SIGNAL_H 1
#define APR_HAVE_STDARG_H 1
#define APR_HAVE_STDIO_H 1
#define APR_HAVE_STDLIB_H 1
@@ -135,7 +137,6 @@
#define APR_HAVE_SYS_SYSLIMITS_H 0
#define APR_HAVE_SYS_TYPES_H 1
#define APR_HAVE_SYS_UIO_H 0
-#define APR_HAVE_SIGNAL_H 1
#define APR_HAVE_SYS_WAIT_H 0
#define APR_HAVE_UNISTD_H 0
diff --git a/include/arch/os2/networkio.h b/include/arch/os2/networkio.h
index 79534d7c6..64ed34a7e 100644
--- a/include/arch/os2/networkio.h
+++ b/include/arch/os2/networkio.h
@@ -59,7 +59,7 @@
#include "apr_network_io.h"
#include "apr_general.h"
#include "os2calls.h"
-#if HAVE_NETDB_H
+#if APR_HAVE_NETDB_H
#include <netdb.h>
#endif
diff --git a/include/arch/unix/fileio.h b/include/arch/unix/fileio.h
index 3019db825..3d71a4367 100644
--- a/include/arch/unix/fileio.h
+++ b/include/arch/unix/fileio.h
@@ -74,7 +74,7 @@
#if APR_HAVE_ERRNO_H
#include <errno.h>
#endif
-#if HAVE_STRING_H
+#if APR_HAVE_STRING_H
#include <string.h>
#endif
#if APR_HAVE_STRINGS_H
@@ -83,22 +83,22 @@
#if APR_HAVE_DIRENT_H
#include <dirent.h>
#endif
-#if HAVE_SYS_STAT_H
+#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
-#if HAVE_UNISTD_H
+#if APR_HAVE_UNISTD_H
#include <unistd.h>
#endif
#if APR_HAVE_STDIO_H
#include <stdio.h>
#endif
-#if HAVE_STDLIB_H
+#if APR_HAVE_STDLIB_H
#include <stdlib.h>
#endif
#if APR_HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
-#if HAVE_SYS_TIME_H
+#if APR_HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef BEOS
diff --git a/include/arch/unix/locks.h b/include/arch/unix/locks.h
index e1cfc3b7e..b71638a0b 100644
--- a/include/arch/unix/locks.h
+++ b/include/arch/unix/locks.h
@@ -72,20 +72,19 @@
#include <fcntl.h>
#endif
-/* ### create APR_HAVE_* macros for these? */
#ifdef HAVE_SYS_SEM_H
#include <sys/sem.h>
#endif
#ifdef HAVE_SYS_FILE_H
#include <sys/file.h>
#endif
-#ifdef HAVE_STDLIB_H
+#if APR_HAVE_STDLIB_H
#include <stdlib.h>
#endif
-#ifdef HAVE_UNISTD_H
+#if APR_HAVE_UNISTD_H
#include <unistd.h>
#endif
-#ifdef HAVE_STRING_H
+#if APR_HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_SYS_MMAN_H
diff --git a/include/arch/unix/misc.h b/include/arch/unix/misc.h
index 0849b5ef3..696943772 100644
--- a/include/arch/unix/misc.h
+++ b/include/arch/unix/misc.h
@@ -76,10 +76,10 @@
#endif
/* ### create APR_HAVE_* macros for these? */
-#ifdef HAVE_STDLIB_H
+#if APR_HAVE_STDLIB_H
#include <stdlib.h>
#endif
-#ifdef HAVE_STRING_H
+#if APR_HAVE_STRING_H
#include <string.h>
#endif
diff --git a/include/arch/unix/networkio.h b/include/arch/unix/networkio.h
index 5890de68e..df1b5d12f 100644
--- a/include/arch/unix/networkio.h
+++ b/include/arch/unix/networkio.h
@@ -69,43 +69,43 @@
#if APR_HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
-#if HAVE_SYS_POLL_H
+#if APR_HAVE_SYS_POLL_H
#include <sys/poll.h>
#endif
-#if HAVE_POLL_H
+#ifdef HAVE_POLL_H
#include <poll.h>
#endif
#if APR_HAVE_ERRNO_H
#include <errno.h>
#endif
-#if HAVE_SYS_TIME_H
+#if APR_HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
-#if HAVE_UNISTD_H
+#if APR_HAVE_UNISTD_H
#include <unistd.h>
#endif
-#if HAVE_STRING_H
+#if APR_HAVE_STRING_H
#include <string.h>
#endif
-#if HAVE_NETINET_TCP_H
+#if APR_HAVE_NETINET_TCP_H
#include <netinet/tcp.h>
#endif
-#if HAVE_NETINET_IN_H
+#if APR_HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
-#if HAVE_ARPA_INET_H
+#if APR_HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
-#if HAVE_SYS_SOCKET_H
+#if APR_HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
-#if HAVE_NETDB_H
+#if APR_HAVE_NETDB_H
#include <netdb.h>
#endif
#if APR_HAVE_FCNTL_H
#include <fcntl.h>
#endif
-#if HAVE_SYS_SENDFILE_H
+#if APR_HAVE_SYS_SENDFILE_H
#include <sys/sendfile.h>
#endif
/* End System Headers */
diff --git a/include/arch/unix/threadproc.h b/include/arch/unix/threadproc.h
index 489bb0114..c14270dd3 100644
--- a/include/arch/unix/threadproc.h
+++ b/include/arch/unix/threadproc.h
@@ -62,19 +62,19 @@
#if APR_HAVE_PTHREAD_H
#include <pthread.h>
#endif
-#if HAVE_SYS_RESOURCE_H
+#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
#if APR_HAVE_SIGNAL_H
#include <signal.h>
#endif
-#if HAVE_STRING_H
+#if APR_HAVE_STRING_H
#include <string.h>
#endif
#if APR_HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
-#if HAVE_STRING_H
+#if APR_HAVE_STRING_H
#include <string.h>
#endif
/* End System Headers */
diff --git a/include/arch/win32/apr_private.h b/include/arch/win32/apr_private.h
index c993ed771..d2cbc8ded 100644
--- a/include/arch/win32/apr_private.h
+++ b/include/arch/win32/apr_private.h
@@ -111,11 +111,11 @@
/* Use this section to define all of the HAVE_FOO_H
* that are required to build properly.
*/
-#define HAVE_CONIO_H 1
-#define HAVE_MALLOC_H 1
-#define HAVE_STDLIB_H 1
#define HAVE_LIMITS_H 1
+#define HAVE_MALLOC_H 1
#define HAVE_SIGNAL_H 1
+/* #define HAVE_STDDEF_H 1 why not? */
+#define HAVE_STDLIB_H 1
#define HAVE_STRICMP 1
#define HAVE_STRNICMP 1
diff --git a/include/arch/win32/fileio.h b/include/arch/win32/fileio.h
index 6c56a4c15..71dd541af 100644
--- a/include/arch/win32/fileio.h
+++ b/include/arch/win32/fileio.h
@@ -66,10 +66,10 @@
#include "apr_errno.h"
#include "misc.h"
-#if APR_HAVE_SYS_STAT_H
+#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
-#ifdef HAVE_SYS_TYPES_H
+#if APR_HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_FCNTL_H
@@ -84,9 +84,6 @@
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
-#ifdef HAVE_UIO_H
-#include <sys/uio.h>
-#endif
#if APR_HAS_UNICODE_FS
#include "i18n.h"
diff --git a/include/arch/win32/misc.h b/include/arch/win32/misc.h
index 0849b5ef3..696943772 100644
--- a/include/arch/win32/misc.h
+++ b/include/arch/win32/misc.h
@@ -76,10 +76,10 @@
#endif
/* ### create APR_HAVE_* macros for these? */
-#ifdef HAVE_STDLIB_H
+#if APR_HAVE_STDLIB_H
#include <stdlib.h>
#endif
-#ifdef HAVE_STRING_H
+#if APR_HAVE_STRING_H
#include <string.h>
#endif
diff --git a/lib/apr_pools.c b/lib/apr_pools.c
index 4f60d5c0a..9a2f4dbf7 100644
--- a/lib/apr_pools.c
+++ b/lib/apr_pools.c
@@ -70,13 +70,13 @@
#include "apr_lock.h"
#include "apr_hash.h"
-#ifdef HAVE_STDIO_H
+#if APR_HAVE_STDIO_H
#include <stdio.h>
#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
-#ifdef HAVE_SYS_SIGNAL_H
+#if APR_HAVE_SYS_SIGNAL_H
#include <sys/signal.h>
#endif
#if APR_HAVE_SIGNAL_H
@@ -88,17 +88,17 @@
#if APR_HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
-#ifdef HAVE_UNISTD_H
+#if APR_HAVE_UNISTD_H
#include <unistd.h>
#endif
#if APR_HAVE_FCNTL_H
#include <fcntl.h>
#endif
-#ifdef HAVE_STRING_H
+#if APR_HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_STDLIB_H
+#if APR_HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_MALLOC_H
diff --git a/memory/unix/apr_pools.c b/memory/unix/apr_pools.c
index 4f60d5c0a..9a2f4dbf7 100644
--- a/memory/unix/apr_pools.c
+++ b/memory/unix/apr_pools.c
@@ -70,13 +70,13 @@
#include "apr_lock.h"
#include "apr_hash.h"
-#ifdef HAVE_STDIO_H
+#if APR_HAVE_STDIO_H
#include <stdio.h>
#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
-#ifdef HAVE_SYS_SIGNAL_H
+#if APR_HAVE_SYS_SIGNAL_H
#include <sys/signal.h>
#endif
#if APR_HAVE_SIGNAL_H
@@ -88,17 +88,17 @@
#if APR_HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
-#ifdef HAVE_UNISTD_H
+#if APR_HAVE_UNISTD_H
#include <unistd.h>
#endif
#if APR_HAVE_FCNTL_H
#include <fcntl.h>
#endif
-#ifdef HAVE_STRING_H
+#if APR_HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_STDLIB_H
+#if APR_HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_MALLOC_H
diff --git a/misc/unix/errorcodes.c b/misc/unix/errorcodes.c
index 785bf94f8..5a7fcf6c6 100644
--- a/misc/unix/errorcodes.c
+++ b/misc/unix/errorcodes.c
@@ -57,7 +57,7 @@
#include "apr_lib.h"
#include "apr_dso.h"
-#ifdef HAVE_NETDB_H
+#if APR_HAVE_NETDB_H
#include <netdb.h>
#endif
#ifdef HAVE_DLFCN_H
diff --git a/misc/unix/getuuid.c b/misc/unix/getuuid.c
index f43c99c21..3d8f72cdd 100644
--- a/misc/unix/getuuid.c
+++ b/misc/unix/getuuid.c
@@ -72,7 +72,7 @@
#if APR_HAVE_STRINGS_H
#include <strings.h>
#endif
-#ifdef HAVE_NETDB_H
+#if APR_HAVE_NETDB_H
#include <netdb.h>
#endif
diff --git a/misc/unix/rand.c b/misc/unix/rand.c
index 71778c6fd..6f1d77309 100644
--- a/misc/unix/rand.c
+++ b/misc/unix/rand.c
@@ -56,7 +56,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
-#ifdef HAVE_UNISTD_H
+#if APR_HAVE_UNISTD_H
#include <unistd.h>
#endif
diff --git a/mmap/unix/mmap.c b/mmap/unix/mmap.c
index 32ae8a6d0..b5907772b 100644
--- a/mmap/unix/mmap.c
+++ b/mmap/unix/mmap.c
@@ -64,16 +64,16 @@
#ifdef BEOS
#include <kernel/OS.h>
#endif
-#if HAVE_STRING_H
+#if APR_HAVE_STRING_H
#include <string.h>
#endif
#if APR_HAVE_STDIO_H
#include <stdio.h>
#endif
-#if HAVE_SYS_STAT_H
+#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
-#if HAVE_SYS_MMAN_H
+#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
#endif
diff --git a/network_io/unix/inet_ntop.c b/network_io/unix/inet_ntop.c
index cb3f418ab..6360b6aba 100644
--- a/network_io/unix/inet_ntop.c
+++ b/network_io/unix/inet_ntop.c
@@ -17,16 +17,16 @@
#include "apr_private.h"
#include "networkio.h"
-#ifdef HAVE_SYS_TYPES_H
+#if APR_HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
-#ifdef HAVE_SYS_SOCKET_H
+#if APR_HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
-#ifdef HAVE_NETINET_IN_H
+#if APR_HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
-#ifdef HAVE_ARPA_INET_H
+#if APR_HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#include <string.h>
diff --git a/network_io/unix/inet_pton.c b/network_io/unix/inet_pton.c
index 915884bc1..711384cb8 100644
--- a/network_io/unix/inet_pton.c
+++ b/network_io/unix/inet_pton.c
@@ -17,16 +17,16 @@
#include "apr_private.h"
#include "networkio.h"
-#ifdef HAVE_SYS_TYPES_H
+#if APR_HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
-#ifdef HAVE_SYS_SOCKET_H
+#if APR_HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
-#ifdef HAVE_NETINET_IN_H
+#if APR_HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
-#ifdef HAVE_ARPA_INET_H
+#if APR_HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#include <string.h>
diff --git a/network_io/unix/sa_common.c b/network_io/unix/sa_common.c
index 8d607c962..f84ce52ac 100644
--- a/network_io/unix/sa_common.c
+++ b/network_io/unix/sa_common.c
@@ -67,7 +67,7 @@
#include "apr_lib.h"
#include "apr_strings.h"
-#ifdef HAVE_STDLIB_H
+#if APR_HAVE_STDLIB_H
#include <stdlib.h>
#endif
diff --git a/passwd/apr_getpass.c b/passwd/apr_getpass.c
index 1338b0977..dc1a44d60 100644
--- a/passwd/apr_getpass.c
+++ b/passwd/apr_getpass.c
@@ -64,13 +64,13 @@
#include <sys/types.h>
#include <errno.h>
-#if HAVE_UNISTD_H
+#if APR_HAVE_UNISTD_H
#include <unistd.h>
#endif
-#if HAVE_CONIO_H
+#if APR_HAVE_CONIO_H
#include <conio.h>
#endif
-#if HAVE_STDLIB_H
+#if APR_HAVE_STDLIB_H
#include <stdlib.h>
#endif
#if APR_HAVE_STRING_H
diff --git a/passwd/apr_md5.c b/passwd/apr_md5.c
index 2264a4bcb..48d1f1c4b 100644
--- a/passwd/apr_md5.c
+++ b/passwd/apr_md5.c
@@ -102,13 +102,13 @@
#include "apr_md5.h"
#include "apr_lib.h"
-#ifdef HAVE_STRING_H
+#if APR_HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_CRYPT_H
+#if APR_HAVE_CRYPT_H
#include <crypt.h>
#endif
-#ifdef HAVE_UNISTD_H
+#if APR_HAVE_UNISTD_H
#include <unistd.h>
#endif
diff --git a/strings/apr_cpystrn.c b/strings/apr_cpystrn.c
index a51ddef12..0ece3ed17 100644
--- a/strings/apr_cpystrn.c
+++ b/strings/apr_cpystrn.c
@@ -60,10 +60,10 @@
#if APR_HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
-#if HAVE_STRING_H
+#if APR_HAVE_STRING_H
#include <string.h>
#endif
-#if HAVE_CTYPE_H
+#if APR_HAVE_CTYPE_H
#include <ctype.h>
#endif
diff --git a/strings/apr_fnmatch.c b/strings/apr_fnmatch.c
index 63e8e9dce..f9a20c262 100644
--- a/strings/apr_fnmatch.c
+++ b/strings/apr_fnmatch.c
@@ -48,7 +48,7 @@ static char sccsid[] = "@(#)fnmatch.c 8.2 (Berkeley) 4/16/94";
#include "apr_fnmatch.h"
#include "apr_lib.h"
#include <string.h>
-#ifdef HAVE_CTYPE_H
+#if APR_HAVE_CTYPE_H
# include <ctype.h>
#endif
diff --git a/strings/apr_snprintf.c b/strings/apr_snprintf.c
index 5daedc9b6..0499531e9 100644
--- a/strings/apr_snprintf.c
+++ b/strings/apr_snprintf.c
@@ -63,22 +63,22 @@
#include "apr_strings.h"
#include "apr_network_io.h"
#include <math.h>
-#ifdef HAVE_CTYPE_H
+#if APR_HAVE_CTYPE_H
#include <ctype.h>
#endif
#if APR_HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
-#ifdef HAVE_SYS_SOCKET_H
+#if APR_HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
-#ifdef HAVE_ARPA_INET_H
+#if APR_HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
-#ifdef HAVE_LIMITS_H
+#if APR_HAVE_LIMITS_H
#include <limits.h>
#endif
-#ifdef HAVE_STRING_H
+#if APR_HAVE_STRING_H
#include <string.h>
#endif
diff --git a/tables/apr_hash.c b/tables/apr_hash.c
index c8505087d..2940d6043 100644
--- a/tables/apr_hash.c
+++ b/tables/apr_hash.c
@@ -63,10 +63,10 @@
#include "apr_hash.h"
-#ifdef HAVE_STDLIB_H
+#if APR_HAVE_STDLIB_H
#include <stdlib.h>
#endif
-#ifdef HAVE_STDLIB_H
+#if APR_HAVE_STDLIB_H
#include <string.h>
#endif
diff --git a/tables/apr_tables.c b/tables/apr_tables.c
index 6c97da9bc..ef6bc17e2 100644
--- a/tables/apr_tables.c
+++ b/tables/apr_tables.c
@@ -66,13 +66,13 @@
#include "apr_tables.h"
#include "apr_strings.h"
#include "apr_lib.h"
-#ifdef HAVE_STDLIB_H
+#if APR_HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
-#ifdef HAVE_STRING_H
+#if APR_HAVE_STRING_H
#include <string.h>
#endif
#if APR_HAVE_STRINGS_H
diff --git a/test/testoc.c b/test/testoc.c
index f7ee02c3e..8d0896b63 100644
--- a/test/testoc.c
+++ b/test/testoc.c
@@ -60,7 +60,7 @@
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
-#ifdef HAVE_UNISTD_H
+#if APR_HAVE_UNISTD_H
#include <unistd.h>
#endif
diff --git a/threadproc/unix/procsup.c b/threadproc/unix/procsup.c
index 8081e2ed1..c7f828bad 100644
--- a/threadproc/unix/procsup.c
+++ b/threadproc/unix/procsup.c
@@ -72,7 +72,7 @@ apr_status_t apr_proc_detach(void)
}
/* RAISE_SIGSTOP(DETACH);*/
#endif
-#if HAVE_SETSID
+#if APR_HAVE_SETSID
if ((pgrp = setsid()) == -1) {
return errno;
}
diff --git a/threadproc/unix/signals.c b/threadproc/unix/signals.c
index 0b14fb1c6..335fe6624 100644
--- a/threadproc/unix/signals.c
+++ b/threadproc/unix/signals.c
@@ -88,7 +88,7 @@ apr_status_t apr_proc_kill(apr_proc_t *proc, int signum)
}
-#ifdef HAVE_SIGACTION
+#if APR_HAVE_SIGACTION
/*
* Replace standard signal() with the more reliable sigaction equivalent
diff --git a/threadproc/win32/signals.c b/threadproc/win32/signals.c
index 970ea70a7..308a59c51 100644
--- a/threadproc/win32/signals.c
+++ b/threadproc/win32/signals.c
@@ -59,7 +59,7 @@
#include "apr_general.h"
#include <signal.h>
#include <string.h>
-#ifdef HAVE_SYS_WAIT
+#if APR_HAVE_SYS_WAIT
#include <sys/wait.h>
#endif
diff --git a/time/unix/time.c b/time/unix/time.c
index 9076d77e3..6427f29f4 100644
--- a/time/unix/time.c
+++ b/time/unix/time.c
@@ -57,13 +57,13 @@
#include "apr_lib.h"
#include "apr_private.h"
/* System Headers required for time library */
-#if HAVE_SYS_TIME_H
+#if APR_HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
-#if HAVE_UNISTD_H
+#if APR_HAVE_UNISTD_H
#include <unistd.h>
#endif
-#if HAVE_TIME_H
+#ifdef HAVE_TIME_H
#include <time.h>
#endif
#ifdef BEOS
diff --git a/time/unix/timestr.c b/time/unix/timestr.c
index 82d39df62..dcf928a62 100644
--- a/time/unix/timestr.c
+++ b/time/unix/timestr.c
@@ -57,13 +57,13 @@
#include "apr_lib.h"
#include "apr_private.h"
/* System Headers required for time library */
-#if HAVE_SYS_TIME_H
+#if APR_HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
-#if HAVE_TIME_H
+#ifdef HAVE_TIME_H
#include <time.h>
#endif
-#if HAVE_STRING_H
+#if APR_HAVE_STRING_H
#include <string.h>
#endif
/* End System Headers */
diff --git a/user/win32/groupinfo.c b/user/win32/groupinfo.c
index 1f582cf5b..b66853e15 100644
--- a/user/win32/groupinfo.c
+++ b/user/win32/groupinfo.c
@@ -56,9 +56,6 @@
#include "apr_portable.h"
#include "apr_user.h"
#include "apr_private.h"
-#ifdef HAVE_GRP_H
-#include <grp.h>
-#endif
#if APR_HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif