aboutsummaryrefslogtreecommitdiff
path: root/src/tools/test_thread_funcs.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2003-09-03 19:36:31 +0000
committerBruce Momjian <bruce@momjian.us>2003-09-03 19:36:31 +0000
commit2310dd3af243d54c1fdd4f6f68f0d1041e92142a (patch)
tree04807c56b092a47db0e932abe954d6ba1942338b /src/tools/test_thread_funcs.c
parent4cc247f74b842663a657a9776aaad9c54ccfa262 (diff)
downloadpostgresql-2310dd3af243d54c1fdd4f6f68f0d1041e92142a.tar.gz
postgresql-2310dd3af243d54c1fdd4f6f68f0d1041e92142a.zip
Add reporting of specificy threading failure functions.
Diffstat (limited to 'src/tools/test_thread_funcs.c')
-rw-r--r--src/tools/test_thread_funcs.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/tools/test_thread_funcs.c b/src/tools/test_thread_funcs.c
index 6661f5e8671..9d7b3ab83ae 100644
--- a/src/tools/test_thread_funcs.c
+++ b/src/tools/test_thread_funcs.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/tools/Attic/test_thread_funcs.c,v 1.1 2003/09/03 19:30:31 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/tools/Attic/test_thread_funcs.c,v 1.2 2003/09/03 19:36:31 momjian Exp $
*
* This program tests to see if your standard libc functions use
* pthread_setspecific()/pthread_getspecific() to be thread-safe.
@@ -62,6 +62,13 @@ int main(int argc, char *argv[])
pthread_join(thread1, NULL);
pthread_join(thread2, NULL);
+ if (hostent_p1 == hostent_p2)
+ printf("Your gethostbyname() is _not_ thread-safe\n");
+ if (passwd_p1 == passwd_p2)
+ printf("Your getpwuid() is _not_ thread-safe\n");
+ if (strerror_p1 == strerror_p2)
+ printf("Your strerror() is _not_ thread-safe\n");
+
if (hostent_p1 != hostent_p2 &&
passwd_p1 != passwd_p2 &&
strerror_p1 != strerror_p2)