Nigel said:
To date I have been able to build Perl on Cygwin with no problems but
on a new machine I have had problems. Any version that I try to build
gives error when trying to compile cygwin.c:
nostdio.h:25:14: error: two or more data types in declaration specifiers
#define FILE struct _FILE
Any ideas?
NB: This is not really related to Perl.
You could try to run the .c file through the preprocessor, delete all
preprocessing directives from that and try to compile the
result[*]. This should result in the same error message but you'll find
the actual code the compiler couldn't processed on the corresponding
line of the input file.
[*] Simplistic example based on gcc: When trying to compile following .c file,
------
#define printf (1 + 2)
#include <stdio.h>
int main(void)
{
return 0;
}
------
an error message
In file included from a.c:3:
/usr/include/stdio.h:339: error: expected identifier or '(' before numeric constant
is printed. Line 339 of stdio.h is the printf prototype. Applying the
procedure suggested above,
[rw@sable]/tmp#gcc -E a.c >x.c
[rw@sable]/tmp#ed x.c <<TT
17145
13674
[rw@sable]/tmp#gcc x.c
x.c:418: error: expected identifier or '(' before numeric constant
[rw@sable]/tmp#cat -n x.c | awk '{ if ($1 == 418) print $0; }'
418 extern int (1 + 2) (__const char *__restrict __format, ...);
That's not of much use for this contrived example, but usually helpful
in case of less trivial macro arrangements.