diff options
Diffstat (limited to 'signal/bits/types/sigval_t.h')
-rw-r--r-- | signal/bits/types/sigval_t.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/signal/bits/types/sigval_t.h b/signal/bits/types/sigval_t.h index 666598f0ca..a05d7f469f 100644 --- a/signal/bits/types/sigval_t.h +++ b/signal/bits/types/sigval_t.h @@ -1,13 +1,18 @@ #ifndef __sigval_t_defined #define __sigval_t_defined -/* Type for data associated with a signal. */ -union sigval -{ - int sival_int; - void *sival_ptr; -}; - -typedef union sigval sigval_t; +#include <bits/types/__sigval_t.h> + +/* To avoid sigval_t (not a standard type name) having C++ name + mangling depending on whether the selected standard includes union + sigval, it should not be defined at all when using a standard for + which the sigval name is not reserved; in that case, headers should + not include <bits/types/sigval_t.h> and should use only the + internal __sigval_t name. */ +#ifndef __USE_POSIX199309 +# error "sigval_t defined for standard not including union sigval" +#endif + +typedef __sigval_t sigval_t; #endif |