Re: [HACKERS] Open Items (was: RE: [HACKERS] Beta going well)

Started by Zeugswetter Andreas SB SDover 24 years ago24 messageshackerspatches
Jump to latest
#1Zeugswetter Andreas SB SD
ZeugswetterA@spardat.at
hackerspatches

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+14-2
int8-patchapplication/octet-stream; name=int8-patchDownload+38-24
#2Tatsuo Ishii
ishii@postgresql.org
In reply to: Zeugswetter Andreas SB SD (#1)
hackerspatches

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 ?

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

#3Bruce Momjian
bruce@momjian.us
In reply to: Tatsuo Ishii (#2)
patches

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 ?

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

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.

-- 
  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
#4Bruce Momjian
bruce@momjian.us
In reply to: Bruce Momjian (#3)
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

Attachments:

/bjm/difftext/plainDownload+38-24
#5Tatsuo Ishii
ishii@postgresql.org
In reply to: Bruce Momjian (#4)
patches
Re: [HACKERS] Open Items (was: RE: [HACKERS] Beta going

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.

Thanks. It compiles and passes regression tests (with small precision
errors) on both AIX 5L and x86/Linux.
--
Tatsuo Ishii

#6Bruce Momjian
bruce@momjian.us
In reply to: Tatsuo Ishii (#5)
patches

OK, what do we do now? Do we apply it?

---------------------------------------------------------------------------

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.

Thanks. It compiles and passes regression tests (with small precision
errors) on both AIX 5L and x86/Linux.
--
Tatsuo Ishii

-- 
  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
#7Tatsuo Ishii
ishii@postgresql.org
In reply to: Bruce Momjian (#6)
patches
Re: [HACKERS] Open Items (was: RE: [HACKERS] Beta going

OK, what do we do now? Do we apply it?

I would like to hear from other users using other versions of AIX.
--
Tatsuo Ishii

Show quoted text

---------------------------------------------------------------------------

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.

Thanks. It compiles and passes regression tests (with small precision
errors) on both AIX 5L and x86/Linux.
--
Tatsuo Ishii

-- 
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
#8Zeugswetter Andreas SB SD
ZeugswetterA@spardat.at
In reply to: Tatsuo Ishii (#2)
hackerspatches

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+29-10
#9Zeugswetter Andreas SB SD
ZeugswetterA@spardat.at
In reply to: Zeugswetter Andreas SB SD (#8)
hackerspatches

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

#10Tom Lane
tgl@sss.pgh.pa.us
In reply to: Zeugswetter Andreas SB SD (#8)
hackerspatches

"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

#11Bruce Momjian
bruce@momjian.us
In reply to: Zeugswetter Andreas SB SD (#9)
hackerspatches

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
#12Peter Eisentraut
peter_e@gmx.net
In reply to: Zeugswetter Andreas SB SD (#8)
hackerspatches

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

#13Bruce Momjian
bruce@momjian.us
In reply to: Zeugswetter Andreas SB SD (#8)
hackerspatches

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
#14Bruce Momjian
bruce@momjian.us
In reply to: Tatsuo Ishii (#7)
patches

OK, what do we do now? Do we apply it?

I would like to hear from other users using other versions of AIX.

OK, Andreas confirmed it. I have applied his version. This way others
can test it.

-- 
  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
#15Zeugswetter Andreas SB SD
ZeugswetterA@spardat.at
In reply to: Bruce Momjian (#13)
hackerspatches

#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

#16Zeugswetter Andreas SB SD
ZeugswetterA@spardat.at
In reply to: Zeugswetter Andreas SB SD (#15)
hackerspatches

"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.

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+33-10
#17Bruce Momjian
bruce@momjian.us
In reply to: Zeugswetter Andreas SB SD (#15)
hackerspatches

#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
#18Zeugswetter Andreas SB SD
ZeugswetterA@spardat.at
In reply to: Bruce Momjian (#17)
hackerspatches

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

#19Tom Lane
tgl@sss.pgh.pa.us
In reply to: Zeugswetter Andreas SB SD (#16)
hackerspatches

"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

#20Bruce Momjian
bruce@momjian.us
In reply to: Zeugswetter Andreas SB SD (#16)
hackerspatches

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;
+ #endif

This 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

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
#21Tatsuo Ishii
ishii@postgresql.org
In reply to: Bruce Momjian (#20)
hackerspatches
#22Bruce Momjian
bruce@momjian.us
In reply to: Tatsuo Ishii (#21)
hackerspatches
#23Peter Eisentraut
peter_e@gmx.net
In reply to: Bruce Momjian (#13)
hackerspatches
#24Bruce Momjian
bruce@momjian.us
In reply to: Peter Eisentraut (#23)
hackers