int8-patch

text/plain

Filename: int8-patch
Type: text/plain
Part: 0
Message: Re: Beta going well
*** ../pgsql-master/configure.in	Thu Oct 25 20:31:43 2001
--- configure.in	Tue Nov  6 14:15:13 2001
***************
*** 1169,1174 ****
--- 1169,1183 ----
  fi
  AC_DEFINE_UNQUOTED(MAXIMUM_ALIGNOF, $MAX_ALIGNOF, [Define as the maximum alignment requirement of any type])
  
+ 
+ # Some platforms predefine the types int8, int16, etc.  Only check
+ # a (hopefully) representative subset.  Don't use AC_CHECK_TYPE, which
+ # doesn't work the way we want to.
+ AC_CHECK_SIZEOF(int8, 0)
+ AC_CHECK_SIZEOF(uint8, 0)
+ AC_CHECK_SIZEOF(int64, 0)
+ 
+ 
  PGAC_FUNC_POSIX_SIGNALS
  
  
*** ../pgsql-master/src/include/pg_config.h.in	Thu Oct 25 20:37:27 2001
--- src/include/pg_config.h.in	Tue Nov  6 14:14:30 2001
***************
*** 697,702 ****
--- 697,707 ----
  /* Define if you have on_exit() */
  #undef HAVE_ON_EXIT
  
+ #undef SIZEOF_INT8
+ #undef SIZEOF_UINT8
+ #undef SIZEOF_INT64
+ 
+ 
  /*
   *------------------------------------------------------------------------
   * Part 4: pull in system-specific declarations.
*** ../pgsql-master/src/include/c.h	Wed Oct 31 21:48:10 2001
--- src/include/c.h	Tue Nov  6 14:33:04 2001
***************
*** 204,214 ****
   *		used for numerical computations and the
   *		frontend/backend protocol.
   */
! #ifndef __BEOS__				/* this shouldn't be required, but is is! */
  typedef signed char int8;		/* == 8 bits */
  typedef signed short int16;		/* == 16 bits */
  typedef signed int int32;		/* == 32 bits */
! #endif	 /* __BEOS__ */
  
  /*
   * uintN
--- 204,214 ----
   *		used for numerical computations and the
   *		frontend/backend protocol.
   */
! #if SIZEOF_INT8 == 0
  typedef signed char int8;		/* == 8 bits */
  typedef signed short int16;		/* == 16 bits */
  typedef signed int int32;		/* == 32 bits */
! #endif
  
  /*
   * uintN
***************
*** 216,226 ****
   *		used for numerical computations and the
   *		frontend/backend protocol.
   */
! #ifndef __BEOS__				/* this shouldn't be required, but is is! */
  typedef unsigned char uint8;	/* == 8 bits */
  typedef unsigned short uint16;	/* == 16 bits */
  typedef unsigned int uint32;	/* == 32 bits */
! #endif	 /* __BEOS__ */
  
  /*
   * boolN
--- 216,226 ----
   *		used for numerical computations and the
   *		frontend/backend protocol.
   */
! #if SIZEOF_UINT8 == 0
  typedef unsigned char uint8;	/* == 8 bits */
  typedef unsigned short uint16;	/* == 16 bits */
  typedef unsigned int uint32;	/* == 32 bits */
! #endif
  
  /*
   * boolN
***************
*** 266,292 ****
  /*
   * 64-bit integers
   */
! #ifndef __BEOS__				/* this is already defined on BeOS */
! #ifdef HAVE_LONG_INT_64
  /* Plain "long int" fits, use it */
  typedef long int int64;
  typedef unsigned long int uint64;
  
! #else
! #ifdef HAVE_LONG_LONG_INT_64
  /* We have working support for "long long int", use that */
  typedef long long int int64;
  typedef unsigned long long int uint64;
  
! #else
  /* Won't actually work, but fall back to long int so that code compiles */
  typedef long int int64;
  typedef unsigned long int uint64;
  
! #define INT64_IS_BUSTED
! #endif
! #endif
! #endif	 /* __BEOS__ */
  
  /*
   * Size
--- 266,290 ----
  /*
   * 64-bit integers
   */
! #if SIZEOF_INT64 == 0
! # if defined(HAVE_LONG_INT_64)
  /* Plain "long int" fits, use it */
  typedef long int int64;
  typedef unsigned long int uint64;
  
! # elif defined(HAVE_LONG_LONG_INT_64)
  /* We have working support for "long long int", use that */
  typedef long long int int64;
  typedef unsigned long long int uint64;
  
! # else
  /* Won't actually work, but fall back to long int so that code compiles */
  typedef long int int64;
  typedef unsigned long int uint64;
  
! #  define INT64_IS_BUSTED
! # endif
! #endif /* SIZEOF_INT64 == 0 */
  
  /*
   * Size