Current-Users archive

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

gcc header inclusion in netbsd-current

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>
#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


Home | Main Index | Thread Index | Old Index