Current-Users archive

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

gcc header inclusion in netbsd-current



Hallo,
there is some problem with system header inclusion.
It can be summarized in the example below:
----------------------------------
#include <stddef.h>
int main() {
  size_t testvar;
  return 1;
}
-----------------------------------
test.c: In function `main':
test.c:4: error: `size_t' undeclared (first use in this function)
test.c:4: error: (Each undeclared identifier is reported only once
test.c:4: error: for each function it appears in.)
test.c:4: error: parse error before "testvar"

However, if one includes <string.h> or "/usr/include/stddef.h"
the program compiles fine.
This affects compilation of some pkgsrc packages, one notable
example being lang/gcc34.
Also, curious,
what might the difference be between
#include <stddef.h>
and
#include "/usr/include/stddef.h"
other stddef.h not existing here.
$(uname -a)=NetBSD  5.99.23 NetBSD 5.99.23 (GENERIC) #0: Mon Jan 11 17:47:30 
UTC 2010  
builds%b8.netbsd.org@localhost:/home/builds/ab/HEAD/i386/201001110000Z-obj/home/builds/ab/HEAD/src/sys/arch/i386/compile/GENERIC
 i386

Fulvio


Home | Main Index | Thread Index | Old Index