aboutsummaryrefslogtreecommitdiff
path: root/gcc/system.h
diff options
context:
space:
mode:
authorOlivier Hainque <hainque@adacore.com>2012-01-03 11:44:34 +0000
committerOlivier Hainque <hainque@adacore.com>2012-01-03 11:44:34 +0000
commit58f9f550d64870072ad702020ee6dc162b366607 (patch)
treed01ba43fca5c02d7240ec034eebf92403ed711a2 /gcc/system.h
parent0b2d4103d012337496ffc931da4d1e0081e13a14 (diff)
gcc/
* system.h: Prior to #define, #undef fopen and freopen unconditionally. libcpp/ * system.h: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@182837 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/system.h')
-rw-r--r--gcc/system.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/system.h b/gcc/system.h
index 0a943a3a3fe..51520e19f51 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -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)