------- Comment #5 from dave dot korn dot cygwin at gmail dot com 2009-07-04 15:56 ------- (In reply to comment #4) > (In reply to comment #2) > > Might be safer to rename to GNAT_FOPEN or something like that? FOPEN is > > likely > > to be taken on more than one platform. > > Which line are you suggesting I test change? I initially thought you meant to > just change line no. 58 into reading > > Index: gcc/ada/adaint.h > =================================================================== > --- gcc/ada/adaint.h (revision 149128) > +++ gcc/ada/adaint.h (working copy) > @@ -55,7 +55,7 @@ > #define LSTAT lstat64 > #define STRUCT_STAT struct stat64 > #else > -#define FOPEN fopen > +#define GNAT_FOPEN fopen > #define STAT stat > #define FSTAT fstat > #define LSTAT lstat > > but that just got me into this error:
> ../../gcc/gcc/ada/adaint.c: In function `__gnat_fopen': > ../../gcc/gcc/ada/adaint.c:778: error: called object is not a function It's no good just changing the definition if you don't change the use as well! That's the line of adaint.c that references the FOPEN macro; it's now picking up whatever the system definition of FOPEN is that cause the probem in the first place, which probably makes for mangled gibberish source code. Change it to also use GNAT_FOPEN! (Also before this patch would be ready for mainline it would also be necessary to change the 64-bit definition of FOPEN to GNAT_FOPEN as well.) $ grep -n FOPEN adaint.* adaint.c:778: return FOPEN (path, mode); adaint.h:52:#define FOPEN fopen64 adaint.h:58:#define FOPEN fopen -- dave dot korn dot cygwin at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dave dot korn dot cygwin at | |gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40578