|
6 | 6 | * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
7 | 7 | * Portions Copyright (c) 1994, Regents of the University of California
|
8 | 8 | *
|
9 |
| - *$PostgreSQL: pgsql/src/tools/thread/thread_test.c,v 1.17 2004/04/21 20:51:54 momjian Exp $ |
| 9 | + *$PostgreSQL: pgsql/src/tools/thread/thread_test.c,v 1.18 2004/04/21 20:58:56 momjian Exp $ |
10 | 10 | *
|
11 | 11 | *This program tests to see if your standard libc functions use
|
12 | 12 | *pthread_setspecific()/pthread_getspecific() to be thread-safe.
|
@@ -139,37 +139,43 @@ defines to your template/$port file before compiling this program.\n\n"
|
139 | 139 | #ifdefHAVE_STRERROR_R
|
140 | 140 | printf("Your system has sterror_r(), so it doesn't use strerror().\n");
|
141 | 141 | #else
|
142 |
| -printf("Your system uses strerror().\n"); |
143 |
| -if (!strerror_threadsafe) |
| 142 | +printf("Your system uses strerror() which is "); |
| 143 | +if (strerror_threadsafe) |
| 144 | +printf("thread-safe\n"); |
| 145 | +else |
144 | 146 | {
|
145 | 147 | platform_is_threadsafe= false;
|
146 |
| -printf("That function isnot thread-safe\n"); |
| 148 | +printf("not thread-safe\n"); |
147 | 149 | }
|
148 | 150 | #endif
|
149 | 151 |
|
150 | 152 | #ifdefHAVE_GETPWUID_R
|
151 | 153 | printf("Your system has getpwuid_r(), so it doesn't use getpwuid().\n");
|
152 | 154 | #else
|
153 |
| -printf("Your system uses getpwuid().\n"); |
154 |
| -if (!getpwuid_threadsafe) |
| 155 | +printf("Your system uses getpwuid() which is "); |
| 156 | +if (getpwuid_threadsafe) |
| 157 | +printf("thread-safe\n"); |
| 158 | +else |
155 | 159 | {
|
156 | 160 | platform_is_threadsafe= false;
|
157 |
| -printf("That function isnot thread-safe\n"); |
| 161 | +printf("not thread-safe\n"); |
158 | 162 | }
|
159 | 163 | #endif
|
160 | 164 |
|
161 | 165 | #ifdefHAVE_GETADDRINFO
|
162 | 166 | printf("Your system has getaddrinfo(), so it doesn't use gethostbyname()\n"
|
163 |
| -"or gethostbyname_r().\n"); |
| 167 | +"or gethostbyname_r().\n"); |
164 | 168 | #else
|
165 | 169 | #ifdefHAVE_GETHOSTBYNAME_R
|
166 | 170 | printf("Your system has gethostbyname_r(), so it doesn't use gethostbyname().\n");
|
167 | 171 | #else
|
168 |
| -printf("Your system uses gethostbyname().\n"); |
169 |
| -if (!gethostbyname_threadsafe) |
| 172 | +printf("Your system uses gethostbyname which is "); |
| 173 | +if (gethostbyname_threadsafe) |
| 174 | +printf("thread-safe\n"); |
| 175 | +else |
170 | 176 | {
|
171 | 177 | platform_is_threadsafe= false;
|
172 |
| -printf("That function isnot thread-safe\n"); |
| 178 | +printf("not thread-safe\n"); |
173 | 179 | }
|
174 | 180 | #endif
|
175 | 181 | #endif
|
|