OSDN Git Service

siginfo.h: __SIGEV_PAD_SIZE takes __WORDSIZE into account
authorVicente Olivert Riera <Vincent.Riera@imgtec.com>
Thu, 2 Jan 2014 15:02:12 +0000 (15:02 +0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Wed, 8 Jan 2014 11:34:06 +0000 (12:34 +0100)
Make __SIGEV_PAD_SIZE to take __WORDSIZE into account for alpha, mips
and ia64 arches.

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
libc/sysdeps/linux/alpha/bits/siginfo.h
libc/sysdeps/linux/ia64/bits/siginfo.h
libc/sysdeps/linux/mips/bits/siginfo.h

index 9993f66..0a37ad0 100644 (file)
@@ -257,7 +257,11 @@ enum
 
 /* Structure to transport application-defined values with signals.  */
 # define __SIGEV_MAX_SIZE      64
-# define __SIGEV_PAD_SIZE      ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
+# if __WORDSIZE == 64
+#  define __SIGEV_PAD_SIZE     ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
+# else
+#  define __SIGEV_PAD_SIZE     ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
+# endif
 
 typedef struct sigevent
   {
index 82cc73f..3ac988b 100644 (file)
@@ -297,7 +297,11 @@ enum
 
 /* Structure to transport application-defined values with signals.  */
 # define __SIGEV_MAX_SIZE      64
-# define __SIGEV_PAD_SIZE      ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
+# if __WORDSIZE == 64
+#  define __SIGEV_PAD_SIZE     ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
+# else
+#  define __SIGEV_PAD_SIZE     ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
+# endif
 
 typedef struct sigevent
   {
index 84b08ca..a6e4135 100644 (file)
@@ -264,8 +264,11 @@ enum
 
 /* Structure to transport application-defined values with signals.  */
 # define __SIGEV_MAX_SIZE      64
-# define __SIGEV_HEAD_SIZE     (sizeof(long) + 2*sizeof(int))
-# define __SIGEV_PAD_SIZE      ((__SIGEV_MAX_SIZE - __SIGEV_HEAD_SIZE) / sizeof (int))
+# if __WORDSIZE == 64
+#  define __SIGEV_PAD_SIZE     ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
+# else
+#  define __SIGEV_PAD_SIZE     ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
+# endif
 
 /* Forward declaration of the `pthread_attr_t' type.  */
 struct __pthread_attr_s;