Re: solaris libpq threaded build fails

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Andrew Chernow <ac(at)esilo(dot)com>
Subject: Re: solaris libpq threaded build fails
Date: 2009-01-14 22:06:21
Message-ID: 200901142206.n0EM6LH12008@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:
> Merlin Moncure wrote:
> > On 1/14/09, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > > OK, patch attached and applied to CVS HEAD. The nsl (not 'nls') library
> > > check was removed in Postgres 8.2 here:
> >
> > As long as you are looking at this, can you take a peek at this patch?
> > http://archives.free.net.ph/message/20081116.053100.15b5801d.fi.html
> >
> > We had a similar problem on hpux 10.20. This was more invasive change
> > though.. At the time, Tom was ambivalent and Dunstan voted that the
> > platform was too old, so it never went in.
>
> Thanks, I looked it over. It does have the danger of affecting other
> platforms, so there would have to be more checks in there. Also the
> calling of the function with all null pointers seems dangerous, though I
> am not sure how else we could test this. It might be safer to create a
> conflicting function prototype and see if that throws a warning.
>
> I did a Google search and it seems there isn't an easy way to do the
> configure check except the approach you have taken. Your changes to
> thread.c seem fine.
>
> Comp.programming.threads, has a pretty ugly autoconf example in their
> FAQ with the conclusion:
>
> http://www.lambdacs.com/cpt/FAQ.html
>
> > Whom do I shoot?
>
> take your pick :-(
>
> Let me see if I can work up a more minimal patch.

OK, I ended up doing a compile test as you suggested because I was
worried that a mismatched 'const' might throw an error.

The patch is very similar to the one posted, though perhaps a little
cleaner.

I don't need the #undef _XOPEN_SOURCE_EXTENDED in autoconf because I am
testing for the 5-argument version.

Would someone please test this to make sure it works on their platforms.

Is there any objection to applying this to 8.4? While the operating
system is old, it seems we are having new users use threading on these
older operating systems, hence the need for a patch.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachment Content-Type Size
/pgpatches/thread text/x-diff 4.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2009-01-14 22:12:08 Re: async notification patch for dblink
Previous Message Bruce Momjian 2009-01-14 21:59:19 pgsql: Make 'find' syntax consistent; add .git exclusion to make_ctags.