Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 36520 invoked by uid 500); 15 Oct 2002 20:06:20 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 36223 invoked from network); 15 Oct 2002 20:06:16 -0000 Date: Tue, 15 Oct 2002 21:06:14 +0100 From: Joe Orton To: dev@apr.apache.org Subject: [PATCH] remove whitespace before CPP directives Message-ID: <20021015200614.GB26879@manyfish.co.uk> Mail-Followup-To: dev@apr.apache.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Including whitespace before C preprocessor directives breaks with some older preprocessors; a particularly nasty break on Tru64 4.0f where APR_CHECK_DEFINE will always suceed. Index: configure.in =================================================================== RCS file: /home/cvspublic/apr/configure.in,v retrieving revision 1.484 diff -u -r1.484 configure.in --- configure.in 3 Oct 2002 15:31:49 -0000 1.484 +++ configure.in 15 Oct 2002 20:02:36 -0000 @@ -542,15 +542,15 @@ dnl # but keeps the pthread_rwlock_t structure hidden unless dnl # special things are defined. AC_TRY_COMPILE([#include - #include ], +#include ], [pthread_rwlock_t rwlock=PTHREAD_RWLOCK_INITIALIZER;], ac_cv_struct_pthread_rw=yes, ac_cv_struct_pthread_rw=no) if test "$ac_cv_struct_pthread_rw" = "no"; then AC_TRY_COMPILE([#define _XOPEN_SOURCE 500 - #define _BSD_SOURCE - #define _SVID_SOURCE - #include - #include ], +#define _BSD_SOURCE +#define _SVID_SOURCE +#include +#include ], [pthread_rwlock_t rwlock=PTHREAD_RWLOCK_INITIALIZER;], ac_cv_struct_pthread_rw=yes, ac_cv_struct_pthread_rw=no) if test "$ac_cv_struct_pthread_rw" = "yes"; then @@ -1411,8 +1411,8 @@ dnl Linux and older versions of AIX have this problem. APR_IFALLYES(header:pthread.h define:PTHREAD_PROCESS_SHARED func:pthread_mutexattr_setpshared, AC_TRY_RUN([ - #include - #include +#include +#include int main() { pthread_mutex_t mutex; @@ -1434,8 +1434,8 @@ AC_CHECK_FUNCS(pthread_mutexattr_setrobust_np) if test "$ac_cv_func_pthread_mutexattr_setrobust_np" = "no"; then AC_TRY_COMPILE([#define _POSIX_THREAD_PRIO_INHERIT - #include - #include ],[ +#include +#include ],[ int main() { pthread_mutex_t mutex; @@ -1706,10 +1706,10 @@ case $host in *linux*) AC_EGREP_CPP(yes,[ - #include - #ifdef TCP_CORK - yes - #endif +#include +#ifdef TCP_CORK +yes +#endif ],[ apr_tcp_nopush_flag="3" have_corkable_tcp="1" Index: build/apr_common.m4 =================================================================== RCS file: /home/cvspublic/apr/build/apr_common.m4,v retrieving revision 1.41 diff -u -r1.41 apr_common.m4 --- build/apr_common.m4 22 Aug 2002 20:34:16 -0000 1.41 +++ build/apr_common.m4 15 Oct 2002 20:02:36 -0000 @@ -235,10 +235,10 @@ for curhdr in $2 do AC_EGREP_CPP(YES_IS_DEFINED, [ - #include <$curhdr> - #ifdef $1 - YES_IS_DEFINED - #endif +#include <$curhdr> +#ifdef $1 +YES_IS_DEFINED +#endif ], ac_cv_define_$1=yes) done ]) @@ -254,10 +254,10 @@ AC_DEFUN(APR_CHECK_DEFINE,[ AC_CACHE_CHECK([for $1 in $2],ac_cv_define_$1,[ AC_EGREP_CPP(YES_IS_DEFINED, [ - #include <$2> - #ifdef $1 - YES_IS_DEFINED - #endif +#include <$2> +#ifdef $1 +YES_IS_DEFINED +#endif ], ac_cv_define_$1=yes, ac_cv_define_$1=no) ]) if test "$ac_cv_define_$1" = "yes"; then @@ -270,10 +270,10 @@ dnl AC_DEFUN(APR_CHECK_APR_DEFINE,[ AC_EGREP_CPP(YES_IS_DEFINED, [ - #include "$2/include/apr.h" - #if $1 - YES_IS_DEFINED - #endif +#include "$2/include/apr.h" +#if $1 +YES_IS_DEFINED +#endif ], ac_cv_define_$1=yes, ac_cv_define_$1=no) ])