bug-gnulib
[Top][All Lists]
Advanced

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

Re: ignore-value vs off_t


From: Simon Josefsson
Subject: Re: ignore-value vs off_t
Date: Mon, 31 Jan 2011 15:56:56 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux)

Eric Blake <address@hidden> writes:

> On 01/30/2011 01:29 AM, Simon Josefsson wrote:
>> Looks like the off_t definition is not getting pulled in by
>> test-ignore-value.c?  I pushed the patch below.
>
> <stdio.h> is required to provide off_t, at least, when POSIX is in
> effect.  Which platform did you encounter the failure on, and was our
> replacement <stdio.h> in effect, or is this a missing test dependency on
> the extensions module?

This was on a relatively vanilla Debian squeeze amd64 machine.  I
suppose it is a bug?  I wonder if it exists in recent glibc as well.
According to

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdio.h.html

you are right that stdio.h really should provide off_t.

address@hidden:~$ /lib/libc.so.6 | head -1
GNU C Library (Debian EGLIBC 2.11.2-10) stable release version 2.11.2, by 
Roland McGrath et al.
address@hidden:~$ gcc --version|head -1
gcc (Debian 4.4.5-8) 4.4.5
address@hidden:~$ cat>foo.c
#include <stdio.h>
int main (void)
{
  off_t foo;
}
address@hidden:~$ gcc -o foo foo.c
foo.c: In function ‘main’:
foo.c:4: error: ‘off_t’ undeclared (first use in this function)
foo.c:4: error: (Each undeclared identifier is reported only once
foo.c:4: error: for each function it appears in.)
foo.c:4: error: expected ‘;’ before ‘foo’
address@hidden:~$ 

/Simon

>> address@hidden:~/src/gnulib$ gnulib-tool --test --with-tests ignore-value
>> ...
>> gcc -DHAVE_CONFIG_H -I. -I../../gltests  -DGNULIB_STRICT_CHECKING=1 -I. 
>> -I../../gltests -I.. -I../../gltests/.. -I../gllib -I../../gltests/../gllib  
>>  -g -O2 -MT test-ignore-value.o -MD -MP -MF .deps/test-ignore-value.Tpo -c 
>> -o test-ignore-value.o ../../gltests/test-ignore-value.c
>> ../../gltests/test-ignore-value.c:37: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ 
>> or ‘__attribute__’ before ‘doOff’
>> ../../gltests/test-ignore-value.c:54: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ 
>> or ‘__attribute__’ before ‘doOff’
>> make[4]: *** [test-ignore-value.o] Fel 1
>> 



reply via email to

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