Bruno Haible <br...@clisp.org> writes: >> >> In file included from unictype/test-combiningclass_name.c:17: >> >> ./config.h:1990:1: warning: "HAVE_DECL_TCGETSID" redefined >> >> In file included from ./config.h:64, >> >> from unictype/test-combiningclass_name.c:17: >> >> ./../config.h:1975:1: warning: this is the location of the >> >> previous definition >> > >> > What is the result of >> > $ grep -i tcgetsid config.status gltests/config.status >> >> Same on both hurd and debian squeeze: >> >> config.status:S["HAVE_DECL_TCGETSID"]="0" >> config.status:S["GNULIB_TCGETSID"]="1" >> config.status:D["HAVE_DECL_TCGETSID"]=" 0" >> config.status:D["HAVE_TCGETSID"]=" 1" >> config.status:D["GNULIB_TEST_TCGETSID"]=" 1" >> config.status:D["HAVE_RAW_DECL_TCGETSID"]=" 1" >> gltests/config.status:S["HAVE_DECL_TCGETSID"]="1" >> gltests/config.status:S["GNULIB_TCGETSID"]="1" >> gltests/config.status:D["HAVE_DECL_TCGETSID"]=" 1" >> gltests/config.status:D["HAVE_TCGETSID"]=" 1" >> gltests/config.status:D["GNULIB_TEST_TCGETSID"]=" 1" >> gltests/config.status:D["HAVE_RAW_DECL_TCGETSID"]=" 1" > > Since in both cases the 'tcgetsid' module is present, which depends on > 'extensions', so that _GNU_SOURCE gets defined, which causes the declaration > of tcgetsid() to be enabled, I'm wondering why this: > > config.status:S["HAVE_DECL_TCGETSID"]="0" > > config.status:D["HAVE_DECL_TCGETSID"]=" 0" > > Can you look in config.log what gcc error caused this wrong value for > HAVE_DECL_TCGETSID?
The gltests/config.log file contains: configure:30414: checking whether tcgetsid is declared configure:30414: result: yes however ./config.log contains the content below. What's interesting is that there is no #include <termios.h> which I believe is needed? I'm not sure why the check in gltests/ works, but maybe other headers are enabled there, and the tcgetsid prototype gets defined indirectly. /Simon configure:30410: checking whether tcgetsid is declared configure:30410: gcc -std=gnu99 -c -g -O2 conftest.c >&5 conftest.c: In function 'main': conftest.c:471: error: 'tcgetsid' undeclared (first use in this function) conftest.c:471: error: (Each undeclared identifier is reported only once conftest.c:471: error: for each function it appears in.) configure:30410: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "dummy" | #define PACKAGE_TARNAME "dummy" | #define PACKAGE_VERSION "0" | #define PACKAGE_STRING "dummy 0" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define PACKAGE "dummy" | #define VERSION "0" | #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 __EXTENSIONS__ 1 | #define _ALL_SOURCE 1 | #define _DARWIN_C_SOURCE 1 | #define _GNU_SOURCE 1 | #define _POSIX_PTHREAD_SEMANTICS 1 | #define _TANDEM_SOURCE 1 | #define HAVE_FSEEKO 1 | #define HAVE_FSEEKO 1 | #define HAVE_FSEEKO 1 | #define HAVE_SYS_SOCKET_H 1 | #define HAVE_FEATURES_H 1 | #define HAVE_ARPA_INET_H 1 | #define HAVE_UCONTEXT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_SYS_PARAM_H 1 | #define HAVE_UTIME_H 1 | #define HAVE_DIRENT_H 1 | #define HAVE_XLOCALE_H 1 | #define HAVE_LIBGEN_H 1 | #define HAVE_WCTYPE_H 1 | #define HAVE_PTY_H 1 | #define HAVE_STDIO_EXT_H 1 | #define HAVE_SYS_VFS_H 1 | #define HAVE_SYS_MMAN_H 1 | #define HAVE_NETDB_H 1 | #define HAVE_NETINET_IN_H 1 | #define HAVE_GETOPT_H 1 | #define HAVE_TERMIOS_H 1 | #define HAVE_SYS_TIME_H 1 | #define HAVE_GRP_H 1 | #define HAVE_SYS_CDEFS_H 1 | #define HAVE_ICONV_H 1 | #define HAVE_WCHAR_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_LANGINFO_H 1 | #define HAVE_MATH_H 1 | #define HAVE_SYS_SELECT_H 1 | #define HAVE_POLL_H 1 | #define HAVE_SYS_IOCTL_H 1 | #define HAVE_PTHREAD_H 1 | #define HAVE_UTMP_H 1 | #define HAVE_UTMPX_H 1 | #define HAVE_SCHED_H 1 | #define HAVE_SEARCH_H 1 | #define HAVE_SPAWN_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_FILE_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TIMES_H 1 | #define HAVE_SYS_UIO_H 1 | #define HAVE_SYS_UTSNAME_H 1 | #define HAVE_SYS_WAIT_H 1 | #define HAVE_SYSEXITS_H 1 | #define HAVE_SHUTDOWN 1 | #define HAVE_STRUCT_SOCKADDR_STORAGE 1 | #define HAVE_SA_FAMILY_T 1 | #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 | #define HAVE_RAW_DECL_SOCKET 1 | #define HAVE_RAW_DECL_CONNECT 1 | #define HAVE_RAW_DECL_ACCEPT 1 | #define HAVE_RAW_DECL_BIND 1 | #define HAVE_RAW_DECL_GETPEERNAME 1 | #define HAVE_RAW_DECL_GETSOCKNAME 1 | #define HAVE_RAW_DECL_GETSOCKOPT 1 | #define HAVE_RAW_DECL_LISTEN 1 | #define HAVE_RAW_DECL_RECV 1 | #define HAVE_RAW_DECL_SEND 1 | #define HAVE_RAW_DECL_RECVFROM 1 | #define HAVE_RAW_DECL_SENDTO 1 | #define HAVE_RAW_DECL_SETSOCKOPT 1 | #define HAVE_RAW_DECL_SHUTDOWN 1 | #define HAVE_RAW_DECL_ACCEPT4 1 | #define HAVE_ACCEPT4 1 | #define HAVE_FLOCKFILE 1 | #define HAVE_FUNLOCKFILE 1 | #define HAVE_PATHCONF 1 | #define HAVE_BTOWC 1 | #define HAVE_SETRLIMIT 1 | #define HAVE_SIGALTSTACK 1 | #define HAVE_CANONICALIZE_FILE_NAME 1 | #define HAVE_REALPATH 1 | #define HAVE_GETCWD 1 | #define HAVE_READLINK 1 | #define HAVE_READLINKAT 1 | #define HAVE_CHOWN 1 | #define HAVE_FCHOWN 1 | #define HAVE_FCHDIR 1 | #define HAVE_FDOPENDIR 1 | #define HAVE_DPRINTF 1 | #define HAVE_DUP2 1 | #define HAVE_DUP3 1 | #define HAVE_DUPLOCALE 1 | #define HAVE_FACCESSAT 1 | #define HAVE_ACCESS 1 | #define HAVE___FLBF 1 | #define HAVE_FCNTL 1 | #define HAVE_FFS 1 | #define HAVE_FFSL 1 | #define HAVE_FFSLL 1 | #define HAVE_MEMPCPY 1 | #define HAVE_FLOCK 1 | #define HAVE_ISBLANK 1 | #define HAVE_ISWCTYPE 1 | #define HAVE_MBSRTOWCS 1 | #define HAVE_WMEMCHR 1 | #define HAVE_WMEMCPY 1 | #define HAVE_WMEMPCPY 1 | #define HAVE___FPENDING 1 | #define HAVE___FPURGE 1 | #define HAVE___FREADABLE 1 | #define HAVE___FREADING 1 | #define HAVE_FSYNC 1 | #define HAVE_STRTOF 1 | #define HAVE_FSTATFS 1 | #define HAVE_FUTIMENS 1 | #define HAVE___FWRITABLE 1 | #define HAVE___FWRITING 1 | #define HAVE_MPROTECT 1 | #define HAVE_GETDELIM 1 | #define HAVE_GETDTABLESIZE 1 | #define HAVE_GETLOGIN 1 | #define HAVE_GETLOGIN_R 1 | #define HAVE___FSETLOCKING 1 | #define HAVE_TCGETATTR 1 | #define HAVE_TCSETATTR 1 | #define HAVE_GETSUBOPT 1 | #define HAVE_GETTIMEOFDAY 1 | #define HAVE_GETUSERSHELL 1 | #define HAVE_FSTATAT 1 | #define HAVE_GETPWNAM_R 1 | #define HAVE_GETUID 1 | #define HAVE_GETEUID 1 | #define HAVE_GETRESUID 1 | #define HAVE_GETGID 1 | #define HAVE_GETEGID 1 | #define HAVE_GETRESGID 1 | #define HAVE_SETRESUID 1 | #define HAVE_SETREUID 1 | #define HAVE_SETEUID 1 | #define HAVE_SETRESGID 1 | #define HAVE_SETREGID 1 | #define HAVE_SETEGID 1 | #define HAVE_ISWCNTRL 1 | #define HAVE_ISWBLANK 1 | #define HAVE_LINK 1 | #define HAVE_LINKAT 1 | #define HAVE_SYMLINK 1 | #define HAVE_LSTAT 1 | #define HAVE_MBSINIT 1 | #define HAVE_MBRTOWC 1 | #define HAVE_MBRLEN 1 | #define HAVE_MBSNRTOWCS 1 | #define HAVE_ISASCII 1 | #define HAVE_MEMCHR 1 | #define HAVE_GETGROUPLIST 1 | #define HAVE_FCHMOD 1 | #define HAVE_MKFIFO 1 | #define HAVE_MKFIFOAT 1 | #define HAVE_MKNODAT 1 | #define HAVE_MKNOD 1 | #define HAVE_MKOSTEMP 1 | #define HAVE_MKOSTEMPS 1 | #define HAVE_MKSTEMP 1 | #define HAVE_MKSTEMPS 1 | #define HAVE_ALARM 1 | #define HAVE_NL_LANGINFO 1 | #define HAVE_OBSTACK_PRINTF 1 | #define HAVE_POSIX_MEMALIGN 1 | #define HAVE_RECVMSG 1 | #define HAVE_SENDMSG 1 | #define HAVE_STRERROR_R 1 | #define HAVE___XPG_STRERROR_R 1 | #define HAVE_SELECT 1 | #define HAVE_PIPE 1 | #define HAVE_PIPE2 1 | #define HAVE_POSIX_SPAWN 1 | #define HAVE_PREAD 1 | #define HAVE_PSELECT 1 | #define HAVE_PWRITE 1 | #define HAVE_UTMPNAME 1 | #define HAVE_UTMPXNAME 1 | #define HAVE_WCSCOLL 1 | #define HAVE_SETENV 1 | #define HAVE_RENAMEAT 1 | #define HAVE_SETTIMEOFDAY 1 | #define HAVE_STIME 1 | #define HAVE_SIGACTION 1 | #define HAVE_SIGINTERRUPT 1 | #define HAVE_SLEEP 1 | #define HAVE_STPNCPY 1 | #define HAVE_STRDUP 1 | #define HAVE_CATGETS 1 | #define HAVE_TZSET 1 | #define HAVE_STRNDUP 1 | #define HAVE_STRPTIME 1 | #define HAVE_SYMLINKAT 1 | #define HAVE_LOCALTIME_R 1 | #define HAVE_TIMEGM 1 | #define HAVE_TIMES 1 | #define HAVE_STPCPY 1 | #define HAVE_USLEEP 1 | #define HAVE_FUTIMES 1 | #define HAVE_FUTIMESAT 1 | #define HAVE_UTIMENSAT 1 | #define HAVE_LUTIMES 1 | #define HAVE_VDPRINTF 1 | #define HAVE_WCPCPY 1 | #define HAVE_WCPNCPY 1 | #define HAVE_WCRTOMB 1 | #define HAVE_WCSCASECMP 1 | #define HAVE_WCSCAT 1 | #define HAVE_WCSCHR 1 | #define HAVE_WCSCMP 1 | #define HAVE_WCSCPY 1 | #define HAVE_WCSCSPN 1 | #define HAVE_WCSDUP 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCSNCASECMP 1 | #define HAVE_WCSNCAT 1 | #define HAVE_WCSNCMP 1 | #define HAVE_WCSNCPY 1 | #define HAVE_WCSNLEN 1 | #define HAVE_WCSNRTOMBS 1 | #define HAVE_WCSPBRK 1 | #define HAVE_WCSRCHR 1 | #define HAVE_WCSRTOMBS 1 | #define HAVE_WCSSPN 1 | #define HAVE_WCSSTR 1 | #define HAVE_WCSTOK 1 | #define HAVE_WCWIDTH 1 | #define HAVE_WCSWIDTH 1 | #define HAVE_WCSXFRM 1 | #define HAVE_WCTOB 1 | #define HAVE_WMEMCMP 1 | #define HAVE_WMEMMOVE 1 | #define HAVE_WMEMSET 1 | #define HAVE_FREXPL 1 | #define HAVE_LDEXPL 1 | #define HAVE_ALLOCA_H 1 | #define HAVE_ALLOCA 1 | #define restrict __restrict | #define HAVE_DECL_CLEARERR_UNLOCKED 1 | #define HAVE_DECL_FEOF_UNLOCKED 1 | #define HAVE_DECL_FERROR_UNLOCKED 1 | #define HAVE_DECL_FFLUSH_UNLOCKED 1 | #define HAVE_DECL_FGETS_UNLOCKED 1 | #define HAVE_DECL_FPUTC_UNLOCKED 1 | #define HAVE_DECL_FPUTS_UNLOCKED 1 | #define HAVE_DECL_FREAD_UNLOCKED 1 | #define HAVE_DECL_FWRITE_UNLOCKED 1 | #define HAVE_DECL_GETC_UNLOCKED 1 | #define HAVE_DECL_GETCHAR_UNLOCKED 1 | #define HAVE_DECL_PUTC_UNLOCKED 1 | #define HAVE_DECL_PUTCHAR_UNLOCKED 1 | #define HAVE_UNSIGNED_LONG_LONG_INT 1 | #define HAVE_LONG_LONG_INT 1 | #define D_INO_IN_DIRENT 1 | #define HAVE_LONG_FILE_NAMES 1 | #define HAVE_LANGINFO_CODESET 1 | #define FAULT_YIELDS_SIGBUS 0 | #define HAVE_STACK_OVERFLOW_HANDLING 1 | #define HAVE_C99_STRTOLD 1 | #define FUNC_REALPATH_WORKS 1 | #define HAVE_UNISTD_H 1 | #define HAVE_CHOWN 1 | #define USE_POSIX_THREADS 1 | #define USE_POSIX_THREADS_WEAK 1 | #define HAVE_DECL_FLOORL 1 | #define HAVE_STDINT_H_WITH_UINTMAX 1 | #define HAVE_INTTYPES_H_WITH_UINTMAX 1 | #define CHECK_PRINTF_SAFE 1 | #define HAVE_WCHAR_T 1 | #define HAVE_WINT_T 1 | #define HAVE_INTMAX_T 1 | #define HAVE_SNPRINTF 1 | #define HAVE_STRNLEN 1 | #define HAVE_WCSLEN 1 | #define HAVE_WCSNLEN 1 | #define HAVE_MBRTOWC 1 | #define HAVE_WCRTOMB 1 | #define HAVE_DECL__SNPRINTF 0 | #define HAVE_SNPRINTF_RETVAL_C99 1 | #define HAVE_RAW_DECL_SETLOCALE 1 | #define HAVE_RAW_DECL_DUPLOCALE 1 | #define HAVE_STDLIB_H 1 | #define MALLOC_0_IS_NONNULL 1 | #define HAVE_STDLIB_H 1 | #define REALLOC_0_IS_NONNULL 1 | #define HAVE_ENVIRON_DECL 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_STRERROR_R 1 | #define STRERROR_R_CHAR_P 1 | #define HAVE_DECL_SETREGID 1 | #define GETGROUPS_T gid_t | #define HAVE_GETGROUPS 1 | #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 | #define PROMOTED_MODE_T mode_t | #define HAVE_FCHMODAT 1 | #define HAVE_FSTATAT 1 | #define HAVE_MKDIRAT 1 | #define HAVE_OPENAT 1 | #define HAVE_UNLINKAT 1 | #define HAVE_SIG_ATOMIC_T 1 | #define HAVE_DECL_FCHDIR 1 | #define HAVE_WORKING_O_NOATIME 1 | #define HAVE_WORKING_O_NOFOLLOW 1 | #define HAVE_DECL_STRMODE 0 | #define HAVE_MBSTATE_T 1 | #define HAVE_RAW_DECL_FORKPTY 1 | #define HAVE_RAW_DECL_OPENPTY 1 | #define HAVE_DECL_FSEEKO 1 | #define HAVE_DECL_FTELLO 1 | #define HAVE_RAW_DECL_GETADDRINFO 1 | #define HAVE_RAW_DECL_FREEADDRINFO 1 | #define HAVE_RAW_DECL_GAI_STRERROR 1 | #define HAVE_RAW_DECL_GETNAMEINFO 1 | #define HAVE_GETHOSTBYNAME 1 | #define HAVE_GETSERVBYNAME 1 | #define HAVE_DECL_INET_NTOP 1 | #define HAVE_IPV4 1 | #define HAVE_IPV6 1 | #define HAVE_DECL_GETCWD 1 | #define HAVE_DECL_GETDELIM 1 | #define HAVE_DECL_GETLINE 1 | #define HAVE_DECL_GETLOGIN_R 1 | #define HAVE_DECL_GETLOGIN 1 | #define HAVE_GETOPT_H 1 | #define HAVE_GETOPT_LONG_ONLY 1 | #define __GETOPT_PREFIX rpl_ | #define HAVE_DECL_GETENV 1 | #define HAVE_DECL_GETPASS 1 | #define HAVE_DECL_FLOCKFILE 1 | #define HAVE_DECL_FUNLOCKFILE 1 | #define HAVE_RAW_DECL_GETTIMEOFDAY 1 | #define HAVE_ICONV 1 | #define ICONV_CONST | #define HAVE_DECL_IMAXABS 1 | #define HAVE_DECL_IMAXDIV 1 | #define GL_TRIGGER_STDC_LIMIT_MACROS 1 | #define HAVE_RAW_DECL_IMAXABS 1 | #define HAVE_RAW_DECL_IMAXDIV 1 | #define HAVE_RAW_DECL_STRTOIMAX 1 | #define HAVE_RAW_DECL_STRTOUMAX 1 | #define HAVE_INTTYPES_H 1 | #define FLT_EXPBIT0_WORD 0 | #define FLT_EXPBIT0_BIT 23 | #define HAVE_TOWLOWER 1 | #define HAVE_RAW_DECL_WCTYPE 1 | #define HAVE_RAW_DECL_ISWCTYPE 1 | #define HAVE_RAW_DECL_WCTRANS 1 | #define HAVE_RAW_DECL_TOWCTRANS 1 | #define HAVE_DECL_ISWBLANK 0 | #define HAVE_LIBUNISTRING 1 | #define HAVE_LC_MESSAGES 1 | #define HAVE_MAP_ANONYMOUS 1 | #define HAVE_DECL_MEMMEM 1 | #define HAVE_MEMMEM 1 | #define HAVE_DECL_MEMRCHR 1 | #define HAVE_MINMAX_IN_SYS_PARAM_H 1 | #define HAVE_RAW_DECL_PSELECT 1 | #define HAVE_RAW_DECL_SELECT 1 | #define USER_LABEL_PREFIX | #define HAVE_DECL_OBSTACK_PRINTF 1 | #define HAVE__BOOL 1 | #define HAVE_COMPOUND_LITERALS 1 | #define HAVE_TM_GMTOFF 1 | #define HAVE_DECL_STRERROR_R 1 | #define HAVE_RAW_DECL_POLL 1 | #define NEED_PRINTF_INFINITE_LONG_DOUBLE 1 | #define REPLACE_VFPRINTF_POSIX 1 | #define INSTALLPREFIX "/usr/local" | #define HAVE_DECL_SETENV 1 | #define HAVE_SIGSET_T 1 | #define HAVE_DECL_SNPRINTF 1 | #define HAVE_DECL_STPNCPY 1 | #define HAVE_STRCASESTR 1 | #define HAVE_DECL_STRDUP 1 | #define HAVE_RAW_DECL_FFSL 1 | #define HAVE_RAW_DECL_FFSLL 1 | #define HAVE_RAW_DECL_MEMMEM 1 | #define HAVE_RAW_DECL_MEMPCPY 1 | #define HAVE_RAW_DECL_MEMRCHR 1 | #define HAVE_RAW_DECL_RAWMEMCHR 1 | #define HAVE_RAW_DECL_STPCPY 1 | #define HAVE_RAW_DECL_STPNCPY 1 | #define HAVE_RAW_DECL_STRCHRNUL 1 | #define HAVE_RAW_DECL_STRDUP 1 | #define HAVE_RAW_DECL_STRNCAT 1 | #define HAVE_RAW_DECL_STRNDUP 1 | #define HAVE_RAW_DECL_STRNLEN 1 | #define HAVE_RAW_DECL_STRPBRK 1 | #define HAVE_RAW_DECL_STRSEP 1 | #define HAVE_RAW_DECL_STRCASESTR 1 | #define HAVE_RAW_DECL_STRTOK_R 1 | #define HAVE_RAW_DECL_STRERROR_R 1 | #define HAVE_RAW_DECL_STRSIGNAL 1 | #define HAVE_RAW_DECL_STRVERSCMP 1 | #define HAVE_RAW_DECL_FFS 1 | #define HAVE_RAW_DECL_STRCASECMP 1 | #define HAVE_RAW_DECL_STRNCASECMP 1 | #define HAVE_MAP_ANONYMOUS 1 | #define HAVE_DECL_STRNDUP 1 | #define HAVE_DECL_STRNLEN 1 | #define HAVE_DECL_STRSIGNAL 1 | #define HAVE_DECL_SYS_SIGLIST 1 | #define HAVE_DECL_STRTOD 1 | #define HAVE_DECL_STRTOIMAX 1 | #define HAVE_DECL_STRTOK_R 1 | #define HAVE_DECL_STRTOUMAX 1 | /* end confdefs.h. */ | #include <stdio.h> | #ifdef HAVE_SYS_TYPES_H | # include <sys/types.h> | #endif | #ifdef HAVE_SYS_STAT_H | # include <sys/stat.h> | #endif | #ifdef STDC_HEADERS | # include <stdlib.h> | # include <stddef.h> | #else | # ifdef HAVE_STDLIB_H | # include <stdlib.h> | # endif | #endif | #ifdef HAVE_STRING_H | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | # include <memory.h> | # endif | # include <string.h> | #endif | #ifdef HAVE_STRINGS_H | # include <strings.h> | #endif | #ifdef HAVE_INTTYPES_H | # include <inttypes.h> | #endif | #ifdef HAVE_STDINT_H | # include <stdint.h> | #endif | #ifdef HAVE_UNISTD_H | # include <unistd.h> | #endif | int | main () | { | #ifndef tcgetsid | #ifdef __cplusplus | (void) tcgetsid; | #else | (void) tcgetsid; | #endif | #endif | | ; | return 0; | } configure:30410: result: no