Index: src/tools/thread/thread_test.c =================================================================== RCS file: /cvsroot/pgsql/src/tools/thread/thread_test.c,v retrieving revision 1.36 diff -c -c -r1.36 thread_test.c *** src/tools/thread/thread_test.c 31 Dec 2004 22:04:02 -0000 1.36 --- src/tools/thread/thread_test.c 9 Mar 2005 04:19:09 -0000 *************** *** 66,108 **** /* This must be down here because this is the code that uses threads. */ #include ! void func_call_1(void); ! void func_call_2(void); #define TEMP_FILENAME_1 "/tmp/thread_test.1.XXXXXX" #define TEMP_FILENAME_2 "/tmp/thread_test.2.XXXXXX" ! char *temp_filename_1; ! char *temp_filename_2; ! pthread_mutex_t init_mutex = PTHREAD_MUTEX_INITIALIZER; ! volatile int thread1_done = 0; ! volatile int thread2_done = 0; ! volatile int errno1_set = 0; ! volatile int errno2_set = 0; #ifndef HAVE_STRERROR_R ! char *strerror_p1; ! char *strerror_p2; ! bool strerror_threadsafe = false; #endif #ifndef HAVE_GETPWUID_R ! struct passwd *passwd_p1; ! struct passwd *passwd_p2; ! bool getpwuid_threadsafe = false; #endif #if !defined(HAVE_GETADDRINFO) && !defined(HAVE_GETHOSTBYNAME_R) ! struct hostent *hostent_p1; ! struct hostent *hostent_p2; ! char myhostname[MAXHOSTNAMELEN]; ! bool gethostbyname_threadsafe = false; #endif ! bool platform_is_threadsafe = true; int main(int argc, char *argv[]) --- 66,108 ---- /* This must be down here because this is the code that uses threads. */ #include ! static void func_call_1(void); ! static void func_call_2(void); #define TEMP_FILENAME_1 "/tmp/thread_test.1.XXXXXX" #define TEMP_FILENAME_2 "/tmp/thread_test.2.XXXXXX" ! static char *temp_filename_1; ! static char *temp_filename_2; ! static pthread_mutex_t init_mutex = PTHREAD_MUTEX_INITIALIZER; ! static volatile int thread1_done = 0; ! static volatile int thread2_done = 0; ! static volatile int errno1_set = 0; ! static volatile int errno2_set = 0; #ifndef HAVE_STRERROR_R ! static char *strerror_p1; ! static char *strerror_p2; ! static bool strerror_threadsafe = false; #endif #ifndef HAVE_GETPWUID_R ! static struct passwd *passwd_p1; ! static struct passwd *passwd_p2; ! static bool getpwuid_threadsafe = false; #endif #if !defined(HAVE_GETADDRINFO) && !defined(HAVE_GETHOSTBYNAME_R) ! static struct hostent *hostent_p1; ! static struct hostent *hostent_p2; ! static char myhostname[MAXHOSTNAMELEN]; ! static bool gethostbyname_threadsafe = false; #endif ! static bool platform_is_threadsafe = true; int main(int argc, char *argv[]) *************** *** 230,236 **** } } ! void func_call_1(void) { #if !defined(HAVE_GETPWUID_R) || \ --- 230,236 ---- } } ! static void func_call_1(void) { #if !defined(HAVE_GETPWUID_R) || \ *************** *** 301,307 **** } ! void func_call_2(void) { #if !defined(HAVE_GETPWUID_R) || \ --- 301,307 ---- } ! static void func_call_2(void) { #if !defined(HAVE_GETPWUID_R) || \