apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <...@manyfish.co.uk>
Subject [PATCH] remove whitespace before CPP directives
Date Tue, 15 Oct 2002 20:06:14 GMT
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 <sys/types.h>
-                            #include <pthread.h>], 
+#include <pthread.h>], 
                 [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 <sys/types.h>
-                    #include <pthread.h>], 
+#define _BSD_SOURCE
+#define _SVID_SOURCE
+#include <sys/types.h>
+#include <pthread.h>], 
                     [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 <sys/types.h>
-        #include <pthread.h>
+#include <sys/types.h>
+#include <pthread.h>
         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 <sys/types.h>
-            #include <pthread.h>],[
+#include <sys/types.h>
+#include <pthread.h>],[
             int main()
             {
                 pthread_mutex_t mutex;
@@ -1706,10 +1706,10 @@
     case $host in
         *linux*)
             AC_EGREP_CPP(yes,[
-                #include <linux/socket.h>
-                #ifdef TCP_CORK
-                yes
-                #endif
+#include <linux/socket.h>
+#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)
 ])
 


Mime
View raw message