cleanup of long long int atoi test.
This commit is contained in:
parent
5a3fa95c39
commit
d62c25d452
@ -10,7 +10,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.33 1999/07/09 17:40:31 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.34 1999/07/10 17:03:33 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -76,7 +76,7 @@ pg_atoi(char *s, int size, int c)
|
|||||||
switch (size)
|
switch (size)
|
||||||
{
|
{
|
||||||
case sizeof(int32):
|
case sizeof(int32):
|
||||||
#if defined(HAVE_LONG_INT_64) || defined(HAVE_LONG_LONG_INT_64)
|
#if defined(HAVE_LONG_INT_64)
|
||||||
/* won't get ERANGE on these with 64-bit longs... */
|
/* won't get ERANGE on these with 64-bit longs... */
|
||||||
if (l < INT_MIN)
|
if (l < INT_MIN)
|
||||||
{
|
{
|
||||||
@ -88,7 +88,7 @@ pg_atoi(char *s, int size, int c)
|
|||||||
errno = ERANGE;
|
errno = ERANGE;
|
||||||
elog(ERROR, "pg_atoi: error reading \"%s\": %m", s);
|
elog(ERROR, "pg_atoi: error reading \"%s\": %m", s);
|
||||||
}
|
}
|
||||||
#endif /* HAVE_LONG_INT_64 or HAVE_LONG_LONG_INT_64 */
|
#endif /* HAVE_LONG_INT_64 */
|
||||||
break;
|
break;
|
||||||
case sizeof(int16):
|
case sizeof(int16):
|
||||||
if (l < SHRT_MIN)
|
if (l < SHRT_MIN)
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#define USE_POSIX_TIME
|
#define USE_POSIX_TIME
|
||||||
#define DISABLE_XOPEN_NLS
|
#define DISABLE_XOPEN_NLS
|
||||||
#define HAS_LONG_LONG
|
|
||||||
#define HAS_TEST_AND_SET
|
#define HAS_TEST_AND_SET
|
||||||
#include <sys/mman.h> /* for msemaphore */
|
#include <sys/mman.h> /* for msemaphore */
|
||||||
typedef msemaphore slock_t;
|
typedef msemaphore slock_t;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user