aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/stdtime
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>1998-02-18 01:20:33 +0000
committerJulian Elischer <julian@FreeBSD.org>1998-02-18 01:20:33 +0000
commit39a9295edc5052ad6b8513aed9986272d5ec9b68 (patch)
tree6be248ea7d6ad06fd92a88e734bb0b0845323ba5 /lib/libc/stdtime
parent934fb1c520469408cc200cd5b793d930cb445659 (diff)
downloadsrc-39a9295edc5052ad6b8513aed9986272d5ec9b68.tar.gz
src-39a9295edc5052ad6b8513aed9986272d5ec9b68.zip
Submitted by: Jeremy Allison (jallison@whistle.com)
fix a slight confusion about which draft of threads we are supporting. this allows something as big and ugly as samba to be compiled with libc_r and still work! our user-level pthreads seems amazingly robust!
Notes
Notes: svn path=/head/; revision=33527
Diffstat (limited to 'lib/libc/stdtime')
-rw-r--r--lib/libc/stdtime/localtime.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libc/stdtime/localtime.c b/lib/libc/stdtime/localtime.c
index 3438cc673e72..204bac0c9c91 100644
--- a/lib/libc/stdtime/localtime.c
+++ b/lib/libc/stdtime/localtime.c
@@ -1191,9 +1191,11 @@ const time_t * const timep;
}
}
pthread_mutex_unlock(&gmtime_mutex);
- if ((p_tm = pthread_getspecific(gmtime_key)) != 0) {
- return(NULL);
- } else if (p_tm == NULL) {
+ /*
+ * Changed to follow draft 4 pthreads standard, which
+ * is what BSD currently has.
+ */
+ if ((p_tm = pthread_getspecific(gmtime_key)) == NULL) {
if ((p_tm = (struct tm *)malloc(sizeof(struct tm))) == NULL) {
return(NULL);
}