This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix environ.c on darwin


As an aside, writing this patch as:

diff -pud /home/kcook34/gcc-orig/libgfortran/configure.ac ./configure.ac
--- /home/kcook34/gcc-orig/libgfortran/configure.ac 2004-09-26 10:52:03.000000000 -0400
+++ ./configure.ac 2004-10-27 13:44:08.495950100 -0400
@@ -151,9 +151,8 @@ AC_TYPE_OFF_T
# check header files
AC_STDC_HEADERS
AC_HAVE_HEADERS(stdlib.h stdio.h string.h stddef.h math.h unistd.h)
-AC_CHECK_HEADERS(time.h sys/params.h sys/time.h sys/times.h sys/resource.h)
-AC_CHECK_HEADERS(sys/mman.h)
-AC_CHECK_HEADER([complex.h],[AC_DEFINE([HAVE_COMPLEX_H], [1], [complex.h exists])])
+AC_CHECK_HEADERS(time.h sys/params.h sys/time.h sys/times.h sys/resource.h \
+ sys/mman.h complex.h crt_externs.h)


# Check for complex math functions
AC_CHECK_LIB([m],[csin],[need_math="no"],[need_math="yes"])

will save 292 lines in the generated configure with zero change in functionality.

Note that AC_CHECK_HEADERS simply loops through its args and calls AC_CHECK_HEADER telling it to defines the HAVE_* to 1 if found.

Kelley Cook


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]