diff --git a/abis/squiid/wait.h b/abis/squiid/wait.h index 72b86bc1..240dcc99 100644 --- a/abis/squiid/wait.h +++ b/abis/squiid/wait.h @@ -11,9 +11,9 @@ #define WSTOPSIG(x) (((x) & 0x0000ff00) >> 8) #define WTERMSIG(x) (((x) & 0x00ff0000) >> 16) -#define WIFCONTINUED(x) ((x) & 0x00100000) -#define WIFEXITED(x) ((x) & 0x00200000) -#define WIFSIGNALED(x) ((x) & 0x00400000) -#define WIFSTOPPED(x) ((x) & 0x00800000) +#define WIFCONTINUED(x) (((x) & 0x00100000) == 0x00100000) +#define WIFEXITED(x) (((x) & 0x00200000) == 0x00200000) +#define WIFSIGNALED(x) (((x) & 0x00400000) == 0x00400000) +#define WIFSTOPPED(x) (((x) & 0x00800000) == 0x00800000) #endif //_ABIBITS_WAIT_H diff --git a/sysdeps/squiid/include/squiid/process.h b/sysdeps/squiid/include/squiid/process.h index 56264859..31ee7dc8 100644 --- a/sysdeps/squiid/include/squiid/process.h +++ b/sysdeps/squiid/include/squiid/process.h @@ -61,9 +61,14 @@ #define SQ_WAIT_STAT_EXITED 0x200000 #define SQ_WAIT_STAT_SIGNALED 0x400000 #define SQ_WAIT_STAT_STOPPED 0x800000 -#define SQ_WAIT_STAT_EXITCODE_MASK 0xff -#define SQ_WAIT_STAT_STOPSIG_MASK 0xff00 -#define SQ_WAIT_STAT_TERMSIG_MASK 0xff0000 + +#define __SQ_WAIT_STAT_EXITCODE_SHIFT 0 +#define __SQ_WAIT_STAT_STOPSIG_SHIFT 8 +#define __SQ_WAIT_STAT_TERMSIG_SHIFT 16 + +#define SQ_WAIT_STAT_EXITCODE_MASK (0xff << __SQ_WAIT_STAT_EXITCODE_SHIFT) +#define SQ_WAIT_STAT_STOPSIG_MASK (0xff << __SQ_WAIT_STAT_STOPSIG_SHIFT) +#define SQ_WAIT_STAT_TERMSIG_MASK (0xff << __SQ_WAIT_STAT_TERMSIG_SHIFT) #ifndef __ASSEMBLER__