• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/gettext-0.17/gettext-tools/gnulib-m4/
1# unionwait.m4 serial 1 (gettext-0.11)
2dnl Copyright (C) 1993-2002 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7dnl Taken from GNU make 3.79.1.
8
9AC_DEFUN([gt_UNION_WAIT],
10[
11AC_CHECK_FUNCS(waitpid)
12AC_MSG_CHECKING(for union wait)
13AC_CACHE_VAL(gt_cv_union_wait, [dnl
14AC_TRY_LINK([#include <sys/types.h>
15#include <sys/wait.h>],
16	    [union wait status; int pid; pid = wait (&status);
17#ifdef WEXITSTATUS
18/* Some POSIXoid systems have both the new-style macros and the old
19   union wait type, and they do not work together.  If union wait
20   conflicts with WEXITSTATUS et al, we don't want to use it at all.  */
21if (WEXITSTATUS (status) != 0) pid = -1;
22#ifdef WTERMSIG
23/* If we have WEXITSTATUS and WTERMSIG, just use them on ints.  */
24-- blow chunks here --
25#endif
26#endif
27#ifdef HAVE_WAITPID
28/* Make sure union wait works with waitpid.  */
29pid = waitpid (-1, &status, 0);
30#endif
31],
32	    [gt_cv_union_wait=yes], [gt_cv_union_wait=no])])
33if test "$gt_cv_union_wait" = yes; then
34  AC_DEFINE(HAVE_UNION_WAIT, 1,
35            [Define if <sys/wait.h> defines the 'union wait' type.])
36fi
37AC_MSG_RESULT($gt_cv_union_wait)
38])
39