Catch up with ansi.h rev. 1.12: define SIZE_T_MAX and SSIZE_MAX as long

integer constants in ELF environments.
This commit is contained in:
kleink 2001-04-15 14:16:08 +00:00
parent 80ad23a5da
commit c544d84b41
1 changed files with 9 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: limits.h,v 1.10 2000/08/08 22:31:14 tshiozak Exp $ */
/* $NetBSD: limits.h,v 1.11 2001/04/15 14:16:08 kleink Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@ -61,7 +61,11 @@
#define LONG_MIN (-0x7fffffffL-1)/* min value for a long */
#if !defined(_ANSI_SOURCE)
#ifdef __ELF__
#define SSIZE_MAX LONG_MAX /* max value for a ssize_t */
#else
#define SSIZE_MAX INT_MAX /* max value for a ssize_t */
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L
@ -71,7 +75,11 @@
#endif
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
#ifdef __ELF__
#define SIZE_T_MAX ULONG_MAX /* max value for a size_t */
#else
#define SIZE_T_MAX UINT_MAX /* max value for a size_t */
#endif
#define UQUAD_MAX 0xffffffffffffffffULL /* max unsigned quad */
#define QUAD_MAX 0x7fffffffffffffffLL /* max signed quad */