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

Re: Rebuilding from CVS on Snow Leopard



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. It seems -traditional-cpp is
not required already on Leopard (darwin9.x.x), but maybe it would be
better to modify only for Snow Leopard (darwin10.x.x).

On Snow Leopard, _FORTIFY_SOURCE is defined to 2 by default, and
stdio.h and string.h include files under /usr/include/secure/.
This adds some buffer overflow checks, as in the case of strncpy().
But some macros in /usr/include/secure/_stdio.h can't be processed
by gcc -E -traditional-cpp, and causes the above warning from configure.


Index: configure.ac
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.ac,v
retrieving revision 1.127
diff -u -r1.127 configure.ac
--- configure.ac	7 Sep 2009 08:53:48 -0000	1.127
+++ configure.ac	29 Sep 2009 17:18:17 -0000
@@ -462,8 +462,9 @@
 AC_C_CONST                  dnl Does compiler support `const'.

 dnl Default preprocessing on Mac OS X produces warnings
+dnl Mac OS X 10.6 (darwin10.x.x) does not need this.
 case "$host_os" in
-  darwin*) CPP="$CPP -traditional-cpp" ;;
+  darwin[[0-9]].*) CPP="$CPP -traditional-cpp" ;;
 esac

 fp_PROG_CC_STDC




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