X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fsys_wait.in.h;h=20ec56a48f45bc5d39810d6f06ac04c1f3faecd8;hb=c2d6edf0a3e65a01be60e4763b523934021f2c76;hp=0006112ead3a6433bb794dfaedb746524f29f3e2;hpb=f6587ab7ca1ef3cc68b1c0ef6971022fff08bcee;p=gnulib.git diff --git a/lib/sys_wait.in.h b/lib/sys_wait.in.h index 0006112ea..20ec56a48 100644 --- a/lib/sys_wait.in.h +++ b/lib/sys_wait.in.h @@ -1,5 +1,5 @@ /* A POSIX-like . - Copyright (C) 2001-2003, 2005-2010 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2011 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,6 +21,7 @@ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif +@PRAGMA_COLUMNS@ /* The include_next requires a split double-inclusion guard. */ #if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) @@ -30,6 +31,15 @@ #ifndef _GL_SYS_WAIT_H #define _GL_SYS_WAIT_H +/* Get pid_t. */ +#include + + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ + +/* The definition of _GL_WARN_ON_USE is copied here. */ + + #if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) /* Unix API. */ @@ -71,24 +81,11 @@ # define WCOREDUMP(x) ((x) & 0x80) # endif -# ifdef __cplusplus -extern "C" { -# endif - -/* Declarations of functions. */ - -# ifdef __cplusplus -} -# endif - #else /* Native Windows API. */ -# include /* for _cwait, WAIT_CHILD */ # include /* for SIGTERM */ -# define waitpid(pid,statusp,options) _cwait (statusp, pid, WAIT_CHILD) - /* The following macros apply to an argument x, that is a status of a process, as returned by waitpid() or, equivalently, _cwait() or GetExitCodeProcess(). This value is simply an 'int', not composed of bit fields. */ @@ -111,5 +108,23 @@ extern "C" { #endif + +/* Declarations of functions. */ + +#if @GNULIB_WAITPID@ +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +_GL_FUNCDECL_SYS (waitpid, pid_t, (pid_t pid, int *statusp, int options)); +# endif +_GL_CXXALIAS_SYS (waitpid, pid_t, (pid_t pid, int *statusp, int options)); +_GL_CXXALIASWARN (waitpid); +#elif defined GNULIB_POSIXCHECK +# undef waitpid +# if HAVE_RAW_DECL_WAITPID +_GL_WARN_ON_USE (waitpid, "waitpid is unportable - " + "use gnulib module sys_wait for portability"); +# endif +#endif + + #endif /* _GL_SYS_WAIT_H */ #endif /* _GL_SYS_WAIT_H */