summaryrefslogtreecommitdiff
path: root/libcpp/system.h
diff options
context:
space:
mode:
authorhainque <hainque@138bc75d-0d04-0410-961f-82ee72b054a4>2012-01-03 11:44:34 +0000
committerhainque <hainque@138bc75d-0d04-0410-961f-82ee72b054a4>2012-01-03 11:44:34 +0000
commit131e69c711fbeceb3813a4c1889a436b20d60045 (patch)
treed01ba43fca5c02d7240ec034eebf92403ed711a2 /libcpp/system.h
parente4e4eb40024c4b7c41335e42ffbd54a3e826744f (diff)
downloadgcc-131e69c711fbeceb3813a4c1889a436b20d60045.tar.gz
gcc/
* 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
Diffstat (limited to 'libcpp/system.h')
-rw-r--r--libcpp/system.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libcpp/system.h b/libcpp/system.h
index 0f15e12737a..2a1f7096703 100644
--- a/libcpp/system.h
+++ b/libcpp/system.h
@@ -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)