Re: Latest datetime changes produce gcc complaints - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Latest datetime changes produce gcc complaints
Date
Msg-id 200112300208.fBU28xg02678@candle.pha.pa.us
Whole thread Raw
In response to Latest datetime changes produce gcc complaints  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> make[3]: Entering directory `/home/postgres/pgsql/src/backend/parser'
> gcc -O1 -Wall -Wmissing-prototypes -Wmissing-declarations -g -I../../../src/include   -c -o analyze.o analyze.c
> In file included from analyze.c:23:
> ../../../src/include/parser/parse.h:160: warning: `TIME' redefined
> ../../../src/include/utils/datetime.h:113: warning: this is the location of the previous definition
> 
> and similarly in half a dozen other modules.  This is very bad; I have
> no confidence that the correct value of the symbol is being used in each
> place that references it.  Could we rename the one in datetime.h to a
> non-conflicting name?

Of course this brings up the question of whether there were any other
recent changes that will break ports.   Thomas, can you check on that? 
I didn't see your patch and can't find it in the archives.  (Of course,
the fact the patch didn't compile and we are thinking of RC1 tomorrow
doesn't help.)  :-)

OK, I see it now via CVS.  There are almost 2k lines of code in the
patch. It looks like DATE and TIME are the only two new defines.  Can
you change TIME to PGTIME and DATE to PGDATE?  Seems safer.

Don't know about the rest of the code.  Hope it works.  :-)

--  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,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: LWLock contention: I think I understand the problem
Next
From: Bruce Momjian
Date:
Subject: Re: LWLock contention: I think I understand the problem