[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AC_CHECK_FUNCS and gcc with -Werror
From: |
Steffen Dettmer |
Subject: |
AC_CHECK_FUNCS and gcc with -Werror |
Date: |
Wed, 3 Mar 2010 11:52:53 +0100 |
Hi,
in configure.in I have:
AC_CHECK_FUNCS(printf)
together with some
------------------------------------------------------------------->8=======
AC_DEFUN([IC_ENABLE_ERRORS],[
AC_ARG_ENABLE(errors,
[ --enable-errors[=ARG] Enable error mode
(warnings are errors) [ARG=no]],
....
if test x$enable_errors = xyes ; then
case $CC in
dnl Just in case someone would have a non-gcc "thingcc", don't match *gcc
gcc|*-gcc)
CFLAGS="$CFLAGS -Werror";
;;
=======8<-------------------------------------------------------------------
In config.log then:
configure:11204: gcc -o conftest -Wall -Wmissing-prototypes
-fstrict-aliasing -D_GNU_SOURCE -ansi -ggdb -D_REENTRANT -Werror
-ggdb conftest
.c -lpthread >&5
cc1: warnings being treated as errors
conftest.c:67: warning: conflicting types for built-in function 'printf'
what to do best here?
oki,
Steffen
------------------------------------------------------------------->8=======
configure:11204: gcc -o conftest -Wall -Wmissing-prototypes
-fstrict-aliasing -D_GNU_SOURCE -ansi -ggdb -D_REENTRANT -Werror
-ggdb conftest
.c -lpthread >&5
cc1: warnings being treated as errors
conftest.c:67: warning: conflicting types for built-in function 'printf'
configure:11204: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_XXXXXXX
| #define PACKAGE_XXXXXXXXXX
| #define PACKAGE_XXXXXXXXXX
| #define PACKAGE_XXXXXXXXX
| #define PACKAGE_XXXXXXXXXXXX
| #define PACKAGE_XXXXXX
| #define PACKAGE XXXXXXX
| #define VERSION XXXXXXX
| #define linux 1
| #define unix 1
| #define DEBUG 1
| #define ENABLE_LOCATED_MESSAGES 1
| #define CBASE_GENSRC_ERROR_NAMES 1
| #define CLOG_ENABLE_LOW_LEVEL_MESSAGES 1
| #define ENABLE_MALLOC_TRACE 1
| #define ENABLE_UNITTESTS 1
| #define HAVE_CONFIG_SYS_H 1
| #define ENABLE_CCSLOT_LOADER 1
| #define THREADSAFE 1
| #define HAVE_LIBPTHREAD 1
| #define HAVE_PTHREAD_H 1
| #define ENABLE_MULTITHREAD 1
| #define _FILE_OFFSET_BITS 64
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_ERRNO_H 1
| #define HAVE_TIME_H 1
| #define HAVE_CTYPE_H 1
| #define HAVE_TERMIOS_H 1
| #define HAVE_TCSETATTR 1
| #define HAVE_SYS_SELECT_H 1
| #define HAVE_SELECT 1
| #define HAVE_LOCALTIME_R 1
| /* end confdefs.h. */
| /* Define printf to an innocuous variant, in case <limits.h> declares printf.
| For example, HP-UX 11i <limits.h> declares gettimeofday. */
| #define printf innocuous_printf
|
| /* System header to define __stub macros and hopefully few prototypes,
| which can conflict with char printf (); below.
| Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
| <limits.h> exists even on freestanding compilers. */
|
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|
| #undef printf
|
| /* Override any GCC internal prototype to avoid an error.
| Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern "C"
| #endif
| char printf ();
| /* The GNU C library defines this for functions which it implements
| to always fail with ENOSYS. Some functions are actually named
| something starting with __ and the normal name is an alias. */
| #if defined __stub_printf || defined __stub___printf
| choke me
| #endif
|
| int
| main ()
| {
| return printf ();
| ;
| return 0;
| }
configure:11204: result: no
configure:11215: checking for psyPeripheralResultWait
- AC_CHECK_FUNCS and gcc with -Werror,
Steffen Dettmer <=
- Re: AC_CHECK_FUNCS and gcc with -Werror, Ralf Corsepius, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Eric Blake, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Steffen Dettmer, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Eric Blake, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Ralf Corsepius, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Steffen Dettmer, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Peter Breitenlohner, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Russ Allbery, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Steffen Dettmer, 2010/03/03
- Re: AC_CHECK_FUNCS and gcc with -Werror, Russ Allbery, 2010/03/03