diff --git a/doc/TODO b/doc/TODO
index 0798b7fb86020630654d6712bd6afcbbc560fe38..467ab897b3162d1ba25d190b55e6aabf980015b2 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -36,6 +36,7 @@ PARSER
 * UNION with LIMIT fails
 * Unique index on base column not honored on inserts from inherited table
   INSERT INTO inherit_table (unique_index_col) VALUES (dup) should fail
+*  CREATE TABLE x AS SELECT 1 UNION SELECT 2 fails
 
 VIEWS
 
@@ -175,6 +176,7 @@ MISC
 * Add PL/Perl(Mark Hollomon)
 * Make postgres user have a password by default
 * Add configure test to check for C++ need for *.h and namespaces
+* Allow BLCKSZ <= 64k, not <= 32k
 
 PERFORMANCE
 -----------
diff --git a/src/backend/utils/adt/numutils.c b/src/backend/utils/adt/numutils.c
index 6c1cec51d75206169951c6c966c55f7e756ec620..e975df5e9fb6db811ba9dcd54fe83dfafadc649d 100644
--- a/src/backend/utils/adt/numutils.c
+++ b/src/backend/utils/adt/numutils.c
@@ -10,14 +10,14 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.32 1999/07/09 03:27:20 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.33 1999/07/09 17:40:31 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
 #include <stdio.h>				/* for sprintf() */
 #include <errno.h>
 #include <math.h>
-#ifdef HAVE_LIMITS
+#ifdef HAVE_LIMITS_H
 #include <limits.h>
 #endif
 #include "postgres.h"
@@ -32,19 +32,19 @@
 #define INT_MAX (0x7FFFFFFFL)
 #endif
 #ifndef INT_MIN
-#define INT_MIN (-0x80000000L)
+#define INT_MIN (-INT_MAX-1)
 #endif
 #ifndef SHRT_MAX
 #define SHRT_MAX (0x7FFF)
 #endif
 #ifndef SHRT_MIN
-#define SHRT_MIN (-0x8000)
+#define SHRT_MIN (-SHRT_MAX-1)
 #endif
 #ifndef SCHAR_MAX
 #define SCHAR_MAX (0x7F)
 #endif
 #ifndef SCHAR_MIN
-#define SCHAR_MIN (-0x80)
+#define SCHAR_MIN (-SCHAR_MAX-1)
 #endif
 
 int32
@@ -76,7 +76,7 @@ pg_atoi(char *s, int size, int c)
 	switch (size)
 	{
 		case sizeof(int32):
-#ifdef HAS_LONG_LONG
+#if defined(HAVE_LONG_INT_64) || defined(HAVE_LONG_LONG_INT_64)
 			/* won't get ERANGE on these with 64-bit longs... */
 			if (l < INT_MIN)
 			{
@@ -88,7 +88,7 @@ pg_atoi(char *s, int size, int c)
 				errno = ERANGE;
 				elog(ERROR, "pg_atoi: error reading \"%s\": %m", s);
 			}
-#endif	 /* HAS_LONG_LONG */
+#endif         /* HAVE_LONG_INT_64 or HAVE_LONG_LONG_INT_64 */
 			break;
 		case sizeof(int16):
 			if (l < SHRT_MIN)
diff --git a/src/interfaces/odbc/gpps.c b/src/interfaces/odbc/gpps.c
index 38a2e49928b3397eb83c0be8acc2c3545af4b3f8..8d2796673caf0830a59ac8ecf32fba0ae9581525 100644
--- a/src/interfaces/odbc/gpps.c
+++ b/src/interfaces/odbc/gpps.c
@@ -36,7 +36,7 @@
 #define FALSE	((BOOL)0)
 #endif
 
-#if HAVE_PARAM_H
+#if HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #else
 #define MAXPATHLEN	255