8000 More thread test program improvements. · postgrespro/postgres_cluster@f9a2d0b · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

< 8000 /qbsearch-input>
Appearance settings

Commit f9a2d0b

Browse files
committed
More thread test program improvements.
1 parent 53b5455 commit f9a2d0b

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

src/tools/thread/thread_test.c

Lines changed: 17 additions & 11 deletions
platform_is_threadsafe = false;
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
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 $
1010
*
1111
* This program tests to see if your standard libc functions use
1212
* pthread_setspecific()/pthread_getspecific() to be thread-safe.
@@ -139,37 +139,43 @@ defines to your template/$port file before compiling this program.\n\n"
139139
#ifdef HAVE_STRERROR_R
140140
printf("Your system has sterror_r(), so it doesn't use strerror().\n");
141141
#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
144146
{
145147
146-
printf("That function is not thread-safe\n");
148+
printf("not thread-safe\n");
147149
}
148150
#endif
149151

150152
#ifdef HAVE_GETPWUID_R
151153
printf("Your system has getpwuid_r(), so it doesn't use getpwuid().\n");
152154
#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
155159
{
156160
platform_is_threadsafe = false;
157-
printf("That function is not thread-safe\n");
161+
printf("not thread-safe\n");
158162
}
159163
#endif
160164

161165
#ifdef HAVE_GETADDRINFO
162166
printf("Your system has getaddrinfo(), so it doesn't use gethostbyname()\n"
163-
"or gethostbyname_r().\n");
167+
" or gethostbyname_r().\n");
164168
#else
165169
#ifdef HAVE_GETHOSTBYNAME_R
166170
printf("Your system has gethostbyname_r(), so it doesn't use gethostbyname().\n");
167171
#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
170176
{
171177
platform_is_threadsafe = false;
172-
printf("That function is not thread-safe\n");
178+
printf("not thread-safe\n");
173179
}
174180
#endif
175181
#endif

0 commit comments

Comments
 (0)
0