changeset 30193:af87096ba89d

New module 'sched'.
author Bruno Haible <bruno@clisp.org>
date Sun, 28 Sep 2008 13:22:59 +0200
parents 5cefa8b0f3d9
children b647fd7bb382
files ChangeLog doc/posix-headers/sched.texi lib/sched.in.h m4/sched_h.m4 modules/sched
diffstat 5 files changed, 90 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Sep 26 14:47:41 2008 -0600
+++ b/ChangeLog	Sun Sep 28 13:22:59 2008 +0200
@@ -1,3 +1,11 @@
+2008-09-28  Bruno Haible  <bruno@clisp.org>
+
+	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  <ebb9@byu.net>
 
 	Fix previous patch, and tweak references to $0.
--- a/doc/posix-headers/sched.texi	Fri Sep 26 14:47:41 2008 -0600
+++ b/doc/posix-headers/sched.texi	Sun Sep 28 13:22:59 2008 +0200
@@ -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
-@end itemize
-
-Portability problems not fixed by Gnulib:
-@itemize
 @item
 This header file is missing on some platforms:
 mingw, BeOS.
 @end itemize
+
+Portability problems not fixed by Gnulib:
+@itemize
+@end itemize
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/sched.in.h	Sun Sep 28 13:22:59 2008 +0200
@@ -0,0 +1,25 @@
+/* Replacement <sched.h> 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 <http://www.gnu.org/licenses/>.  */
+
+#ifndef _GL_SCHED_H
+#define _GL_SCHED_H
+
+struct sched_param
+{
+  int sched_priority;
+};
+
+#endif /* _GL_SCHED_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/m4/sched_h.m4	Sun Sep 28 13:22:59 2008 +0200
@@ -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])
+])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/sched	Sun Sep 28 13:22:59 2008 +0200
@@ -0,0 +1,34 @@
+Description:
+A <sched.h> 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 <sched.h> 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:
+<sched.h>
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
+