From e9b9f38495328915756f7a10c5ee08988908fed8 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 28 Sep 2008 13:22:59 +0200 Subject: [PATCH] New module 'sched'. --- ChangeLog | 8 ++++++++ doc/posix-headers/sched.texi | 8 ++++---- lib/sched.in.h | 25 +++++++++++++++++++++++++ m4/sched_h.m4 | 18 ++++++++++++++++++ modules/sched | 34 ++++++++++++++++++++++++++++++++++ 5 files changed, 89 insertions(+), 4 deletions(-) create mode 100644 lib/sched.in.h create mode 100644 m4/sched_h.m4 create mode 100644 modules/sched diff --git a/ChangeLog b/ChangeLog index fb7d84622..5ab003bfa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-09-28 Bruno Haible + + New module 'sched'. + * modules/sched: New file. + * lib/sched.in.h: New file. + * m4/sched_h.m4: New file. + * doc/posix-headers/sched.texi: Mention the new module. + 2008-09-27 Eric Blake Fix previous patch, and tweak references to $0. diff --git a/doc/posix-headers/sched.texi b/doc/posix-headers/sched.texi index 7117cbe74..677bb82f0 100644 --- a/doc/posix-headers/sched.texi +++ b/doc/posix-headers/sched.texi @@ -3,15 +3,15 @@ POSIX specification: @url{http://www.opengroup.org/susv3xbd/sched.h.html} -Gnulib module: --- +Gnulib module: sched Portability problems fixed by Gnulib: @itemize +@item +This header file is missing on some platforms: +mingw, BeOS. @end itemize Portability problems not fixed by Gnulib: @itemize -@item -This header file is missing on some platforms: -mingw, BeOS. @end itemize diff --git a/lib/sched.in.h b/lib/sched.in.h new file mode 100644 index 000000000..39c35bffb --- /dev/null +++ b/lib/sched.in.h @@ -0,0 +1,25 @@ +/* Replacement for platforms that lack it. + Copyright (C) 2008 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef _GL_SCHED_H +#define _GL_SCHED_H + +struct sched_param +{ + int sched_priority; +}; + +#endif /* _GL_SCHED_H */ diff --git a/m4/sched_h.m4 b/m4/sched_h.m4 new file mode 100644 index 000000000..697d82987 --- /dev/null +++ b/m4/sched_h.m4 @@ -0,0 +1,18 @@ +# sched_h.m4 serial 1 +dnl Copyright (C) 2008 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Written by Bruno Haible. + +AC_DEFUN([gl_SCHED_H], +[ + AC_CHECK_HEADERS_ONCE([sched.h]) + if test $ac_cv_header_sched_h = yes; then + SCHED_H='' + else + SCHED_H='sched.h' + fi + AC_SUBST([SCHED_H]) +]) diff --git a/modules/sched b/modules/sched new file mode 100644 index 000000000..e125fba9a --- /dev/null +++ b/modules/sched @@ -0,0 +1,34 @@ +Description: +A include file. + +Files: +lib/sched.in.h +m4/sched_h.m4 + +Depends-on: + +configure.ac: +gl_SCHED_H + +Makefile.am: +BUILT_SOURCES += $(SPAWN_H) + +# We need the following in order to create a replacement for when +# the system doesn't have one. +sched.h: sched.in.h + rm -f $@-t $@ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat < $(srcdir)/sched.in.h; \ + } > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += sched.h sched.h-t + +Include: + + +License: +LGPL + +Maintainer: +Bruno Haible + -- 2.11.0