rbb 99/12/06 07:47:46
Modified: src/lib/apr acconfig.h configure.in
src/lib/apr/include apr.h.in apr_network_io.h
src/lib/apr/lib apr_pools.c
src/lib/apr/threadproc/unix thread.c
Log:
Cleanup some mistakes I made. We are now configuring the APR_HAS_FOO
macros in a cleaner way IMO, and that required that we always use #if
instead of #ifdef. I also used the wrong #if HAVE_SIGNAL_H macro
in apr_pools.c.
Submitted by: David Reid
Revision Changes Path
1.16 +0 -2 apache-2.0/src/lib/apr/acconfig.h
Index: acconfig.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/acconfig.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- acconfig.h 1999/12/04 21:48:30 1.15
+++ acconfig.h 1999/12/06 15:47:42 1.16
@@ -45,8 +45,6 @@
#undef USEBCOPY
#undef SIZEOF_SSIZE_T
-#undef APR_HAS_THREADS
-#undef APR_HAS_SENDFILE
@BOTTOM@
1.32 +8 -8 apache-2.0/src/lib/apr/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/configure.in,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- configure.in 1999/12/04 21:48:31 1.31
+++ configure.in 1999/12/06 15:47:42 1.32
@@ -238,10 +238,10 @@
AC_FUNC_SETPGRP
if test "$ac_cv_func_mmap_fixed_mapped" = "yes"; then
- mmap="#define APR_HAS_MMAP 1"
+ mmap="1"
AC_SUBST(mmap)
else
- mmap="#define APR_HAS_MMAP 0"
+ mmap="0"
AC_SUBST(mmap)
fi
@@ -262,7 +262,7 @@
AC_CHECK_FUNCS(pthread_sigmask)
AC_CHECK_FUNCS(strcasecmp stricmp poll setsid)
AC_CHECK_FUNCS(sigaction writev)
-AC_CHECK_FUNCS(sendfile, [ sendfile="#define APR_HAS_SENDFILE 1" ], [
sendfile="APR_HAS_SENDFILE 0" ])
+AC_CHECK_FUNCS(sendfile, [ sendfile="1" ], [ sendfile="0" ])
AC_CHECK_FUNCS(getpass)
AC_CHECK_FUNC(_getch)
AC_SUBST(sendfile)
@@ -274,7 +274,7 @@
[ --enable-threads Enable threading support in APR.],
[
if test "$enableval" = "no"; then
- threads="#define APR_HAS_THREADS 0"
+ threads="0"
pthreadh="0"
AC_SUBST(threads)
AC_SUBST(pthreadh)
@@ -282,11 +282,11 @@
else
if test "$enableval" = "pthread"; then
AC_CHECK_HEADERS(pthread.h, [
- threads="#define APR_HAS_THREADS 1"
+ threads="1"
pthreadh="1"
AC_SUBST(pthreadh)
AC_SUBST(threads) ], [
- threads="#define APR_HAS_THREADS 0"
+ threads="0"
pthreadh="0"
AC_SUBST(pthreadh)
AC_SUBST(threads) ] )
@@ -298,11 +298,11 @@
],
[
AC_CHECK_HEADERS(pthread.h, [
- threads="#define APR_HAS_THREADS 1"
+ threads="1"
pthreadh="1"
AC_SUBST(pthreadh)
AC_SUBST(threads) ], [
- threads="#define APR_HAS_THREADS 0"
+ threads="0"
pthreadh="0"
AC_SUBST(pthreadh)
AC_SUBST(threads) ] )
1.5 +3 -3 apache-2.0/src/lib/apr/include/apr.h.in
Index: apr.h.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr.h.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- apr.h.in 1999/12/04 21:48:33 1.4
+++ apr.h.in 1999/12/06 15:47:43 1.5
@@ -17,9 +17,9 @@
#endif
/* APR Feature Macros */
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@
+#define APR_HAS_THREADS @threads@
+#define APR_HAS_SENDFILE @sendfile@
+#define APR_HAS_MMAP @mmap@
/* Typedefs that APR needs. */
1.19 +1 -1 apache-2.0/src/lib/apr/include/apr_network_io.h
Index: apr_network_io.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_network_io.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- apr_network_io.h 1999/12/04 21:48:33 1.18
+++ apr_network_io.h 1999/12/06 15:47:43 1.19
@@ -106,7 +106,7 @@
typedef struct pollfd_t ap_pollfd_t;
typedef struct hdtr_t ap_hdtr_t;
-#ifdef APR_HAS_SENDFILE
+#if APR_HAS_SENDFILE
/* A structure to encapsulate headers and trailers for ap_sendfile */
struct hdtr_t {
struct iovec* headers;
1.26 +3 -0 apache-2.0/src/lib/apr/lib/apr_pools.c
Index: apr_pools.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/lib/apr_pools.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- apr_pools.c 1999/12/02 17:05:40 1.25
+++ apr_pools.c 1999/12/06 15:47:45 1.26
@@ -76,6 +76,9 @@
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
+#ifdef HAVE_SYS_SIGNAL_H
+#include <sys/signal.h>
+#endif
#ifdef HAVE_SIGNAL_H
#include <sys/signal.h>
#endif
1.10 +1 -1 apache-2.0/src/lib/apr/threadproc/unix/thread.c
Index: thread.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/unix/thread.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- thread.c 1999/12/03 15:18:41 1.9
+++ thread.c 1999/12/06 15:47:45 1.10
@@ -56,7 +56,7 @@
#include "threadproc.h"
#include "apr_portable.h"
-#ifdef APR_HAS_THREADS
+#if APR_HAS_THREADS
#ifdef HAVE_PTHREAD_H
/* ***APRDOC********************************************************