annotate m4/sched_h.m4 @ 17363:5a51fb7777a9

sys_select, sys_time: port 2013-01-30 Solaris 2.6 fix to Cygwin Problem reported by Marco Atzeri in <http://lists.gnu.org/archive/html/bug-gnulib/2013-03/msg00000.html>. * lib/sys_select.in.h [HAVE_SYS_SELECT_H && _CYGWIN_SYS_TIME_H]: Simply delegate to the system <sys/select.h> in this case too. Also, pay attention to _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H only if OSF/1, since otherwise Cygwin breaks, and it doesn't seem to be needed on Solaris either. * lib/sys_time.in.h [_CYGWIN_SYS_TIME_H]: Simply delgate to the system <sys/time.h> in this case.
author Paul Eggert <eggert@cs.ucla.edu>
date Tue, 19 Mar 2013 09:08:47 -0700
parents e542fd46ad6f
children 344018b6e5d7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15666
bbe6ab59b982 sched: Ensure pid_t is defined.
Bruno Haible <bruno@clisp.org>
parents: 15594
diff changeset
1 # sched_h.m4 serial 6
17249
e542fd46ad6f maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents: 16201
diff changeset
2 dnl Copyright (C) 2008-2013 Free Software Foundation, Inc.
10502
5a1ec3c6fb97 New module 'sched'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 dnl This file is free software; the Free Software Foundation
5a1ec3c6fb97 New module 'sched'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
5a1ec3c6fb97 New module 'sched'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
5a1ec3c6fb97 New module 'sched'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6
5a1ec3c6fb97 New module 'sched'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 dnl Written by Bruno Haible.
5a1ec3c6fb97 New module 'sched'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8
5a1ec3c6fb97 New module 'sched'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 AC_DEFUN([gl_SCHED_H],
5a1ec3c6fb97 New module 'sched'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 [
10806
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
11 AC_COMPILE_IFELSE(
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
12 [AC_LANG_PROGRAM([[
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
13 #include <sched.h>
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
14 struct sched_param a;
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
15 int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
15666
bbe6ab59b982 sched: Ensure pid_t is defined.
Bruno Haible <bruno@clisp.org>
parents: 15594
diff changeset
16 pid_t t1;
10806
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
17 ]])],
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
18 [SCHED_H=''],
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
19 [SCHED_H='sched.h'
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
20
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
21 gl_CHECK_NEXT_HEADERS([sched.h])
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
22
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
23 if test $ac_cv_header_sched_h = yes; then
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
24 HAVE_SCHED_H=1
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
25 else
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
26 HAVE_SCHED_H=0
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
27 fi
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
28 AC_SUBST([HAVE_SCHED_H])
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
29
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
30 AC_CHECK_TYPE([struct sched_param],
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
31 [HAVE_STRUCT_SCHED_PARAM=1], [HAVE_STRUCT_SCHED_PARAM=0],
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
32 [#include <sched.h>])
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
33 AC_SUBST([HAVE_STRUCT_SCHED_PARAM])
15594
f4cfbb6036d8 Ensure pid_t gets defined.
Bruno Haible <bruno@clisp.org>
parents: 14528
diff changeset
34
f4cfbb6036d8 Ensure pid_t gets defined.
Bruno Haible <bruno@clisp.org>
parents: 14528
diff changeset
35 dnl Ensure the type pid_t gets defined.
f4cfbb6036d8 Ensure pid_t gets defined.
Bruno Haible <bruno@clisp.org>
parents: 14528
diff changeset
36 AC_REQUIRE([AC_TYPE_PID_T])
10806
88888cd66a05 Make the 'sched' module work on platforms where <sched.h> is incomplete.
Bruno Haible <bruno@clisp.org>
parents: 10502
diff changeset
37 ])
10502
5a1ec3c6fb97 New module 'sched'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38 AC_SUBST([SCHED_H])
14528
662ae53d8d37 Remove leftover generated .h files after config.status changed.
Bruno Haible <bruno@clisp.org>
parents: 14211
diff changeset
39 AM_CONDITIONAL([GL_GENERATE_SCHED_H], [test -n "$SCHED_H"])
10502
5a1ec3c6fb97 New module 'sched'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40 ])