2222
2323#if !defined(IN_CONFIGURE ) && !defined(WIN32 )
2424#include "postgres.h"
25- #else
26- /* From src/include/c.h" */
27- #ifndef bool
28- typedef char bool ;
29- #endif
30-
31- #ifndef true
32- #define true ((bool) 1)
33- #endif
34-
35- #ifndef false
36- #define false ((bool) 0)
37- #endif
3825#endif
3926
4027#include <stdio.h>
@@ -93,23 +80,23 @@ static volatile int errno2_set = 0;
9380#ifndef HAVE_STRERROR_R
9481static char * strerror_p1 ;
9582static char * strerror_p2 ;
96- static bool strerror_threadsafe = false ;
83+ static int strerror_threadsafe = 0 ;
9784#endif
9885
9986#if !defined(WIN32 ) && !defined(HAVE_GETPWUID_R )
10087static struct passwd * passwd_p1 ;
10188static struct passwd * passwd_p2 ;
102- static bool getpwuid_threadsafe = false ;
89+ static int getpwuid_threadsafe = 0 ;
10390#endif
10491
10592#if !defined(HAVE_GETADDRINFO ) && !defined(HAVE_GETHOSTBYNAME_R )
10693static struct hostent * hostent_p1 ;
10794static struct hostent * hostent_p2 ;
10895static char myhostname [MAXHOSTNAMELEN ];
109- static bool gethostbyname_threadsafe = false ;
96+ static int gethostbyname_threadsafe = 0 ;
11097#endif
11198
112- static bool platform_is_threadsafe = true ;
99+ static int platform_is_threadsafe = 1 ;
113100
114101int
115102main (int argc , char * argv [])
@@ -187,17 +174,17 @@ main(int argc, char *argv[])
187174
188175#ifndef HAVE_STRERROR_R
189176 if (strerror_p1 != strerror_p2 )
190- strerror_threadsafe = true ;
177+ strerror_threadsafe = 1 ;
191178#endif
192179
193180#if !defined(WIN32 ) && !defined(HAVE_GETPWUID_R )
194181 if (passwd_p1 != passwd_p2 )
195- getpwuid_threadsafe = true ;
182+ getpwuid_threadsafe = 1 ;
196183#endif
197184
198185#if !defined(HAVE_GETADDRINFO ) && !defined(HAVE_GETHOSTBYNAME_R )
199186 if (hostent_p1 != hostent_p2 )
200- gethostbyname_threadsafe = true ;
187+ gethostbyname_threadsafe = 1 ;
201188#endif
202189
203190 /* close down threads */
@@ -218,7 +205,7 @@ main(int argc, char *argv[])
218205 else
219206 {
220207 printf ("not thread-safe. **\n" );
221- platform_is_threadsafe = false ;
208+ platform_is_threadsafe = 0 ;
222209 }
223210#endif
224211
@@ -233,7 +220,7 @@ main(int argc, char *argv[])
233220 else
234221 {
235222 printf ("not thread-safe. **\n" );
236- platform_is_threadsafe = false ;
223+ platform_is_threadsafe = 0 ;
237224 }
238225#endif
239226
@@ -249,7 +236,7 @@ main(int argc, char *argv[])
249236 else
250237 {
251238 printf ("not thread-safe. **\n" );
252- platform_is_threadsafe = false ;
239+ platform_is_threadsafe = 0 ;
253240 }
254241#endif
255242
0 commit comments