Обсуждение: port/getrusage.c?

Поиск
Список
Период
Сортировка

port/getrusage.c?

От
t-ishii@sra.co.jp
Дата:
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

Re: [HACKERS] port/getrusage.c?

От
Hal Snyder
Дата:
> 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.


Re: [HACKERS] port/getrusage.c?

От
Bruce Momjian
Дата:
> 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)

Re: [HACKERS] port/getrusage.c?

От
Hal Snyder
Дата:
> 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).


Re: [HACKERS] port/getrusage.c?

От
Bruce Momjian
Дата:
>
> > 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)

Re: [HACKERS] port/getrusage.c?

От
The Hermit Hacker
Дата:
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


Re: [HACKERS] port/getrusage.c?

От
Hal Snyder
Дата:
> 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.


Re: [HACKERS] port/getrusage.c?

От
Hal Snyder
Дата:
> 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.


Re: [HACKERS] port/getrusage.c?

От
Bruce Momjian
Дата:
>
> > 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.
>
>

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)