Joe Conway wrote:
> Tom Lane wrote:
>> I'm betting the system headers define a macro isblank(). I've always
>> wondered why we don't have more trouble with that.
>>
>> Try putting "#ifndef isblank ... #endif" around the isblank function
>> in hba.c.
>
> I just ran into the exact same issue with cvs tip on Red Hat 9. The
> ifndef does the trick.
>
The committed fix now gives me this:
i386-redhat-linux-gcc -O2 -g -Wall -Wmissing-prototypes
-Wmissing-declarations -I../../../src/include -I/usr/kerberos/include
-c -o hba.o hba.c -MMD
hba.c:82: conflicting types for `isblank'
/usr/include/ctype.h:128: previous declaration of `isblank'
make[3]: *** [hba.o] Error 1
Any reason not to apply the following?
Joe
Index: src/backend/libpq/hba.c
===================================================================
RCS file: /opt/src/cvs/pgsql-server/src/backend/libpq/hba.c,v
retrieving revision 1.97
diff -c -r1.97 hba.c
*** src/backend/libpq/hba.c 12 Apr 2003 22:28:33 -0000 1.97
--- src/backend/libpq/hba.c 13 Apr 2003 02:26:45 -0000
***************
*** 73,88 ****
* Others, including Solaris, do not. So we have our own. Watch out for
* macro-ized versions, too.
*/
! #ifdef isblank
! #undef isblank
! #endif
!
static bool
isblank(const char c)
{
return c == ' ' || c == '\t' || c == '\r';
}
!
/*
* Grab one token out of fp. Tokens are strings of non-blank
--- 73,85 ----
* Others, including Solaris, do not. So we have our own. Watch out for
* macro-ized versions, too.
*/
! #ifndef isblank
static bool
isblank(const char c)
{
return c == ' ' || c == '\t' || c == '\r';
}
! #endif
/*
* Grab one token out of fp. Tokens are strings of non-blank