This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Undefine fopen macro in system.h for VMS


system.h defines fopen, if fopen is already a macro as it is on VMS, then it must be undefined first.

OK to commit?

--Douglas Rupp
AdaCore
2009-07-24  Douglas B Rupp  <rupp@gnat.com>

	* system.h (fopen): Undefine if macro.

diff -rupN gcc/system.h gcc/system.h
--- gcc/system.h	2008-07-28 07:33:56.000000000 -0700
+++ gcc/system.h	2009-01-22 22:23:22.000000000 -0800
@@ -46,6 +46,9 @@ along with GCC; see the file COPYING3.  
 #endif
 
 /* Use the unlocked open routines from libiberty.  */
+#ifdef fopen /* fopen is a #define on VMS.  */
+#undef fopen
+#endif
 #define fopen(PATH,MODE) fopen_unlocked(PATH,MODE)
 #define fdopen(FILDES,MODE) fdopen_unlocked(FILDES,MODE)
 #define freopen(PATH,MODE,STREAM) freopen_unlocked(PATH,MODE,STREAM)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]