OSDN Git Service

gcc/
authorhainque <hainque@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 3 Jan 2012 11:44:34 +0000 (11:44 +0000)
committerhainque <hainque@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 3 Jan 2012 11:44:34 +0000 (11:44 +0000)
        * system.h: Prior to #define, #undef fopen and freopen unconditionally.

libcpp/
        * system.h: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182837 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/system.h
libcpp/ChangeLog
libcpp/system.h

index c95a7ef..dd3c6d7 100644 (file)
@@ -1,5 +1,9 @@
 2012-01-03  Olivier Hainque  <hainque@adacore.com>
 
+       * system.h: Prior to #define, #undef fopen and freopen unconditionally.
+
+2012-01-03  Olivier Hainque  <hainque@adacore.com>
+
        * collect2.c (main): In AIX specific computations for vector
        insertions, use CONST_CAST2 to cast from char ** to const char **.
 
index 0a943a3..51520e1 100644 (file)
@@ -47,9 +47,14 @@ along with GCC; see the file COPYING3.  If not see
 #endif
 
 /* Use the unlocked open routines from libiberty.  */
-#ifdef fopen /* fopen is a #define on VMS.  */
-#undef fopen
-#endif
+
+/* Some of these are #define on some systems, e.g. on AIX to redirect
+   the names to 64bit capable functions for LARGE_FILES support. These
+   redefs are pointless here so we can override them.  */
+
+#undef fopen 
+#undef freopen 
+
 #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 261b8a5..dfe18d0 100644 (file)
@@ -1,3 +1,7 @@
+2012-01-03  Olivier Hainque  <hainque@adacore.com>
+
+       * system.h: Prior to #define, #undef fopen and freopen unconditionally.
+
 2011-12-20  Joseph Myers  <joseph@codesourcery.com>
 
        * include/cpplib.h (CLK_GNUC1X): Change to CLK_GNUC11.
index 0f15e12..2a1f709 100644 (file)
@@ -44,6 +44,14 @@ along with GCC; see the file COPYING3.  If not see
 #endif
 
 /* Use the unlocked open routines from libiberty.  */
+
+/* Some of these are #define on some systems, e.g. on AIX to redirect
+   the names to 64bit capable functions for LARGE_FILES support. These
+   redefs are pointless here so we can override them.  */
+    
+#undef fopen 
+#undef freopen 
+
 #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)