Commit 46db8ac7 authored by Bruce Momjian's avatar Bruce Momjian

Backup pg_atoi patch for long checking. Caused initdb problems.

parent ffe00975
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.31 1999/07/08 00:27:01 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.32 1999/07/09 03:27:20 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -76,7 +76,7 @@ pg_atoi(char *s, int size, int c) ...@@ -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) #ifdef HAS_LONG_LONG
/* 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) ...@@ -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 /* HAS_LONG_LONG */
break; break;
case sizeof(int16): case sizeof(int16):
if (l < SHRT_MIN) if (l < SHRT_MIN)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment