This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Non-scalar sigset_t
- From: Momchil Velikov <velco at fadata dot bg>
- To: libc-alpha at sources dot redhat dot com
- Date: 25 Nov 2002 01:46:42 +0200
- Subject: Non-scalar sigset_t
Fixed non-portable assumption for a scalar ``sigset_t''.
~velco
diff -rudpN libc/tags/initial/sysdeps/generic/sigset-cvt-mask.h libc/trunk/sysdeps/generic/sigset-cvt-mask.h
--- libc/tags/initial/sysdeps/generic/sigset-cvt-mask.h Sun Nov 24 23:48:41 2002
+++ libc/trunk/sysdeps/generic/sigset-cvt-mask.h Sun Nov 24 23:38:15 2002
@@ -27,7 +27,10 @@ static inline int __attribute__ ((unused
sigset_set_old_mask (sigset_t *set, int mask)
{
if (sizeof (__sigset_t) == sizeof (unsigned int))
- *set = (unsigned int) mask;
+ {
+ unsigned int *__set = (unsigned int *) set;
+ *__set = mask;
+ }
else
{
register unsigned int __sig;
@@ -49,7 +52,7 @@ static inline int __attribute__ ((unused
sigset_get_old_mask (const sigset_t *set)
{
if (sizeof (sigset_t) == sizeof (unsigned int))
- return (unsigned int) *set;
+ return * (unsigned int *) set;
else
{
unsigned int mask = 0;