[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: VMS has struct sched_param in pthread.h

From: Bruno Haible
Subject: Re: VMS has struct sched_param in pthread.h
Date: Thu, 06 Jul 2017 00:05:25 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-83-generic; KDE/5.18.0; x86_64; ; )

> 2017-06-19  Bruno Haible  <address@hidden>
>             John E. Malmberg  <address@hidden>  (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 address@hidden@
gets transformed into
  #if !
which, of course is a syntax error.

2017-07-05  Bruno Haible  <address@hidden>

        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>
        case "$host_os" in
            dnl On OS/2 kLIBC, struct sched_param is in spawn.h.
            AC_CHECK_TYPE([struct sched_param],
+             [HAVE_STRUCT_SCHED_PARAM=1], [],
              [#include <spawn.h>])
            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], [],
              [#include <pthread.h>])

reply via email to

[Prev in Thread] Current Thread [Next in Thread]