Skip site navigation (1) Skip section navigation (2)

Re: [PATCHES] Patch for PostgreSQL 6.4-BETA5: pgsql/src/backend/port/getrusage.c

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: thanson(at)goldengate(dot)net (Troy Hanson)
Cc: hackers(at)postgreSQL(dot)org (PostgreSQL-development)
Subject: Re: [PATCHES] Patch for PostgreSQL 6.4-BETA5: pgsql/src/backend/port/getrusage.c
Date: 1998-12-12 19:58:12
Message-ID: 199812121958.OAA03004@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
I have added stdio.h to getrusage.c to fix this problem, in both trees.

> Bruce,
> Regarding your inquiry, I looked into stdio.h and (lo and behold) this is the
> definition.
> 
> #ifndef NULL
> #define NULL	0
> #endif
> 
> I'm not sure why I had to add it to the Postgres source file to avoid
> compilation errors, since the definition in stdio.h is identical.
> 
> Troy Hanson
> 
> Bruce Momjian wrote:
> > 
> > Please find the NULL define in your system header, and tell me what it
> > is so I can include that in the file.  Could be in stdio.h?
> > 
> > > On SCO OpenServer 3.2.5, I get an error when compiling
> > > pgsql/src/backend/port/getrusage.c .  NULL is undefined:
> > >
> > >   make -C port all
> > >   make[2]: Entering directory `/home/postgres/pgsql/src/backend/port'
> > >   cc -b elf -I../../include -I../../backend     -dy -I..   -c getrusage.c
> > >   "getrusage.c", line 26: error: undefined symbol: NULL
> > >   make[2]: *** [getrusage.o] Error 1
> > >
> > > The simple fix is to add these three 3 lines to the file:
> > >
> > > #ifndef NULL
> > > #define NULL 0
> > > #endif
> > >
> > > Troy Hanson
> > > thanson(at)goldengate(dot)net
> > >
> > >
> > >
> > 
> > --
> >   Bruce Momjian                        |  http://www.op.net/~candle
> >   maillist(at)candle(dot)pha(dot)pa(dot)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                        |  http://www.op.net/~candle
  maillist(at)candle(dot)pha(dot)pa(dot)us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-hackers by date

Next:From: Bruce MomjianDate: 1998-12-12 20:03:18
Subject: Re: [HACKERS] Warning!!
Previous:From: Tom LaneDate: 1998-12-12 17:31:27
Subject: Re: [HACKERS] Warning!!

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group