Threading in libpg on Solaris

From: Martin Renters <martin(at)datafax(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Threading in libpg on Solaris
Date: 2002-03-27 16:28:16
Message-ID: 20020327112816.D7865@aspen.datafax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I'm working on getting libpq to function in a multi-threaded program on
Solaris and I was getting errors back from the library about
being unable to receive from the server. It turns out that on Solaris
you need to compile libpq with the -D_REENTRANT flags set so that
it defines errno to be a function call instead of a global variable.
Once I did this the program worked without any problems.

You want to consider making this flag standard (or at least provide
a configure option to compile a thread-ready version of libpq) as it
may save someone else the hassle of trying to figure out what went
wrong.

Martin

Browse pgsql-hackers by date

  From Date Subject
Next Message Bradley McLean 2002-03-27 16:28:49 Patch to add real cancel to ODBC driver
Previous Message Bruce Momjian 2002-03-27 16:16:18 Re: Problem with reloading groups in pg_hba.conf