This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
cygwin 1.5.24-2 gcc 3.4.4 stdio.h
- From: "Paul Edwards" <mutazilah at gmail dot com>
- To: <newlib at sources dot redhat dot com>
- Date: Thu, 29 Nov 2007 22:54:50 +1100
- Subject: cygwin 1.5.24-2 gcc 3.4.4 stdio.h
I downloaded cygwin 1.5.24-2 (just a couple of weeks ago) and
compiled the following program with "gcc -ansi fred.c"
(NOTE the "-ansi" keyword):
#define pid_t fred was here
#include <stdio.h>
int main(void)
{
printf("hello, world\n");
return (0);
}
And got the following result:
In file included from /usr/include/stdio.h:46,
from fred.c:3:
/usr/include/sys/types.h:180: error: parse error before "was"
In file included from /usr/include/sys/types.h:373,
from /usr/include/stdio.h:46,
from fred.c:3:
/usr/include/cygwin/types.h:146: error: parse error before "fred"
ie it is hitting a typedef for pid_t
This is the compiler version:
gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
"-ansi" is meant to mask all the Posix stuff and just provide pure ANSI C89 headers.
I asked about this on the Cygwin mailing list and they directed me here.
If someone can give me some guidance, I can probably make the changes
that will remove the non-ANSI stuff that are affecting me, and send a
context diff if someone can process that. Can anyone help?
BFN. Paul.