bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coreutils failure on Mac OS X 10.5


From: Peter O'Gorman
Subject: Re: coreutils failure on Mac OS X 10.5
Date: Tue, 30 Oct 2007 00:17:05 -0500


On Oct 29, 2007, at 10:09 PM, Bruno Haible wrote:

Peter O'Gorman wrote:
/usr/include/stdlib.h has
int    putenv(char *) __DARWIN_ALIAS(putenv);

__DARWIN_ALIAS is defined as:
#define __DARWIN_ALIAS(sym)      __asm("_" __STRING(sym)
__DARWIN_SUF_UNIX03)

__DARWIN_SUF_UNIX03 is defined as "$UNIX2003" for 32 bit builds.

$ grep putenv lib/config.h
/* Define to rpl_putenv if the replacement function should be used. */
#define putenv rpl_putenv

Fortunately, most function replacements in gnulib are now done by
including the original system header and then only doing the
 #define func rpl_func
Only those replacements that use the old idiom of putting
 #define func rpl_func
into config.h are affected.

What's the extent of the problem? The following functions are using the
__DARWIN_ALIAS or similar macros:

dirent.h         closedir opendir __opendir2 rewinddir seekdir telldir
fnmatch.h        fnmatch
ftw.h            ftw nftw
getopt.h         getopt
pthread.h pthread_cancel pthread_cond_init pthread_cond_timedwait pthread_cond_wait pthread_join pthread_mutexattr_destroy
                pthread_rwlock_destroy pthread_rwlock_init
                pthread_rwlock_rdlock pthread_rwlock_tryrdlock
                pthread_rwlock_trywrlock pthread_rwlock_wrlock
                pthread_rwlock_unlock pthread_setcancelstate
pthread_setcanceltype pthread_testcancel pthread_sigmask
regex.h          regcomp
signal.h kill killpg pthread_sigmask sigaltstack sigpause sigsuspend
                sigwait
stdio.h          fputs freopen fwrite tempnam
stdlib.h strtod strtof system initstate putenv realpath setenv setkey
                unsetenv
string.h         strerror
sys/_select.h    select
sys/aio.h        aio_suspend
sys/fcntl.h      open creat fcntl
sys/mman.h       mmap mprotect msync munmap
sys/msg.h        msgctl msgrcv msgsnd
sys/poll.h       poll
sys/resource.h   getrlimit setrlimit
sys/select.h     pselect
sys/sem.h        semctl
sys/semaphore.h  sem_wait
sys/shm.h        shmctl
sys/socket.h accept bind connect getpeername getsockname listen recv
                recvfrom recvmsg send sendmsg sendto socketpair
sys/stat.h       chmod fchmod
sys/termios.h    tcdrain
sys/uio.h        readv writev
sys/wait.h       wait waitpid waitid
time.h           clock mktime strftime strptime nanosleep
unistd.h close confstr encrypt fsync getopt lchown lockf nice pause pread pwrite read setpgrp setregid setreuid sleep ttyname_r
                usleep write setkey getattrlist setattrlist
wchar.h          wcsftime

Out of these, the following are defined with #define in <config.h>:

 realpath
 mktime
poll # not a problem since gnulib's poll.h does not include <poll.h>
 putenv
regcomp # not a problem since gnulib's regex.h does not include <regex.h>
 strtod

Can you please check these functions by doing

./gnulib-tool --test --with-tests canonicalize-lgpl mktime timegm putenv strtod

? Please show the "configure" output as well as all errors shown by "make -k".

We only saw problems in putenv, when it first came up I was quite worried that the issue was widespread, but could not tell this list due to non disclosure agreement. It seems that it is not as big a problem as I had first assumed.

All the tests pass. This is probably because the testsuite does not seem to use the functions at all (probably why you asked for the configure output).

Test output:
PASS: test-alloca-opt
PASS: test-canonicalize-lgpl.sh
PASS: test-malloca
PASS: test-stdlib
PASS: test-time
PASS: test-unistd
==================
All 6 tests passed
==================

Configure Output:

gllib/Makefile.am: installing `build-aux/depcomp'
executing aclocal -I ../glm4
executing autoconf
executing autoheader
executing automake --add-missing --copy
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ../build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... (cached) yes
checking build system type... i386-apple-darwin9.0.0
checking host system type... i386-apple-darwin9.0.0
checking for ranlib... ranlib
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for working alloca.h... yes
checking for alloca... yes
checking whether canonicalize_file_name is declared... no
checking for canonicalize_file_name... no
checking for getcwd... yes
checking for readlink... yes
checking for alarm... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for unistd.h... (cached) yes
checking for stdlib.h... (cached) yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking whether malloc, realloc, calloc are POSIX compliant... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for long long int... yes
checking for inline... inline
checking whether the preprocessor supports include_next... yes
checking for C/C++ restrict keyword... __restrict
checking for struct timespec in <time.h>... yes
checking for alloca as a compiler built-in... rm: conftest.dSYM: is a directory
yes
checking for working mktime... yes
checking for SVID conformant putenv... no
checking for working strtod... yes
checking whether localtime_r is compatible with its POSIX signature... yes
checking for timegm... yes
checking whether timegm is declared... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating gllib/Makefile
config.status: creating glm4/Makefile
config.status: creating config.h
config.status: executing depfiles commands
=== configuring in gltests (/Users/peter/tmp/gnulib/testdir9975/build/ gltests) configure: running /bin/sh ../../gltests/configure '--prefix=/usr/ local' --cache-file=/dev/null --srcdir=../../gltests
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ../../gltests/../build-aux/ install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... ranlib
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for working alloca.h... yes
checking for alloca... yes
checking whether canonicalize_file_name is declared... no
checking for canonicalize_file_name... no
checking for getcwd... yes
checking for readlink... yes
checking for alarm... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for unistd.h... (cached) yes
checking for stdlib.h... (cached) yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking whether malloc, realloc, calloc are POSIX compliant... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for long long int... yes
checking for inline... inline
checking whether the preprocessor supports include_next... yes
checking for C/C++ restrict keyword... __restrict
checking for struct timespec in <time.h>... yes
checking for alloca as a compiler built-in... rm: conftest.dSYM: is a directory
yes
checking for working mktime... yes
checking for SVID conformant putenv... no
checking for working strtod... yes
checking whether localtime_r is compatible with its POSIX signature... yes
checking for timegm... yes
checking whether timegm is declared... yes
configure: creating ./config.status


So, if the functions that do #define foo rpl_foo are modified to use the new method of including the system header and then #defining, I think the problem will go away.

Thank you very much,
Peter







reply via email to

[Prev in Thread] Current Thread [Next in Thread]