conflict in FILE and stdio
Hello everyone,
I am porting a legacy program from other platform to Linux. I am using Red Hat Linux Enterprise 4. In the legacy program, there is a macro definition,
Code:
#define __FILE FILE
in the legacy program, __FILE will be used in all the places to stands for FILE.
Here is the program to reproduce this issue and the error message from compile, what is the most efficient way to solve this issue? Looking for your advice.
Code:
#define __FILE FILE
#include <stdio.h>
int main (int argc, char** argv)
{
return 0;
}
[root@localhost test_stdio]# gcc -g -O0 -c foo.c
In file included from /usr/include/stdio.h:72,
from foo.c:2:
/usr/include/libio.h:267: error: redefinition of `struct _IO_FILE'
thanks in advance,
George