Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Rebuilding from CVS on Snow Leopard



2009/9/29 Jun T. <takimoto-j@xxxxxxxxxxxxxxxxx>:
> On 2009/09/28, at 14:50, Bart Schaefer wrote:
>
>> configure: WARNING: libc.h: accepted by the compiler, rejected by the
>> preprocessor!
>
>
> This is due to the lines 464-467 of configure.ac:
>
> dnl Default preprocessing on Mac OS X produces warnings
> case "$host_os" in
>  darwin*) CPP="$CPP -traditional-cpp" ;;
> esac
>
> I don't know when and why this is added.

The comment in the commit and the changelog entry don't exactly seem
to match up, but maybe the second hunk is the actual change?

5b8b7e9f06c
Author: Oliver Kiddle <opk@xxxxxxxxxxxxxxxxxxxxx>  2004-03-14 12:27:28
19619: fix problem with getting signals on MacOS X 10.1

---------------------------------- ChangeLog ----------------------------------
+2004-03-14  Oliver Kiddle  <opk@xxxxxxx>
+
+	* 19619: configure.ac: fix problem with getting signals
+	on MacOS X 10.1

--------------------------------- configure.ac ---------------------------------
@@ -399,32 +399,37 @@ esac
 case " ${LIBLDFLAGS+$LIBLDFLAGS }" in
   " ") ;;
   *" -s "*) strip_libldflags=true
     LIBLDFLAGS=`echo " $LIBLDFLAGS " | sed "$sed"` ;;
   *) strip_libldflags=false ;;
 esac

 AC_SUBST(CFLAGS)dnl
 AC_SUBST(LDFLAGS)dnl
 AC_SUBST(EXELDFLAGS)dnl
 AC_SUBST(LIBLDFLAGS)dnl

 AC_PROG_CPP                 dnl Figure out how to run C preprocessor.
 AC_PROG_GCC_TRADITIONAL     dnl Do we need -traditional flag for gcc.
 AC_C_CONST                  dnl Does compiler support `const'.

+dnl Default preprocessing on Mac OS X produces warnings
+case "$host_os" in
+  darwin*) CPP="$CPP -traditional-cpp" ;;
+esac
+
 fp_PROG_CC_STDC
 AC_MSG_CHECKING([whether to use prototypes])
 if test ."$ansi2knr" = .yes || test ."$ansi2knr" = .no; then
   msg="(overridden) "
 else
   msg=
   if test ."$fp_cv_prog_cc_stdc" = .no; then
     ansi2knr=yes
   else
     ansi2knr=no
   fi
 fi
 AH_TEMPLATE([PROTOTYPES],
 [Define to 1 if ANSI function prototypes are usable.])
 if test "$ansi2knr" = yes; then
   AC_MSG_RESULT(${msg}no)
@@ -1219,33 +1224,33 @@ zsh_cv_path_signal_h=$SIGNAL_H
 ])
 SIGNAL_H=$zsh_cv_path_signal_h
 AC_SUBST(SIGNAL_H)dnl

 dnl Where are error names located?  Needed as input for errnames1.awk
 AC_CACHE_CHECK(where error names are located, zsh_cv_path_errno_h,
 [dnl Look at the output from the preprocessor.
 dnl We should get lines of the form `# 1 "/usr/include/errno.h"'
 dnl The following assumes the real definitions are in a file which
 dnl contains the name `err'; we could relax this if necessary,
 dnl but then you can get a rather long list of files to test.
 dnl The backslash substitution is to persuade cygwin to cough up
 dnl slashes rather than doubled backslashes in the path.
 echo "#include <errno.h>" > nametmp.c
 errfile_list="`$CPP nametmp.c |
 sed -n -e 's/^#line[ 	].*\"\(.*\)\"/\1/p' \
-       -e 's/^#[ 	].*\"\(.*\)\"/\1/p' |
+       -e 's/^#[ 	0-9].*\"\(.*\)\"/\1/p' |
 sed 's/\\\\\\\\/\//g' |
 $AWK '{ if (\$1 ~ \"err\") files[[\$1]] = \$1 }
   END { for (var in files) print var }'`"
 rm -f nametmp.c
 for ERRNO_H in $errfile_list /dev/null
 do
   dnl Try to make sure it doesn't get confused by files that don't
   dnl have real error definitions in.  Count definitions to make sure.
   nerrs=`test -f $ERRNO_H && \
   grep '#[ 	]*define[ 	][ 	]*E[0-9A-Z]*[ 	]*[0-9][0-9]*' $ERRNO_H | \
   wc -l | sed 's/[ 	]//g'`
   test "x$nerrs" != x && test "$nerrs" -ge 7 && break
 done
 if test $ERRNO_H = "/dev/null"; then
   AC_MSG_ERROR(ERROR MACROS NOT FOUND:  please report to developers)
 fi

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author