diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2000-06-09 14:37:56 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2000-06-09 14:37:56 +0000 |
commit | e0fcc0e1d45c26995540b4d9ba0daeee6438f4e3 (patch) | |
tree | 54fc710865f680f1ed64df9778e7453111b44a96 /gcc/cppfiles.c | |
parent | e95b1e6a2ed1031b5ac054f4e457d001a981d726 (diff) | |
download | gcc-e0fcc0e1d45c26995540b4d9ba0daeee6438f4e3.zip gcc-e0fcc0e1d45c26995540b4d9ba0daeee6438f4e3.tar.gz gcc-e0fcc0e1d45c26995540b4d9ba0daeee6438f4e3.tar.bz2 |
system.h (SSIZE_MAX): Delete backup definition.
* system.h (SSIZE_MAX): Delete backup definition.
* cppfiles.c (read_include_file): Use INTTYPE_MAXIMUM(ssize_t)
instead of SSIZE_MAX.
From-SVN: r34467
Diffstat (limited to 'gcc/cppfiles.c')
-rw-r--r-- | gcc/cppfiles.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cppfiles.c b/gcc/cppfiles.c index 71bb657..55250ae 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; |