From b49ab5f4503f36dcbf43f821f817da66b2931fe6 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 14 Apr 2016 08:54:57 +0200 Subject: Remove union wait [BZ #19613] The overloading approach in the W* macros was incompatible with integer expressions of a type different from int. Applications using union wait and these macros will have to migrate to the POSIX-specified int status type. --- bits/waitstatus.h | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) (limited to 'bits') diff --git a/bits/waitstatus.h b/bits/waitstatus.h index 38c33bc..069ce4b 100644 --- a/bits/waitstatus.h +++ b/bits/waitstatus.h @@ -57,49 +57,3 @@ #define __W_STOPCODE(sig) ((sig) << 8 | 0x7f) #define __W_CONTINUED 0xffff #define __WCOREFLAG 0x80 - - -#ifdef __USE_MISC - -# include - -union wait - { - int w_status; - struct - { -# if __BYTE_ORDER == __LITTLE_ENDIAN - unsigned int __w_termsig:7; /* Terminating signal. */ - unsigned int __w_coredump:1; /* Set if dumped core. */ - unsigned int __w_retcode:8; /* Return code if exited normally. */ - unsigned int:16; -# endif /* Little endian. */ -# if __BYTE_ORDER == __BIG_ENDIAN - unsigned int:16; - unsigned int __w_retcode:8; - unsigned int __w_coredump:1; - unsigned int __w_termsig:7; -# endif /* Big endian. */ - } __wait_terminated; - struct - { -# if __BYTE_ORDER == __LITTLE_ENDIAN - unsigned int __w_stopval:8; /* W_STOPPED if stopped. */ - unsigned int __w_stopsig:8; /* Stopping signal. */ - unsigned int:16; -# endif /* Little endian. */ -# if __BYTE_ORDER == __BIG_ENDIAN - unsigned int:16; - unsigned int __w_stopsig:8; /* Stopping signal. */ - unsigned int __w_stopval:8; /* W_STOPPED if stopped. */ -# endif /* Big endian. */ - } __wait_stopped; - }; - -# define w_termsig __wait_terminated.__w_termsig -# define w_coredump __wait_terminated.__w_coredump -# define w_retcode __wait_terminated.__w_retcode -# define w_stopsig __wait_stopped.__w_stopsig -# define w_stopval __wait_stopped.__w_stopval - -#endif /* Use misc. */ -- cgit v1.1