diff options
author | Olivier Hainque <hainque@adacore.com> | 2012-01-03 11:44:34 +0000 |
---|---|---|
committer | Olivier Hainque <hainque@gcc.gnu.org> | 2012-01-03 11:44:34 +0000 |
commit | 75291c57b91d9a328fbb19dcc01195fb1ddc8468 (patch) | |
tree | d01ba43fca5c02d7240ec034eebf92403ed711a2 /libcpp | |
parent | 6588d71129e681d39f02cf62cf73cc94dce23781 (diff) | |
download | gcc-75291c57b91d9a328fbb19dcc01195fb1ddc8468.zip gcc-75291c57b91d9a328fbb19dcc01195fb1ddc8468.tar.gz gcc-75291c57b91d9a328fbb19dcc01195fb1ddc8468.tar.bz2 |
system.h: Prior to #define, #undef fopen and freopen unconditionally.
gcc/
* system.h: Prior to #define, #undef fopen and freopen unconditionally.
libcpp/
* system.h: Likewise.
From-SVN: r182837
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/ChangeLog | 4 | ||||
-rw-r--r-- | libcpp/system.h | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 261b8a5..dfe18d0 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -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. diff --git a/libcpp/system.h b/libcpp/system.h index 0f15e12..2a1f709 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) |