summaryrefslogtreecommitdiffstats
path: root/gcc/cppfiles.c
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2000-06-09 14:37:56 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2000-06-09 14:37:56 +0000
commitc93ae79ee394900016d2ccb0c14e8a9f56b8e03c (patch)
tree54fc710865f680f1ed64df9778e7453111b44a96 /gcc/cppfiles.c
parent4c3350274afe3652dc3d61bee41e6d5d39930dfe (diff)
downloadppe42-gcc-c93ae79ee394900016d2ccb0c14e8a9f56b8e03c.tar.gz
ppe42-gcc-c93ae79ee394900016d2ccb0c14e8a9f56b8e03c.zip
* system.h (SSIZE_MAX): Delete backup definition.
* cppfiles.c (read_include_file): Use INTTYPE_MAXIMUM(ssize_t) instead of SSIZE_MAX. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34467 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r--gcc/cppfiles.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c
index 71bb657c685..55250aeda07 100644
--- a/gcc/cppfiles.c
+++ b/gcc/cppfiles.c
@@ -727,8 +727,11 @@ read_include_file (pfile, fd, ihash)
the max size of a file might be bigger than the address
space. We can't handle a file that large. (Anyone with
a single source file bigger than 2GB needs to rethink
- their coding style.) */
- if (st.st_size > SSIZE_MAX)
+ their coding style.) Some systems (e.g. AIX 4.1) define
+ SSIZE_MAX to be much smaller than the actual range of the
+ type. Use INTTYPE_MAXIMUM unconditionally to ensure this
+ does not bite us. */
+ if (st.st_size > INTTYPE_MAXIMUM (ssize_t))
{
cpp_error (pfile, "%s is too large", ihash->name);
goto fail;
OpenPOWER on IntegriCloud