summaryrefslogtreecommitdiff
path: root/m4/sched_h.m4
diff options
context:
space:
mode:
authorKO Myung-Hun <komh78@gmail.com>2014-12-04 10:03:34 +0900
committerEric Blake <eblake@redhat.com>2014-12-08 13:36:46 -0700
commit5945e4ee5c9d2e1fb4876f871ba14fdc1b0e5481 (patch)
treec312ee86c49a62de2271c0a70716329656c0a7e4 /m4/sched_h.m4
parentcf88e56ab3575e41c297a52c10d35e5d67ff909d (diff)
downloadgnulib-5945e4ee5c9d2e1fb4876f871ba14fdc1b0e5481.tar.gz
sched: check struct sched_param in spawn.h as well
On OS/2 kLIBC, struct sched_param is in spawn.h. So without this a redefinition error occurs when sched.h is inclued by spawn.h. * lib/sched.in.h: Include spawn.h on kLIBC. * lib/sched_h.m4: Check struct sched_param in spawn.h as well.
Diffstat (limited to 'm4/sched_h.m4')
-rw-r--r--m4/sched_h.m415
1 files changed, 11 insertions, 4 deletions
diff --git a/m4/sched_h.m4 b/m4/sched_h.m4
index 329af351ff..49c10ccdc5 100644
--- a/m4/sched_h.m4
+++ b/m4/sched_h.m4
@@ -1,4 +1,4 @@
-# sched_h.m4 serial 6
+# sched_h.m4 serial 7
dnl Copyright (C) 2008-2014 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -27,9 +27,16 @@ AC_DEFUN([gl_SCHED_H],
fi
AC_SUBST([HAVE_SCHED_H])
- AC_CHECK_TYPE([struct sched_param],
- [HAVE_STRUCT_SCHED_PARAM=1], [HAVE_STRUCT_SCHED_PARAM=0],
- [#include <sched.h>])
+ if test "$HAVE_SCHED_H" = 1; then
+ AC_CHECK_TYPE([struct sched_param],
+ [HAVE_STRUCT_SCHED_PARAM=1], [HAVE_STRUCT_SCHED_PARAM=0],
+ [#include <sched.h>])
+ else
+ dnl On OS/2 kLIBC, struct sched_param is in spawn.h.
+ AC_CHECK_TYPE([struct sched_param],
+ [HAVE_STRUCT_SCHED_PARAM=1], [HAVE_STRUCT_SCHED_PARAM=0],
+ [#include <spawn.h>])
+ fi
AC_SUBST([HAVE_STRUCT_SCHED_PARAM])
dnl Ensure the type pid_t gets defined.