Re: [HACKERS] Open Items (was: RE: [HACKERS] Beta going well) - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: [HACKERS] Open Items (was: RE: [HACKERS] Beta going well)
Date
Msg-id 200111150259.fAF2x0J08790@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] Open Items (was: RE: [HACKERS] Beta going well)  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: [HACKERS] Open Items (was: RE: [HACKERS] Beta going  (Tatsuo Ishii <t-ishii@sra.co.jp>)
List pgsql-patches
> > 3 out of 3 hunks FAILED -- saving rejects to file src/include/c.h.rej
>
> My guess is that pgindent has modified c.h.  Tatsuo, if you send me the
> patch, I will manually apply it to current CVS and send you a new
> version of the patch for testing.

OK, Tatsuo, here is an updated version for testing.  It initdb and
regression tests fine on my BSD/OS machine.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
Index: configure.in
===================================================================
RCS file: /cvsroot/pgsql/configure.in,v
retrieving revision 1.151
diff -c -r1.151 configure.in
*** configure.in    2001/11/06 20:12:07    1.151
--- configure.in    2001/11/15 02:48:55
***************
*** 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


Index: src/include/c.h
===================================================================
RCS file: /cvsroot/pgsql/src/include/c.h,v
retrieving revision 1.109
diff -c -r1.109 c.h
*** src/include/c.h    2001/11/12 01:52:46    1.109
--- src/include/c.h    2001/11/15 02:48:59
***************
*** 205,215 ****
   *        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
--- 205,215 ----
   *        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
***************
*** 218,228 ****
   *        frontend/backend protocol.
   */
  /* Also defined in interfaces/odbc/md5.h */
! #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
--- 218,228 ----
   *        frontend/backend protocol.
   */
  /* Also defined in interfaces/odbc/md5.h */
! #if SIZEOF_UINT8 == 0
  typedef unsigned char uint8;    /* == 8 bits */
  typedef unsigned short uint16;    /* == 16 bits */
  typedef unsigned int uint32;    /* == 32 bits */
! #endif

  /*
   * boolN
***************
*** 268,294 ****
  /*
   * 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
--- 268,292 ----
  /*
   * 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
Index: src/include/pg_config.h.in
===================================================================
RCS file: /cvsroot/pgsql/src/include/pg_config.h.in,v
retrieving revision 1.11
diff -c -r1.11 pg_config.h.in
*** src/include/pg_config.h.in    2001/10/20 17:57:39    1.11
--- src/include/pg_config.h.in    2001/11/15 02:49:00
***************
*** 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-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Open Items (was: RE: [HACKERS] Beta going well)
Next
From: Tatsuo Ishii
Date:
Subject: Re: [HACKERS] Open Items (was: RE: [HACKERS] Beta going