From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Warnings triggered by recent includefile cleanups |
Date: | 2000-07-18 04:21:42 |
Message-ID: | 13431.963894102@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
For the last week or so I've been getting warnings like this:
gcc -c -I../../../../src/include -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -g -O1 -MMD float.c -o float.o
In file included from float.c:58:
/usr/include/values.h:27: warning: `MAXINT' redefined
/usr/local/lib/gcc-lib/hppa2.0-hp-hpux10.20/2.95.2/include/sys/param.h:46: warning: this is the location of the previous definition
in half a dozen backend files. On investigation I find that the cause
is this recent change:
-#ifdef HAVE_LIMITS_H
#include <limits.h>
-#ifndef MAXINT
-#define MAXINT INT_MAX
-#endif
-#else
#ifdef HAVE_VALUES_H
#include <values.h>
-#endif
#endif
specifically the fact that the code now tries to include *both*
<limits.h> and <values.h> rather than only one. Well, I'm here
to tell you that the two headers are not entirely compatible,
at least not on this platform (HPUX 10.20, obviously).
Checking the CVS logs, I see that 7.0 is our first release that tries
to include <values.h> at all, so we have little track experience with
that header and none with its possible conflicts with the ANSI-standard
headers. The submitter of the patch that added it did not recommend
including it unconditionally, but only if <limits.h> is not available.
Looks like he knew what he was doing.
Does anyone object if I revert this code to the way it was?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Wieck | 2000-07-18 09:10:28 | Re: TUPLE SIZE HELP |
Previous Message | Thomas Lockhart | 2000-07-18 02:54:51 | Re: Update: mac.c update, patch now on ftp |