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

Re: [HACKERS] 7.4.2 Build broken on (Sparc) Solaris 7 and 8

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Jim Seymour <jseymour(at)LinxNet(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] 7.4.2 Build broken on (Sparc) Solaris 7 and 8
Date: 2004-03-22 01:48:55
Message-ID: 200403220148.i2M1mt629619@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Jim Seymour wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> wrote:
> > 
> [snip]
> > 
> > OK, patch attached and applied.  It adds configure tests for the 5-arg
> > version of getpwuid_r() and properly falls back to the Posix draft
> > version you have on Solaris.  Seems Solaris 9 also still has the draft
> > version.
> [snip]
> 
> Well, yes and no.  If you define _POSIX_PTHREAD_SEMANTICS, you get the
> 5-arg version.  It looks like this has been the case at least back to
> Solaris 2.5.1.
> 
> I didn't really expect anything prior to 2.5.1 to be an issue, so I
> didn't bother looking into fixes for anything beyond that.

Oh, very interesting.  CVS HEAD has in template/solaris:
	
	# tools/thread/thread_test must be run
	if test "$GCC" = yes
	then    THREAD_CPPFLAGS="-D_POSIX_PTHREAD_SEMANTICS"
	        THREAD_LIBS="-pthread"
	else    THREAD_CPPFLAGS="-mt -D_POSIX_PTHREAD_SEMANTICS"
	        THREAD_LIBS="-lpthread"
	fi

I added the "-D_POSIX_PTHREAD_SEMANTICS"  flags into post-7.4.2, so it
seems this platform would work even without checking for the 4-arg
getpwuid_r version.  However, I noticed that 'man getpwuid_r' only
mentions the 4-arg version.

I will leave the 4-arg check in. The original author thought it might be
needed, and the Solaris manual mentions it, so odds are some other
platforms will hit it too, and perhaps not have the 5-arg version.

Thanks for the research.  I will add a mention in the solaris template
file.

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

In response to

pgsql-hackers by date

Next:From: Kris JurkaDate: 2004-03-22 01:55:17
Subject: Re: execute command tag including affected rows count
Previous:From: Christopher Kings-LynneDate: 2004-03-22 01:31:57
Subject: Re: pg_autovacuum next steps

pgsql-patches by date

Next:From: Bruce MomjianDate: 2004-03-22 03:38:44
Subject: Re: change output of \dp
Previous:From: Tom LaneDate: 2004-03-21 22:57:26
Subject: Re: listening addresses

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