> 2017-06-19  Bruno Haible  <br...@clisp.org>
>             John E. Malmberg  <wb8...@gmail.com>  (tiny change)
> 
>       sched: Fix compilation failure on OpenVMS.
>       * m4/sched_h.m4 (gl_SCHED_H): Require AC_CANONICAL_HOST. On OpenVMS,
>       test whether <pthread.h> exists and defines struct sched_param.
>       * lib/sched.in.h: On OpenVMS, include <pthread.h>.

Oops, this patch brought a regression on platforms that don't have <sched.h>:
the line
  #if !@HAVE_STRUCT_SCHED_PARAM@
gets transformed into
  #if !
which, of course is a syntax error.


2017-07-05  Bruno Haible  <br...@clisp.org>

        sched: Fix build failure on native Windows (regression from 2017-06-19).
        * m4/sched_h.m4 (gl_SCHED_H): Set HAVE_STRUCT_SCHED_PARAM always.

diff --git a/m4/sched_h.m4 b/m4/sched_h.m4
index 213cf68..d5d12ee 100644
--- a/m4/sched_h.m4
+++ b/m4/sched_h.m4
@@ -1,4 +1,4 @@
-# sched_h.m4 serial 10
+# sched_h.m4 serial 11
 dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -42,17 +42,18 @@ AC_DEFUN([gl_SCHED_H],
            #include <sched.h>
          ]])
      else
+       HAVE_STRUCT_SCHED_PARAM=0
        case "$host_os" in
          os2*)
            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],
+             [HAVE_STRUCT_SCHED_PARAM=1], [],
              [#include <spawn.h>])
            ;;
          vms)
            dnl On OpenVMS 7.2 or newer, struct sched_param is in pthread.h.
            AC_CHECK_TYPE([struct sched_param],
-             [HAVE_STRUCT_SCHED_PARAM=1], [HAVE_STRUCT_SCHED_PARAM=0],
+             [HAVE_STRUCT_SCHED_PARAM=1], [],
              [#include <pthread.h>])
            ;;
        esac


Reply via email to