/* Lots of hair to allow traditional BSD use of `union wait'
as well as POSIX.1 use of `int' for the status word. */
-# ifdef __GNUC__
+# if defined __GNUC__ && !defined __cplusplus
# define __WAIT_INT(status) \
(__extension__ ({ union { __typeof(status) __in; int __i; } __u; \
__u.__in = (status); __u.__i; }))
allowed without complaint. __WAIT_STATUS_DEFN is the type used in
the actual function definitions. */
-# if !defined __GNUC__ || __GNUC__ < 2
+# if !defined __GNUC__ || __GNUC__ < 2 || defined __cplusplus
# define __WAIT_STATUS __ptr_t
# define __WAIT_STATUS_DEFN __ptr_t
# else
{
union wait *__uptr;
int *__iptr;
- } __WAIT_STATUS __attribute__ ((transparent_union));
+ } __WAIT_STATUS __attribute__ ((__transparent_union__));
# define __WAIT_STATUS_DEFN int *
#endif