bug-gnulib
[Top][All Lists]
Advanced

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

flock fails on sparc-sun-solaris2.6


From: Tom G. Christensen
Subject: flock fails on sparc-sun-solaris2.6
Date: Tue, 9 Dec 2008 22:27:39 +0100
User-agent: Mutt/1.4.2.2i

Hello,

Using Simons daily-build script I got this failure:
depbase=`echo flock.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
        gcc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DNO_XMALLOC 
-DEXEEXT=\"\" -I. -I..  -I../intl -D_REENTRANT  -g -O2 -MT flock.o -MD -MP -MF 
$depbase.Tpo -c -o flock.o flock.c &&\
        mv -f $depbase.Tpo $depbase.Po
flock.c:215:2: error: #error "This platform lacks flock function, and Gnulib 
doesn't provide a replacement. This is a bug in Gnulib."
make[4]: *** [flock.o] Error 1

This seems to be caused by a bug in flock.c, it checks for HAVE_FLOCK_L_TYPE
but should actually check for HAVE_STRUCT_FLOCK_L_TYPE.

Fixing that it fails thusly:
depbase=`echo flock.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
        gcc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" -DNO_XMALLOC 
-DEXEEXT=\"\" -I. -I..  -I../intl -D_REENTRANT  -g -O2 -MT flock.o -MD -MP -MF 
$depbase.Tpo -c -o flock.o flock.c &&\
        mv -f $depbase.Tpo $depbase.Po
flock.c: In function 'flock':
flock.c:186: warning: implicit declaration of function 'memset'
flock.c:186: warning: incompatible implicit declaration of built-in function 
'memset'
flock.c:202: error: 'errno' undeclared (first use in this function)
flock.c:202: error: (Each undeclared identifier is reported only once
flock.c:202: error: for each function it appears in.)
flock.c:202: error: 'EINVAL' undeclared (first use in this function)
flock.c:207: error: 'EACCES' undeclared (first use in this function)
flock.c:208: error: 'EAGAIN' undeclared (first use in this function)
make[2]: *** [flock.o] Error 1

Adding #include <errno.h> takes care of this error.

test-flock then fails like this:
$ ./test-flock
test-flock.c:72: assertion failed, errno = 22
Abort (core dumped)

-tgc




reply via email to

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