summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--attr.c2
-rw-r--r--pthread.h2
3 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6e73134..724e0be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,11 @@
1998-10-03 Ben Elliston <bje@cygnus.com>
+ * attr.c (pthread_attr_init): Only zero out the `sigmask' member
+ if we have the sigset_t type.
+
* pthread.h: No need to include <unistd.h>. It doesn't even exist
on Win32! Again, an artifact of cross-compilation.
+ (pthread_sigmask): Only provide if we have the sigset_t type.
* process.h: Remove. This was a stand-in before we started doing
native compilation under Win32.
diff --git a/attr.c b/attr.c
index 999935f..994a2f2 100644
--- a/attr.c
+++ b/attr.c
@@ -102,7 +102,9 @@ pthread_attr_init(pthread_attr_t *attr)
#endif
attr->detachedstate = PTHREAD_CREATE_JOINABLE;
+#ifdef HAVE_SIGSET_T
memset(&(attr->sigmask), 0, sizeof(sigset_t));
+#endif /* HAVE_SIGSET_T */
/* Priority uses Win32 priority values. */
attr->priority = THREAD_PRIORITY_NORMAL;
diff --git a/pthread.h b/pthread.h
index b657ed5..d3fdb8a 100644
--- a/pthread.h
+++ b/pthread.h
@@ -261,9 +261,11 @@ int pthread_key_delete(pthread_key_t key);
/* Signal handling. */
+#if HAVE_SIGSET_T
int pthread_sigmask(int how,
const sigset_t *set,
sigset_t *oset);
+#endif /* HAVE_SIGSET_T */
/* Thread cancelation functions. */