[Pkg-shadow-devel] Re: [Pkg-shadow-commits] r814 - trunk/debian/patches

Alexander Gattin xrgtn at yandex.ru
Tue Jan 17 21:15:55 UTC 2006


Hi!

On Tue, Jan 17, 2006 at 10:47:34PM +0200, Alexander Gattin wrote:
> Technically, AFAIR, ./configure compiles lot of little
> code snippets to detect appropriate header files etc.
> With "-Wall -Werror" some snippets, e.g. "snprintf", fail
> to compile, I think, not due to lack of snprintf
> definition in standard header files, but just because
> of more strict checking ("-Wall -Werror").

I found where the log is written. So here is an
excerpt:

configure:21628: checking for snprintf
configure:21685: cc -o conftest -g -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -Wall -Werror   conftest.c  >&5
cc1: warnings being treated as errors
conftest.c:105: warning: conflicting types for built-in function 'snprintf'
configure:21691: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "shadow"
| #define VERSION "4.0.14"
| #define _GNU_SOURCE 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 PROTOTYPES 1
| #define HAVE_STRING_H 1
| #define HAVE_DLFCN_H 1
| #ifdef __cplusplus
| extern "C" void std::exit (int) throw (); using std::exit;
| #endif
| #define HAVE_DIRENT_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_ERRNO_H 1
| #define HAVE_FCNTL_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_UTMP_H 1
| #define HAVE_UTMPX_H 1
| #define HAVE_TERMIOS_H 1
| #define HAVE_TERMIO_H 1
| #define HAVE_SGTTY_H 1
| #define HAVE_SYS_IOCTL_H 1
| #define HAVE_SYSLOG_H 1
| #define HAVE_PATHS_H 1
| #define HAVE_UTIME_H 1
| #define HAVE_ULIMIT_H 1
| #define HAVE_SYS_RESOURCE_H 1
| #define HAVE_SHADOW_H 1
| #define HAVE_LASTLOG_H 1
| #define HAVE_LOCALE_H 1
| #define HAVE_RPC_KEY_PROT_H 1
| #define HAVE_A64L 1
| #define HAVE_FCHMOD 1
| #define HAVE_FCHOWN 1
| #define HAVE_FSYNC 1
| #define HAVE_GETGROUPS 1
| #define HAVE_GETHOSTNAME 1
| #define HAVE_GETSPNAM 1
| #define HAVE_GETTIMEOFDAY 1
| #define HAVE_GETUSERSHELL 1
| #define HAVE_GETUTENT 1
| #define HAVE_INITGROUPS 1
| #define HAVE_LCHOWN 1
| #define HAVE_LCKPWDF 1
| #define HAVE_LSTAT 1
| #define HAVE_SETGROUPS 1
| #define HAVE_SIGACTION 1
| #define HAVE_UPDWTMP 1
| #define HAVE_UPDWTMPX 1
| #define const
| #define HAVE_STRUCT_STAT_ST_RDEV 1
| #define TIME_WITH_SYS_TIME 1
| #define TM_IN_SYS_TIME 1
| #define ut_user ut_name
| #define GETGROUPS_T int
| #define RETSIGTYPE int
| #define HAVE_MKDIR 1
| #define HAVE_PUTGRENT 1
| #define HAVE_PUTPWENT 1
| #define HAVE_PUTSPENT 1
| #define HAVE_RENAME 1
| #define HAVE_RMDIR 1
| #define HAVE_SGETSPENT 1
| /* end confdefs.h.  */
| /* Define snprintf to an innocuous variant, in case <limits.h> declares snprintf.
|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
| #define snprintf innocuous_snprintf
| 
| /* System header to define __stub macros and hopefully few prototypes,
|     which can conflict with char snprintf (); 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 snprintf
| 
| /* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| {
| #endif
| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char snprintf ();
| /* 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_snprintf) || defined (__stub___snprintf)
| choke me
| #else
| char (*f) () = snprintf;
| #endif
| #ifdef __cplusplus
| }
| #endif
| 
| int
| main ()
| {
| return f != snprintf;
|   ;
|   return 0;
| }
configure:21715: result: no

So the question remains and other questions arise: does
this qualify as a
1. bug of autoconf?
2. bug of cdbs?

-- 
WBR,
xrgtn



More information about the Pkg-shadow-devel mailing list