From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | jseymour(at)LinxNet(dot)com |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | 7.4.2 Build broken on (Sparc) Solaris 7 and 8 |
Date: | 2004-03-19 16:26:11 |
Message-ID: | 200403191626.i2JGQBK28304@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
> Environment:
>
> SunOS 5.8 Generic_108528-27 sun4u sparc SUNW,Ultra-250
> gcc version 3.3.1
> PostgreSQL-7.4.2
> ./configure --with-java --enable-thread-safety
>
> "make" results in:
>
> gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
> -Wmissing-declarations -fPIC -I. -I../../../src/include
> -DFRONTEND -DSYSCONFDIR='"/usr/local/pgsql/etc"' -c -o thread.o
> thread.c
> thread.c: In function `pqGetpwuid':
> thread.c:116: error: too many arguments to function `*getpwuid_r*'
>
>
> Environment:
>
> SunOS 5.7 Generic_106541-29 sun4u sparc SUNW,UltraSPARC-IIi-Engine
> gcc version 3.3.1
> PostgreSQL-7.4.2
> ./configure --with-java --enable-thread-safety
>
> "make' results in:
>
> gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
> -Wmissing-declarations -fPIC -I. -I../../../src/include
> -DFRONTEND -DSYSCONFDIR='"/usr/local/pgsql/etc"' -c -o thread.o
> thread.c
> thread.c: In function `pqGetpwuid':
> thread.c:116: error: too many arguments to function `*getpwuid_r*'
> thread.c: In function `pqGethostbyname':
> thread.c:189: error: `resbuf' undeclared (first use in this function)
> thread.c:189: error: (Each undeclared identifier is reported only once
> thread.c:189: error: for each function it appears in.)
>
> Diff'ing thread.c between 7.4.1 and 7.4.2, it *looks* like, at first
> blush, nothing changed that should affect the relevant code.
>
> Anybody got any idea what's broken?
Unfortunately, I know exactly what is broken. First, pre7.4.2 didn't
use thread.c properly. Now that it does, you are breaking on this
issue:
/*
* Early POSIX draft of getpwuid_r() returns 'struct passwd *'.
* getpwuid_r(uid, resultbuf, buffer, buflen)
* Do we need to support it? bjm 2003-08-14
*/
/* POSIX version */
getpwuid_r(uid, resultbuf, buffer, buflen, result);
Notice the comment. Do we have to support getpwuid_r that returns
passwd *, and doesn't take a fourth argument? Yea, for Solaris 7 & 8,
we now we now do. I think you can get yours working by just changing
the call to:
result = getpwuid_r(uid, resultbuf, buffer, buflen);
I will have to add configure tests for this and it will work properly
for you in 7.4.3.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-03-19 16:39:28 | Re: [HACKERS] UnixWare/CVS Tip/initdb.c needs to use |
Previous Message | Denis Khabas | 2004-03-19 16:07:15 | Bad timestamp external representation |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-03-19 16:39:28 | Re: [HACKERS] UnixWare/CVS Tip/initdb.c needs to use |
Previous Message | Bruce Momjian | 2004-03-19 16:22:02 | Re: FAQ updates |