X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fgdb_wait.h;h=fec6f602a83bcdc6000cea2b74fa540d34fd7a54;hb=61846f2867574d357e57650f9032ba60d4e32d0d;hp=d0f94f30c4a5ada07d9405452026daeed521e90c;hpb=abd8680d6efd97e7ba848a6392ee3ad72be18cd0;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/gdb_wait.h b/gdb/gdb_wait.h index d0f94f30c4..fec6f602a8 100644 --- a/gdb/gdb_wait.h +++ b/gdb/gdb_wait.h @@ -39,8 +39,8 @@ /* The following macros are defined equivalently to their definitions in POSIX.1. We fail to define WNOHANG and WUNTRACED, which POSIX.1 defines, since our code does not use waitpid() (but - NOTE exception for Linux below). - We also fail to declare wait() and waitpid(). */ + NOTE exception for GNU/Linux below). We also fail to declare + wait() and waitpid(). */ #ifndef WIFEXITED #define WIFEXITED(w) (((w)&0377) == 0) @@ -86,18 +86,24 @@ #endif #ifndef WSETEXIT +# ifdef W_EXITCODE +#define WSETEXIT(w,status) ((w) = W_EXITCODE(status,0)) +# else #define WSETEXIT(w,status) ((w) = (0 | ((status) << 8))) +# endif #endif #ifndef WSETSTOP +# ifdef W_STOPCODE +#define WSETSTOP(w,sig) ((w) = W_STOPCODE(sig)) +# else #define WSETSTOP(w,sig) ((w) = (0177 | ((sig) << 8))) +# endif #endif -/* - * For native Linux we may use waitpid and the __WCLONE option. - * It is of course dangerous not to use the REAL header file... - * - */ +/* For native GNU/Linux we may use waitpid and the __WCLONE option. + It is of course dangerous not to use the REAL header file... + . */ /* Bits in the third argument to `waitpid'. */ #ifndef WNOHANG