diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-08-17 04:24:23 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-08-17 04:24:23 +0000 |
commit | 109d7aff73bb94570b36e6d4d9e4e3119b92d970 (patch) | |
tree | 37464a7d1dcc7fbca9eb09526d70573eaea7a700 /src/interfaces/libpq/fe-print.c | |
parent | 8b82a705c80f1027595170c15ec50fbcdb7f3539 (diff) | |
download | postgresql-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-print.c')
-rw-r--r-- | src/interfaces/libpq/fe-print.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/interfaces/libpq/fe-print.c b/src/interfaces/libpq/fe-print.c index 64b53fda3ab..af883e10ae2 100644 --- a/src/interfaces/libpq/fe-print.c +++ b/src/interfaces/libpq/fe-print.c @@ -10,7 +10,7 @@ * didn't really belong there. * * IDENTIFICATION - * $PostgreSQL: pgsql/src/interfaces/libpq/fe-print.c,v 1.51 2004/04/19 17:42:59 momjian Exp $ + * $PostgreSQL: pgsql/src/interfaces/libpq/fe-print.c,v 1.52 2004/08/17 04:24:23 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -188,7 +188,7 @@ PQprint(FILE *fout, { usePipe = 1; #ifdef ENABLE_THREAD_SAFETY - pthread_setspecific(thread_in_send, "t"); + pthread_setspecific(pq_thread_in_send, "t"); #else #ifndef WIN32 oldsigpipehandler = pqsignal(SIGPIPE, SIG_IGN); @@ -310,7 +310,7 @@ PQprint(FILE *fout, pclose(fout); #endif #ifdef ENABLE_THREAD_SAFETY - pthread_setspecific(thread_in_send, "f"); + pthread_setspecific(pq_thread_in_send, "f"); #else #ifndef WIN32 pqsignal(SIGPIPE, oldsigpipehandler); |