aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-connect.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-08-17 04:24:23 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-08-17 04:24:23 +0000
commit109d7aff73bb94570b36e6d4d9e4e3119b92d970 (patch)
tree37464a7d1dcc7fbca9eb09526d70573eaea7a700 /src/interfaces/libpq/fe-connect.c
parent8b82a705c80f1027595170c15ec50fbcdb7f3539 (diff)
downloadpostgresql-109d7aff73bb94570b36e6d4d9e4e3119b92d970.tar.gz
postgresql-109d7aff73bb94570b36e6d4d9e4e3119b92d970.zip
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.
Diffstat (limited to 'src/interfaces/libpq/fe-connect.c')
-rw-r--r--src/interfaces/libpq/fe-connect.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c
index e4744854c55..b560f358a6c 100644
--- a/src/interfaces/libpq/fe-connect.c
+++ b/src/interfaces/libpq/fe-connect.c
@@ -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