Re: [HACKERS] Open Items (was: RE: [HACKERS] Beta going well)
The check for int64 and uint64 has to be separated, my AIX
has: int8, int16, int32, int64
but not: uint8, uint16, uint32, uint64
This would be an incremental patch to Peter's, but as I said I have not
been able to check configure itself. (The rest works, needless to say)
I am actually very suspicious whether the configure trick
AC_CHECK_SIZEOF(int8, 0) will work, because they only get defined
with _ALL_SOURCE defined and inttypes.h included.
Previous patch included just in case.
Tatsuo would you be so kind as to check this, that would be great ?
Andreas
Attachments:
int8-patch2application/octet-stream; name=int8-patch2Download
*** ./src/include/c.h.orig Mon Nov 12 15:45:18 2001
--- ./src/include/c.h Wed Nov 14 18:21:30 2001
***************
*** 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
--- 266,300 ----
/*
* 64-bit integers
*/
# if defined(HAVE_LONG_INT_64)
/* Plain "long int" fits, use it */
+ #if SIZEOF_INT64 == 0
typedef long int int64;
+ #endif /* SIZEOF_INT64 == 0 */
+ #if SIZEOF_UINT64 == 0
typedef unsigned long int uint64;
+ #endif /* SIZEOF_UINT64 == 0 */
# elif defined(HAVE_LONG_LONG_INT_64)
/* We have working support for "long long int", use that */
+ #if SIZEOF_INT64 == 0
typedef long long int int64;
+ #endif /* SIZEOF_INT64 == 0 */
+ #if SIZEOF_UINT64 == 0
typedef unsigned long long int uint64;
+ #endif /* SIZEOF_UINT64 == 0 */
# else
/* Won't actually work, but fall back to long int so that code compiles */
+ #if SIZEOF_INT64 == 0
typedef long int int64;
+ #endif /* SIZEOF_INT64 == 0 */
+ #if SIZEOF_UINT64 == 0
typedef unsigned long int uint64;
+ #endif /* SIZEOF_UINT64 == 0 */
# define INT64_IS_BUSTED
# endif
/*
* Size
*** ./src/include/pg_config.h.in.orig Mon Nov 12 15:45:18 2001
--- ./src/include/pg_config.h.in Wed Nov 14 18:24:33 2001
***************
*** 700,705 ****
--- 700,706 ----
#undef SIZEOF_INT8
#undef SIZEOF_UINT8
#undef SIZEOF_INT64
+ #undef SIZEOF_UINT64
/*
*** ./configure.in.orig Mon Nov 12 15:45:18 2001
--- ./configure.in Wed Nov 14 18:25:21 2001
***************
*** 1176,1181 ****
--- 1176,1182 ----
AC_CHECK_SIZEOF(int8, 0)
AC_CHECK_SIZEOF(uint8, 0)
AC_CHECK_SIZEOF(int64, 0)
+ AC_CHECK_SIZEOF(uint64, 0)
PGAC_FUNC_POSIX_SIGNALS
int8-patchapplication/octet-stream; name=int8-patchDownload
*** ../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
The check for int64 and uint64 has to be separated, my AIX
has: int8, int16, int32, int64
but not: uint8, uint16, uint32, uint64This would be an incremental patch to Peter's, but as I said I have not
been able to check configure itself. (The rest works, needless to say)
I am actually very suspicious whether the configure trick
AC_CHECK_SIZEOF(int8, 0) will work, because they only get defined
with _ALL_SOURCE defined and inttypes.h included.Previous patch included just in case.
Tatsuo would you be so kind as to check this, that would be great ?
Peter's patches could not be applied to the current and I cannot test
your patches too.
[t-ishii@srapc1474 pgsql]$ patch -b -p2 < ~/int8-patch
missing header for context diff at line 3 of patch
patching file configure.in
patching file src/include/pg_config.h.in
patching file src/include/c.h
Hunk #1 FAILED at 204.
Hunk #2 FAILED at 216.
Hunk #3 FAILED at 266.
3 out of 3 hunks FAILED -- saving rejects to file src/include/c.h.rej
--
Tatsuo Ishii
New patch for open item: AIX compile (Peter E, Zeugswetter)
(applies to today's snapshot)
I now have a working autoconf, and was thus able to confirm, that
Peter's SIZEOF_INT8 check works correctly on AIX.
Please apply this patch before beta3, and please someone check BEOS
which is also affected.
Thank you Peter
Andreas
Attachments:
int8-newpatchapplication/octet-stream; name=int8-newpatchDownload
*** ./configure.in.orig Wed Nov 7 10:00:04 2001
--- ./configure.in Thu Nov 15 08:49:04 2001
***************
*** 1169,1174 ****
--- 1169,1180 ----
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)
+
PGAC_FUNC_POSIX_SIGNALS
*** ./src/include/c.h.orig Mon Nov 12 10:00:31 2001
--- ./src/include/c.h Thu Nov 15 09:02:26 2001
***************
*** 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 /* SIZEOF_INT8 == 0 */
/*
* 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 /* SIZEOF_UINT8 == 0 */
/*
* 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,304 ----
/*
* 64-bit integers
*/
#ifdef HAVE_LONG_INT_64
/* Plain "long int" fits, use it */
+ #if SIZEOF_INT8 == 0
typedef long int int64;
+ #endif
+ #if SIZEOF_UINT8 == 0
typedef unsigned long int uint64;
+ #endif
#else
#ifdef HAVE_LONG_LONG_INT_64
/* We have working support for "long long int", use that */
+ #if SIZEOF_INT8 == 0
typedef long long int int64;
+ #endif
+ #if SIZEOF_UINT8 == 0
typedef unsigned long long int uint64;
+ #endif
#else
/* Won't actually work, but fall back to long int so that code compiles */
+ #if SIZEOF_INT8 == 0
typedef long int int64;
+ #endif
+ #if SIZEOF_UINT8 == 0
typedef unsigned long int uint64;
+ #endif
#define INT64_IS_BUSTED
#endif
#endif
/*
* Size
*** ./src/include/pg_config.h.in.orig Sun Oct 21 10:02:49 2001
--- ./src/include/pg_config.h.in Thu Nov 15 08:50:41 2001
***************
*** 697,702 ****
--- 697,705 ----
/* Define if you have on_exit() */
#undef HAVE_ON_EXIT
+ #undef SIZEOF_INT8
+ #undef SIZEOF_UINT8
+
/*
*------------------------------------------------------------------------
* Part 4: pull in system-specific declarations.
Import Notes
Resolved by subject fallback
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, you take me off the cc: and expect me to test (i am not on
patches).
Your Patch does not work here.
Please test the one I sent in previously. The problem with yours is,
that AIX (at least 4.3.3 and below) does not typedef the unsigned types.
But your patch assumes, that checking int64 is sufficient for uint64.
BEOS has both signed and unsigned, thus my patch should satisfy both.
Thanks
Andreas
Import Notes
Resolved by subject fallback
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
/* Plain "long int" fits, use it */
+ #if SIZEOF_INT8 == 0
typedef long int int64;
+ #endif
+ #if SIZEOF_UINT8 == 0
typedef unsigned long int uint64;
+ #endif
This coding appears to assume "if the platform defines int8, then
it will define int64 as well". Seems mighty fragile to me.
regards, tom lane
OK, Tatsuo, here is an updated version for testing. It initdb and
regression tests fine on my BSD/OS machine.Bruce, you take me off the cc: and expect me to test (i am not on
patches).
Oh. I accidentally deleted the email thread so I head to email a new
message. I couldn't figure out how to see the CC line in
fts.postgresql.org archives.
Your Patch does not work here.
Please test the one I sent in previously. The problem with yours is,
that AIX (at least 4.3.3 and below) does not typedef the unsigned types.
But your patch assumes, that checking int64 is sufficient for uint64.BEOS has both signed and unsigned, thus my patch should satisfy both.
OK, we package beta3 tomorrow. I am going to apply the patch now so
people can test it more easily and maybe we will see any problem reports
before tomorrow.
--
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
Zeugswetter Andreas SB SD writes:
New patch for open item: AIX compile (Peter E, Zeugswetter)
(applies to today's snapshot)I now have a working autoconf, and was thus able to confirm, that
Peter's SIZEOF_INT8 check works correctly on AIX.
I'm confused a bit: In the previous message you added a check for uint64,
in this version you removed the u?int64 checks completely. I suppose it
doesn't matter, but is there a reason?
--
Peter Eisentraut peter_e@gmx.net
New patch for open item: AIX compile (Peter E, Zeugswetter)
(applies to today's snapshot)I now have a working autoconf, and was thus able to confirm, that
Peter's SIZEOF_INT8 check works correctly on AIX.Please apply this patch before beta3, and please someone check BEOS
which is also affected.
The only problem I have now is that odbc/md5.h needs those unsigned
defines and it can't probe the results of queries by configure. odbc
allows for stand-alone compile.
#if SIZEOF_UINT8 == 0
Right now it is testing for __BEOS__, which I believe is something set
by the compiler and not by configure.
My idea is to just unconditionally define the unsigned's in odbc. It
will fail on a few platforms but I don't see another solution.
--
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
#if SIZEOF_UINT8 == 0
Right now it is testing for __BEOS__, which I believe is something set
by the compiler and not by configure.My idea is to just unconditionally define the unsigned's in odbc. It
will fail on a few platforms but I don't see another solution.
Well, since AIX does not have the unsigned's, I think leaving odbc's
md5.h as it was with the #ifndef __BEOS__ in place is OK.
Andreas
Import Notes
Resolved by subject fallback
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
/* Plain "long int" fits, use it */ + #if SIZEOF_INT8 == 0 typedef long int int64; + #endif + #if SIZEOF_UINT8 == 0 typedef unsigned long int uint64; + #endifThis coding appears to assume "if the platform defines int8, then
it will define int64 as well". Seems mighty fragile to me.
Well the absolute correct solution would involve all of:
int8, int16, int32, int64 and separately uint8, uint16, uint32, uint64
The previous patch grouped:
int8, int16 and int32
uint8, uint16 and uint32
int64 and uint64 <-- this grouping is wrong on AIX 4.3.3 and below
If you prefer to make 4 groups out of this you could apply this patch.
Andreas
Attachments:
int8-newpatch2application/octet-stream; name=int8-newpatch2Download
*** ./configure.in.orig Wed Nov 7 10:00:04 2001
--- ./configure.in Thu Nov 15 17:02:01 2001
***************
*** 1169,1174 ****
--- 1169,1182 ----
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)
+ AC_CHECK_SIZEOF(uint64, 0)
+
PGAC_FUNC_POSIX_SIGNALS
*** ./src/include/c.h.orig Mon Nov 12 10:00:31 2001
--- ./src/include/c.h Thu Nov 15 17:05:00 2001
***************
*** 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 /* SIZEOF_INT8 == 0 */
/*
* 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 /* SIZEOF_UINT8 == 0 */
/*
* 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,304 ----
/*
* 64-bit integers
*/
#ifdef HAVE_LONG_INT_64
/* Plain "long int" fits, use it */
+ #if SIZEOF_INT64 == 0
typedef long int int64;
+ #endif
+ #if SIZEOF_UINT64 == 0
typedef unsigned long int uint64;
+ #endif
#else
#ifdef HAVE_LONG_LONG_INT_64
/* We have working support for "long long int", use that */
+ #if SIZEOF_INT64 == 0
typedef long long int int64;
+ #endif
+ #if SIZEOF_UINT64 == 0
typedef unsigned long long int uint64;
+ #endif
#else
/* Won't actually work, but fall back to long int so that code compiles */
+ #if SIZEOF_INT64 == 0
typedef long int int64;
+ #endif
+ #if SIZEOF_UINT64 == 0
typedef unsigned long int uint64;
+ #endif
#define INT64_IS_BUSTED
#endif
#endif
/*
* Size
*** ./src/include/pg_config.h.in.orig Sun Oct 21 10:02:49 2001
--- ./src/include/pg_config.h.in Thu Nov 15 17:02:34 2001
***************
*** 697,702 ****
--- 697,707 ----
/* Define if you have on_exit() */
#undef HAVE_ON_EXIT
+ #undef SIZEOF_INT8
+ #undef SIZEOF_UINT8
+ #undef SIZEOF_INT64
+ #undef SIZEOF_UINT64
+
/*
*------------------------------------------------------------------------
* Part 4: pull in system-specific declarations.
Import Notes
Resolved by subject fallback
#if SIZEOF_UINT8 == 0
Right now it is testing for __BEOS__, which I believe is something set
by the compiler and not by configure.My idea is to just unconditionally define the unsigned's in odbc. It
will fail on a few platforms but I don't see another solution.Well, since AIX does not have the unsigned's, I think leaving odbc's
md5.h as it was with the #ifndef __BEOS__ in place is OK.
Really? Seems some AIX must have the unsigneds or we wouldn't be
needing a new patch, right? Am I missing something?
--
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
New patch for open item: AIX compile (Peter E, Zeugswetter)
(applies to today's snapshot)I now have a working autoconf, and was thus able to confirm, that
Peter's SIZEOF_INT8 check works correctly on AIX.I'm confused a bit: In the previous message you added a check for
uint64,
in this version you removed the u?int64 checks completely. I suppose
it
doesn't matter, but is there a reason?
AIX > 4.? and <= 4.3.3 has all four signed typedefs but no unsigned
ones.
BEOS has all eight typedefs.
So I thought that grouping signed and unsigned was ok.
Tom complained, and so I sent in another patch just now that separates
the 64's.
Andreas
Import Notes
Resolved by subject fallback
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
Well the absolute correct solution would involve all of:
int8, int16, int32, int64 and separately uint8, uint16, uint32, uint64
I agree that that's probably overkill. I'm prepared to assume that
anything defining int8 defines int16 and int32 as well --- but int64
is just new enough that I don't want to make that extrapolation.
The previous patch grouped:
int8, int16 and int32
uint8, uint16 and uint32
int64 and uint64 <-- this grouping is wrong on AIX 4.3.3 and below
Okay, int64 and uint64 must be tested for separately then.
If you prefer to make 4 groups out of this you could apply this patch.
This form of the patch looks reasonable to me.
regards, tom lane
OK, I backed out your previous patch and applied this one.
Thanks.
---------------------------------------------------------------------------
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
/* Plain "long int" fits, use it */ + #if SIZEOF_INT8 == 0 typedef long int int64; + #endif + #if SIZEOF_UINT8 == 0 typedef unsigned long int uint64; + #endifThis coding appears to assume "if the platform defines int8, then
it will define int64 as well". Seems mighty fragile to me.Well the absolute correct solution would involve all of:
int8, int16, int32, int64 and separately uint8, uint16, uint32, uint64The previous patch grouped:
int8, int16 and int32
uint8, uint16 and uint32
int64 and uint64 <-- this grouping is wrong on AIX 4.3.3 and belowIf you prefer to make 4 groups out of this you could apply this patch.
Andreas
Content-Description: int8-newpatch2
[ Attachment, skipping... ]
--
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
I wanted to test the new patches on AIX 5L but the cvs server seem to
reject me (it worked till yesterday). Sigh.
--
Tatsuo Ishii
Show quoted text
OK, I backed out your previous patch and applied this one.
Thanks.
---------------------------------------------------------------------------
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
/* Plain "long int" fits, use it */ + #if SIZEOF_INT8 == 0 typedef long int int64; + #endif + #if SIZEOF_UINT8 == 0 typedef unsigned long int uint64; + #endifThis coding appears to assume "if the platform defines int8, then
it will define int64 as well". Seems mighty fragile to me.Well the absolute correct solution would involve all of:
int8, int16, int32, int64 and separately uint8, uint16, uint32, uint64The previous patch grouped:
int8, int16 and int32
uint8, uint16 and uint32
int64 and uint64 <-- this grouping is wrong on AIX 4.3.3 and belowIf you prefer to make 4 groups out of this you could apply this patch.
Andreas
Content-Description: int8-newpatch2
[ Attachment, skipping... ]
-- 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---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
I wanted to test the new patches on AIX 5L but the cvs server seem to
reject me (it worked till yesterday). Sigh.
Yes. This happened to me this morning. I fixed it by changing my
.cvspass to use postgresql.org instead of cvs.postgresql.org and used
CVS to attach to that.
Marc, any idea why I needed to do that?
--
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
Bruce Momjian writes:
The only problem I have now is that odbc/md5.h needs those unsigned
defines and it can't probe the results of queries by configure. odbc
allows for stand-alone compile.
ODBC uses all kinds of other configure results, so it can use this one as
well. You only need to make sure you hard-code the test result for
Windows somewhere.
--
Peter Eisentraut peter_e@gmx.net
The only problem I have now is that odbc/md5.h needs those unsigned
defines and it can't probe the results of queries by configure. odbc
allows for stand-alone compile.ODBC uses all kinds of other configure results, so it can use this one as
well. You only need to make sure you hard-code the test result for
Windows somewhere.
Good point, Peter. I had not seen that psqlodbc.h does conditionally
include pg_config.h. I have added this test to md5.h:
/* Also defined in include/c.h */
#if SIZEOF_UINT8 == 0
typedef unsigned char uint8; /* == 8 bits */
typedef unsigned short uint16; /* == 16 bits */
typedef unsigned int uint32; /* == 32 bits */
#endif /* SIZEOF_UINT8 == 0 */
In the case of WIN32, SIZEOF_UINT8 is not defined, so it should compare
equal to zero, and should include those defines, as needed. It now
matches c.h. Is that OK?
--
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
Import Notes
Resolved by subject fallback