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
This commit is contained in:
Kaveh R. Ghazi 2000-06-09 14:37:56 +00:00 committed by Kaveh Ghazi
parent e95b1e6a2e
commit e0fcc0e1d4
3 changed files with 12 additions and 6 deletions

View File

@ -1,3 +1,10 @@
2000-06-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* system.h (SSIZE_MAX): Delete backup definition.
* cppfiles.c (read_include_file): Use INTTYPE_MAXIMUM(ssize_t)
instead of SSIZE_MAX.
2000-06-09 Jakub Jelinek <jakub@redhat.com> 2000-06-09 Jakub Jelinek <jakub@redhat.com>
* configure.in: Check whether gas supports -relax. * configure.in: Check whether gas supports -relax.

View File

@ -727,8 +727,11 @@ read_include_file (pfile, fd, ihash)
the max size of a file might be bigger than the address the max size of a file might be bigger than the address
space. We can't handle a file that large. (Anyone with space. We can't handle a file that large. (Anyone with
a single source file bigger than 2GB needs to rethink a single source file bigger than 2GB needs to rethink
their coding style.) */ their coding style.) Some systems (e.g. AIX 4.1) define
if (st.st_size > SSIZE_MAX) 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); cpp_error (pfile, "%s is too large", ihash->name);
goto fail; goto fail;

View File

@ -250,10 +250,6 @@ extern int errno;
# define UCHAR_MAX INTTYPE_MAXIMUM (unsigned char) # define UCHAR_MAX INTTYPE_MAXIMUM (unsigned char)
#endif #endif
#ifndef SSIZE_MAX
# define SSIZE_MAX INTTYPE_MAXIMUM (ssize_t)
#endif
#ifdef TIME_WITH_SYS_TIME #ifdef TIME_WITH_SYS_TIME
# include <sys/time.h> # include <sys/time.h>
# include <time.h> # include <time.h>