port/getrusage.c?
Does anybody know why getrusage() in backend/port/getrusage.c is
removed (surrounded by #if 0)?
Some ports including Solaris 2.4, NEWS OS 6 (I'm trying now) etc. need
getrusage().
--
Tatsuo Ishii
t-ishii@sra.co.jp
From: t-ishii@sra.co.jp
Date: Thu, 12 Mar 1998 11:13:54 +0900
Does anybody know why getrusage() in backend/port/getrusage.c is
removed (surrounded by #if 0)?Some ports including Solaris 2.4, NEWS OS 6 (I'm trying now) etc. need
getrusage().
I have the same question - have been wrestling with the SCO (ODT 5)
port. Actually all we need here is client-side pgsql code to run on
SCO so I butchered my way thru the build to make it happen.
Used gcc-2.8.1 to get past the monster macro - altho if there's C
code we can put in for easily confused compilers it would be nice to
have a port buildable with SCO native tools. Bruce?
Additions to wishlist - client-only builds, fix setup so Pg.pm builds
on first install.
Will be happy to work with the experts on SCO port + these small
items - my hat is off to the 6.3 team.
I have the same question - have been wrestling with the SCO (ODT 5)
port. Actually all we need here is client-side pgsql code to run on
SCO so I butchered my way thru the build to make it happen.Used gcc-2.8.1 to get past the monster macro - altho if there's C
code we can put in for easily confused compilers it would be nice to
have a port buildable with SCO native tools. Bruce?
OK, please tell me what macro is a monster, and what define I can check
to see if I am using the SCO/Microsoft/piece-O-junk :-) compiler, and I
will take a crack at making a static function out of the macro and send
you a patch to test.
--
Bruce Momjian | 830 Blythe Avenue
maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)
From: Bruce Momjian <maillist@candle.pha.pa.us>
Date: Wed, 11 Mar 1998 23:11:37 -0500 (EST)
OK, please tell me what macro is a monster, and what define I can check
to see if I am using the SCO/Microsoft/piece-O-junk :-) compiler, and I
will take a crack at making a static function out of the macro and send
you a patch to test.
src/include/access/heapam.h - heap_getattr is the one that blows the
mind of SCO ODT5 /bin/cc as well as their Skunkware gcc-2.7.2.1. Pure
GNU 2.8.1 was all I could get to handle it.
BTW just so you won't think we're total idiots - we run the pgsql
server on FreeBSD where it belongs - but some of our hosts use
hardware for which vendors refuse to allow FreeBSD support. Thus we
have SCO systems (plus hardware to reboot them when they wedge).
From: Bruce Momjian <maillist@candle.pha.pa.us>
Date: Wed, 11 Mar 1998 23:11:37 -0500 (EST)OK, please tell me what macro is a monster, and what define I can check
to see if I am using the SCO/Microsoft/piece-O-junk :-) compiler, and I
will take a crack at making a static function out of the macro and send
you a patch to test.src/include/access/heapam.h - heap_getattr is the one that blows the
mind of SCO ODT5 /bin/cc as well as their Skunkware gcc-2.7.2.1. Pure
GNU 2.8.1 was all I could get to handle it.
What define can I use to check for SCO open-deathtrap cc?
BTW just so you won't think we're total idiots - we run the pgsql
server on FreeBSD where it belongs - but some of our hosts use
hardware for which vendors refuse to allow FreeBSD support. Thus we
have SCO systems (plus hardware to reboot them when they wedge).
This is funny.
--
Bruce Momjian | 830 Blythe Avenue
maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)
On Wed, 11 Mar 1998, Hal Snyder wrote:
From: Bruce Momjian <maillist@candle.pha.pa.us>
Date: Wed, 11 Mar 1998 23:11:37 -0500 (EST)OK, please tell me what macro is a monster, and what define I can check
to see if I am using the SCO/Microsoft/piece-O-junk :-) compiler, and I
will take a crack at making a static function out of the macro and send
you a patch to test.src/include/access/heapam.h - heap_getattr is the one that blows the
mind of SCO ODT5 /bin/cc as well as their Skunkware gcc-2.7.2.1. Pure
GNU 2.8.1 was all I could get to handle it.
I don't believe that this is a "religious war" issue...but why do
ppl even *use* the stock C compilers anymore? I know at work we us all
GCC/G++ stuff, since its one helluva lot cheaper then picking up Sun's CC
compiler...I'm not advocating requiring GCC...just wondering one ppl
actually do use the stock compiler..
Marc G. Fournier
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org
From: Bruce Momjian <maillist@candle.pha.pa.us>
Date: Thu, 12 Mar 1998 00:15:51 -0500 (EST)
src/include/access/heapam.h - heap_getattr is the one that blows the
mind of SCO ODT5 /bin/cc as well as their Skunkware gcc-2.7.2.1. Pure
GNU 2.8.1 was all I could get to handle it.What define can I use to check for SCO open-deathtrap cc?
Good question. I don't see one, but the config stuff is not familiar
ground. There is reference to "sco" on line 85 of
src/include/utils/memutils.h - "#if ! defined(sco)"
but I think nothing sets this any more. (Actually this is another
thing on the list of SCO breakage in 6.3). I'd add something to the
template for sco.
From: dg@illustra.com (David Gould)
Date: Wed, 11 Mar 1998 22:37:59 -0800 (PST)
...
Good question. I don't see one, but the config stuff is not familiar
ground. There is reference to "sco" on line 85 ofsrc/include/utils/memutils.h - "#if ! defined(sco)"
but I think nothing sets this any more. (Actually this is another
thing on the list of SCO breakage in 6.3). I'd add something to the
template for sco.
What is the policy for defines on Postgres?
It is often suggested that that 'ifdef defined(RANDOM_PLATFORM)' is not a
nice way to proceed. Far better to use for example 'defined(HAS_FEATURE_XYZ)'
than something like:'defined(SOLARIS) or defined(SUNOS) or defined(PYRAMID) && !defined(WIN32)'.
In the case at hand, perhaps something like 'if defined(BROKEN_CPP_GCC_271)',
and then define it in the SCO part of the build system. After all, SCO
might survive long enough to upgrade to a current compiler...
Ack. How about changing
CFLAGS:
to
CFLAGS:-DLAME_CPP
in src/templates/sco?
Import Notes
Reply to msg id not found: 9803120638.AA26781@hawk.illustra.comReference msg id not found: 9803120638.AA26781@hawk.illustra.com | Resolved by subject fallback
Date: Thu, 12 Mar 1998 01:48:28 -0400 (AST)
From: The Hermit Hacker <scrappy@hub.org>
cc: maillist@candle.pha.pa.us, hackers@postgreSQL.org
src/include/access/heapam.h - heap_getattr is the one that blows the
mind of SCO ODT5 /bin/cc as well as their Skunkware gcc-2.7.2.1. Pure
GNU 2.8.1 was all I could get to handle it.I don't believe that this is a "religious war" issue...but why do
ppl even *use* the stock C compilers anymore? I know at work we us all
GCC/G++ stuff, since its one helluva lot cheaper then picking up Sun's CC
compiler...I'm not advocating requiring GCC...just wondering one ppl
actually do use the stock compiler..
1. Corporate engineering management scared of stuff that only builds
with GNU tools and not "commercial quality" native compiler. Feh.
2. OS's so whacked-out that GNU tools don't build without major pain
and suffering. Look at what it took to build pre-2.8 gcc on SCO.
Where I work we have two kinds of programmer using the same SCO
development system - the GNU'ers who spend as much time as possible on
FreeBSD and only use the SCO box when held at gunpoint, and the SCO
users who would just get all confused by enhanced warnings emitted by
gcc -Wall -ansi -pedantic (prototype checking, printf arg checks, etc)
and just sit catatonic in their cubes for weeks if their moldy old
/bin/cc tools don't work on a module they pull out of CVS. Aargh.
From: Bruce Momjian <maillist@candle.pha.pa.us>
Date: Thu, 12 Mar 1998 00:15:51 -0500 (EST)src/include/access/heapam.h - heap_getattr is the one that blows the
mind of SCO ODT5 /bin/cc as well as their Skunkware gcc-2.7.2.1. Pure
GNU 2.8.1 was all I could get to handle it.What define can I use to check for SCO open-deathtrap cc?
Good question. I don't see one, but the config stuff is not familiar
ground. There is reference to "sco" on line 85 ofsrc/include/utils/memutils.h - "#if ! defined(sco)"
but I think nothing sets this any more. (Actually this is another
thing on the list of SCO breakage in 6.3). I'd add something to the
template for sco.
Go to src/tools and run ccsym with the SCO compiler. Send me the
output. Should be something unique in there.
--
Bruce Momjian | 830 Blythe Avenue
maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)
'defined(SOLARIS) or defined(SUNOS) or defined(PYRAMID) && !defined(WIN32)'.
In the case at hand, perhaps something like 'if defined(BROKEN_CPP_GCC_271)',
and then define it in the SCO part of the build system. After all, SCO
might survive long enough to upgrade to a current compiler...Ack. How about changing
CFLAGS:
to
CFLAGS:-DLAME_CPP
in src/templates/sco?
But we don't want that if they use a good compiler under SCO. I have
asked them to run src/tools/ccsym and send the output. Should be
something unique in there.
--
Bruce Momjian | 830 Blythe Avenue
maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)
OK, please tell me what macro is a monster, and what define I can check
to see if I am using the SCO/Microsoft/piece-O-junk :-) compiler, and I
will take a crack at making a static function out of the macro and send
you a patch to test.src/include/access/heapam.h - heap_getattr is the one that blows the
mind of SCO ODT5 /bin/cc as well as their Skunkware gcc-2.7.2.1. Pure
GNU 2.8.1 was all I could get to handle it.I don't believe that this is a "religious war" issue...but why do
ppl even *use* the stock C compilers anymore? I know at work we us all
GCC/G++ stuff, since its one helluva lot cheaper then picking up Sun's CC
compiler...I'm not advocating requiring GCC...just wondering one ppl
actually do use the stock compiler..
Because it was there...
darrenk
Import Notes
Resolved by subject fallback
But we don't want that if they use a good compiler under SCO. I have
asked them to run src/tools/ccsym and send the output. Should be
something unique in there.
On SCO, ccsym becomes /bin/cc -b elf -ii -E foo.c, which after filtering
gives the symbols below. If I omit "-b elf", the last line is replaced
by the two lines
'-D_M_COFF'
'-D_SCO_COFF'
How about _SCO_DS as the define when testing for SCO's native
compiler? (I confess ignorance as to SCO's intended use of this symbol.)
'-D__i386'
'-D_SCO_DS=1'
'-D__unix'
'-D_M_I386'
'-D_M_XENIX'
'-D_M_UNIX'
'-D_SCO_C_DIALECT=1'
'-D_STRICT_NAMES'
'-D_M_I86'
'-D_M_I86SM'
'-D_M_SDATA'
'-D_M_STEXT'
'-D_M_BITFIELDS'
'-D_M_INTERNAT'
'-D_M_SYS5'
'-D_M_SYSV'
'-D_M_SYSIII'
'-D_M_WORDSWAP'
'-Di386'
'-Dunix'
'-DM_I386'
'-DM_UNIX'
'-DM_XENIX'
'-D_SCO_XPG_VERS=4'
'-D_SCO_ELF'
But we don't want that if they use a good compiler under SCO. I have
asked them to run src/tools/ccsym and send the output. Should be
something unique in there.On SCO, ccsym becomes /bin/cc -b elf -ii -E foo.c, which after filtering
gives the symbols below. If I omit "-b elf", the last line is replaced
by the two lines
'-D_M_COFF'
'-D_SCO_COFF'How about _SCO_DS as the define when testing for SCO's native
compiler? (I confess ignorance as to SCO's intended use of this symbol.)'-D__i386'
'-D_SCO_DS=1'
'-D__unix'
'-D_M_I386'
'-D_M_XENIX'
'-D_M_UNIX'
'-D_SCO_C_DIALECT=1'
'-D_STRICT_NAMES'
'-D_M_I86'
'-D_M_I86SM'
'-D_M_SDATA'
'-D_M_STEXT'
'-D_M_BITFIELDS'
'-D_M_INTERNAT'
'-D_M_SYS5'
'-D_M_SYSV'
'-D_M_SYSIII'
'-D_M_WORDSWAP'
'-Di386'
'-Dunix'
'-DM_I386'
'-DM_UNIX'
'-DM_XENIX'
'-D_SCO_XPG_VERS=4'
'-D_SCO_ELF'
Or even: '-D_SCO_C_DIALECT=1' as in:
#if _SCO_C_DIALECT == 1 ...
Can't get much more specific than that.
-dg
David Gould dg@illustra.com 510.628.3783 or 510.305.9468
Informix Software (No, really) 300 Lakeside Drive Oakland, CA 94612
- I realize now that irony has no place in business communications.
But we don't want that if they use a good compiler under SCO. I have
asked them to run src/tools/ccsym and send the output. Should be
something unique in there.On SCO, ccsym becomes /bin/cc -b elf -ii -E foo.c, which after filtering
gives the symbols below. If I omit "-b elf", the last line is replaced
by the two lines
'-D_M_COFF'
'-D_SCO_COFF'How about _SCO_DS as the define when testing for SCO's native
compiler? (I confess ignorance as to SCO's intended use of this symbol.)
I am inclined to choose:
-D_SCO_C_DIALECT=1
Not to test for the value of one, but just to test if it is defined.
--
Bruce Momjian | 830 Blythe Avenue
maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)