1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-27 23:21:58 +03:00

Fix linking problem when enabling thread safety on Darwin: uninitialized

global variables are problematic on this platform.  Simplest solution
seems to be to initialize pthread key variable to 0.  Also, rename this
variable and check_sigpipe_handler to something involving "pq" to
avoid gratuitous pollution of application namespace.
This commit is contained in:
Tom Lane
2004-08-17 04:24:23 +00:00
parent 8b82a705c8
commit 109d7aff73
4 changed files with 16 additions and 16 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.279 2004/08/11 18:06:01 tgl Exp $
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.280 2004/08/17 04:24:23 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -886,7 +886,7 @@ connectDBStart(PGconn *conn)
static pthread_once_t check_sigpipe_once = PTHREAD_ONCE_INIT;
/* Check only on first connection request */
pthread_once(&check_sigpipe_once, check_sigpipe_handler);
pthread_once(&check_sigpipe_once, pq_check_sigpipe_handler);
#endif
#endif