From: Neal Norwitz Date: Sun, 23 Feb 2003 23:34:37 +0000 (+0000) Subject: Backport relevant portions of: X-Git-Tag: v2.2.3c1~125 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1d443bdf6915c56f5832a61a4c47a5fc6614750d;p=thirdparty%2FPython%2Fcpython.git Backport relevant portions of: Fix SF bug #691793, Python 2.3a2 build fails on Tru64 Need to make sure that preprocessor directives start in first column. This means we can't indent code which has preprocessor directives, nor have a space between [ #include for example. --- diff --git a/configure b/configure index b878e192c969..a05feaf643cd 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh -# From configure.in Revision: 1.288.6.15 +# From configure.in Revision: 1.288.6.17 # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 @@ -2451,12 +2451,12 @@ else #line 2452 "configure" #include "confdefs.h" #include -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(int)); - exit(0); + return(0); } EOF if { (eval echo configure:2463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -2490,12 +2490,12 @@ else #line 2491 "configure" #include "confdefs.h" #include -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(long)); - exit(0); + return(0); } EOF if { (eval echo configure:2502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -2529,12 +2529,12 @@ else #line 2530 "configure" #include "confdefs.h" #include -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(void *)); - exit(0); + return(0); } EOF if { (eval echo configure:2541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -2568,12 +2568,12 @@ else #line 2569 "configure" #include "confdefs.h" #include -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(char)); - exit(0); + return(0); } EOF if { (eval echo configure:2580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -2607,12 +2607,12 @@ else #line 2608 "configure" #include "confdefs.h" #include -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(short)); - exit(0); + return(0); } EOF if { (eval echo configure:2619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -2646,12 +2646,12 @@ else #line 2647 "configure" #include "confdefs.h" #include -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(float)); - exit(0); + return(0); } EOF if { (eval echo configure:2658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -2685,12 +2685,12 @@ else #line 2686 "configure" #include "confdefs.h" #include -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(double)); - exit(0); + return(0); } EOF if { (eval echo configure:2697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -2724,12 +2724,12 @@ else #line 2725 "configure" #include "confdefs.h" #include -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(fpos_t)); - exit(0); + return(0); } EOF if { (eval echo configure:2736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -2788,12 +2788,12 @@ else #line 2789 "configure" #include "confdefs.h" #include -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(long long)); - exit(0); + return(0); } EOF if { (eval echo configure:2800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -2853,12 +2853,12 @@ else #line 2854 "configure" #include "confdefs.h" #include -main() +int main() { FILE *f=fopen("conftestval", "w"); - if (!f) exit(1); + if (!f) return(1); fprintf(f, "%d\n", sizeof(uintptr_t)); - exit(0); + return(0); } EOF if { (eval echo configure:2865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null @@ -3022,7 +3022,7 @@ else #line 3023 "configure" #include "confdefs.h" #include - #include +#include main() { FILE *f=fopen("conftestval", "w"); @@ -3714,9 +3714,9 @@ echo "configure:3713: checking for _POSIX_THREADS in unistd.h" >&5 #line 3715 "configure" #include "confdefs.h" #include - #ifdef _POSIX_THREADS - yes - #endif +#ifdef _POSIX_THREADS +yes +#endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | diff --git a/configure.in b/configure.in index bcf29613cb77..d8f903119311 100644 --- a/configure.in +++ b/configure.in @@ -669,7 +669,7 @@ if test "$have_pthread_t" = yes ; then AC_MSG_CHECKING(size of pthread_t) AC_CACHE_VAL(ac_cv_sizeof_pthread_t, [AC_TRY_RUN([#include - #include +#include main() { FILE *f=fopen("conftestval", "w"); @@ -1059,9 +1059,9 @@ else AC_MSG_CHECKING(for _POSIX_THREADS in unistd.h) AC_EGREP_CPP(yes, [#include - #ifdef _POSIX_THREADS - yes - #endif +#ifdef _POSIX_THREADS +yes +#endif ], unistd_defines_pthreads=yes, unistd_defines_pthreads=no) AC_MSG_RESULT($unistd_defines_pthreads)