2007-08-17 Michael Snyder <msnyder@access-company.com>
[deliverable/binutils-gdb.git] / gdb / gdb_wait.h
index d0f94f30c4a5ada07d9405452026daeed521e90c..60d756c6a0032ff76e31a71a01c64cfa54c3d5de 100644 (file)
@@ -1,5 +1,5 @@
 /* Standard wait macros.
-   Copyright 2000 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2007 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -15,8 +15,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
 
 #ifndef GDB_WAIT_H
 #define 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
    <sys/wait.h> 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)
 #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.
- *  <GRIPE> It is of course dangerous not to use the REAL header file...
- * </GRIPE>
- */
+/* For native GNU/Linux we may use waitpid and the __WCLONE option.
+  <GRIPE> It is of course dangerous not to use the REAL header file...
+  </GRIPE>.  */
 
 /* Bits in the third argument to `waitpid'.  */
 #ifndef WNOHANG
This page took 0.024472 seconds and 4 git commands to generate.