Fix foreach_with_prefix regression
[deliverable/binutils-gdb.git] / gdb / common / gdb_wait.h
index af61591764999f0bd67382c2d44e28df2f4486a0..b3b752cf3a2bc6aa7aa025bb3812e39541f8ff4c 100644 (file)
@@ -1,5 +1,5 @@
 /* Standard wait macros.
-   Copyright (C) 2000-2014 Free Software Foundation, Inc.
+   Copyright (C) 2000-2019 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -16,8 +16,8 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifndef GDB_WAIT_H
-#define GDB_WAIT_H
+#ifndef COMMON_GDB_WAIT_H
+#define COMMON_GDB_WAIT_H
 
 #ifdef HAVE_SYS_WAIT_H
 #include <sys/wait.h> /* POSIX */
 # endif
 #endif
 
+#ifndef W_STOPCODE
+#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
+#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 GNU/Linux we may use waitpid and the __WCLONE option.
 #define __WCLONE       0x80000000 /* Wait for cloned process.  */
 #endif
 
-#endif
+#endif /* COMMON_GDB_WAIT_H */
This page took 0.043238 seconds and 4 git commands to generate.