bug-gnulib
[Top][All Lists]
Advanced

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

[Bug-gnulib] getdate.y problem - 'void unsetenv(); ' vs 'int unsetenv();


From: Mark D. Baushke
Subject: [Bug-gnulib] getdate.y problem - 'void unsetenv(); ' vs 'int unsetenv(); '
Date: Mon, 01 Nov 2004 16:42:04 -0800

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On NetBSD, and FreeBSD and Redhat 7.3 GNU/Linux,

The unsetenv() function is a void function:

% grep unsetenv /usr/include/*.h
/usr/include/stdlib.h:void       unsetenv __P((const char *));
% uname -a
NetBSD ran 1.6.2 NetBSD 1.6.2 (GENERIC) #0: Tue Feb 10 21:53:10 UTC 2004     
address@hidden:/autobuild/netbsd-1-6-PATCH002/i386/OBJ/autobuild/netbsd-1-6-PATCH002/src/sys/arch/i386/compile/GENERIC
 i386
%

So, getdate.y line 1360 has problems:
    ok &= (tz0 ? setenv ("TZ", tz0, 1) : unsetenv ("TZ")) == 0; 

I suggest it is desirable to change getdate.y

    ok &= (tz0 ? setenv ("TZ", tz0, 1) : unsetenv ("TZ"),0) == 0; 


        -- Mark

Example error output taken from ccvs top-of-tree that is using GNULIB
top-of-tree getdate.y :

mkdir obj.netbsd && cd  obj.netbsd
../configure && gmake check
...
source='../../lib/getdate.c' object='getdate.o' libtool=no \
DEPDIR=.deps depmode=gcc /bin/bash ../../depcomp \
gcc -DHAVE_CONFIG_H -I. -I../../lib -I..   -Ino/include  -g -O2 -c 
../../lib/getdate.c
getdate.y: In function `get_date':
getdate.y:1360: void value not ignored as it ought to be
gmake[3]: *** [getdate.o] Error 1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQFBhtfc3x41pRYZE/gRApp9AJ9adkBXez8IYhxrPTYNIl7Ds9yEEACfbkXi
boeycNtwGHenoIGkXxgGTkg=
=CTp6
-----END PGP SIGNATURE-----




reply via email to

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