about summary refs log tree commit diff
path: root/sysdeps/unix
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/aix/sigset-cvt-mask.h16
-rw-r--r--sysdeps/unix/sysv/linux/sigset-cvt-mask.h37
-rw-r--r--sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h26
3 files changed, 50 insertions, 29 deletions
diff --git a/sysdeps/unix/sysv/aix/sigset-cvt-mask.h b/sysdeps/unix/sysv/aix/sigset-cvt-mask.h
index 50d70ae81a..cc05fb70fa 100644
--- a/sysdeps/unix/sysv/aix/sigset-cvt-mask.h
+++ b/sysdeps/unix/sysv/aix/sigset-cvt-mask.h
@@ -18,8 +18,16 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#define sigset_set_old_mask(set, mask) \
-  ((set)->__losigs = (unsigned int) (mask), (set)->__hisigs = 0, 0)
+static inline int __attribute__ ((unused))
+sigset_set_old_mask (sigset_t *set, int mask)
+{
+  set->__losigs = (unsigned int) mask;
+  set->__hisigs = 0;
+  return 0;
+}
 
-#define sigset_get_old_mask(set, mask) \
-  ((unsigned int) (set)->__losigs)
+static inline int __attribute__ ((unused))
+sigset_get_old_mask (const sigset_t *set)
+{
+  return (unsigned int) set->__losigs;
+}
diff --git a/sysdeps/unix/sysv/linux/sigset-cvt-mask.h b/sysdeps/unix/sysv/linux/sigset-cvt-mask.h
index b86a101172..ca4774dbd6 100644
--- a/sysdeps/unix/sysv/linux/sigset-cvt-mask.h
+++ b/sysdeps/unix/sysv/linux/sigset-cvt-mask.h
@@ -19,17 +19,26 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#define sigset_set_old_mask(set, mask) \
-  ({									      \
-    unsigned long int *__ptr;						      \
-    int __cnt;								      \
-    __ptr = &(set)->__val[0];						      \
-    *__ptr++ = (unsigned long int) (mask);				      \
-    __cnt = _SIGSET_NWORDS - 2;						      \
-    do									      \
-      *__ptr++ = 0ul;							      \
-    while (--__cnt >= 0);						      \
-    0; })
-
-#define sigset_get_old_mask(set) \
-  ((unsigned int) (set)->__val[0])
+static inline int __attribute__ ((unused))
+sigset_set_old_mask (sigset_t *set, int mask)
+{
+  unsigned long int *ptr;
+  int cnt;
+
+  ptr = &set->__val[0];
+
+  *ptr++ = (unsigned int) mask;
+
+  cnt = _SIGSET_NWORDS - 2;
+  do
+    *ptr++ = 0ul;
+  while (--cnt >= 0);
+
+  return 0;
+}
+
+static inline int __attribute__ ((unused))
+sigset_get_old_mask (const sigset_t *set)
+{
+  return (unsigned int) set->__val[0];
+}
diff --git a/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h b/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h
index f647dfed86..5b7ea25885 100644
--- a/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h
+++ b/sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h
@@ -19,15 +19,19 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#define sigset_set_old_mask(set, mask) \
-  ({									      \
-    unsigned long int *__ptr;						      \
-    __ptr = &(set)->__sigbits[0];					      \
-    __ptr[0] = (mask);							      \
-    __ptr[1] = 0ul;							      \
-    __ptr[2] = 0ul;							      \
-    __ptr[3] = 0ul;							      \
-    0; })
+static inline int __attribute__ ((unused))
+sigset_set_old_mask (sigset_t *set, int mask)
+{
+  set->__sigbits[0] = (unsigned int) mask;
+  set->__sigbits[1] = 0ul;
+  set->__sigbits[2] = 0ul;
+  set->__sigbits[3] = 0ul;
 
-#define sigset_get_old_mask(set) \
-  ((unsigned int) (set)->__sigbits[0])
+  return 0;
+}
+
+static inline int __attribute__ ((unused))
+sigset_get_old_mask (const sigset_t *set)
+{
+  return (unsigned int) set->__sigbits[0];
+}