New module 'signal'.
authorBruno Haible <bruno@clisp.org>
Tue, 1 May 2007 18:49:26 +0000 (18:49 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 1 May 2007 18:49:26 +0000 (18:49 +0000)
ChangeLog
lib/signal_.h [new file with mode: 0644]
m4/signal_h.m4 [new file with mode: 0644]
modules/signal [new file with mode: 0644]

index f302e62..f47e0fb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2007-05-01  Bruno Haible  <bruno@clisp.org>
 
+       * modules/signal: New file.
+       * lib/signal_.h: New file.
+       * m4/signal_h.m4: New file.
+
+2007-05-01  Bruno Haible  <bruno@clisp.org>
+
        * lib/wctype_.h: Test HAVE_ISWCNTRL at configure time.
        * m4/wctype.m4 (gl_WCTYPE_H): Substitute HAVE_ISWCNTRL.
        * modules/wctype (Makefile.am): Substitute HAVE_ISWCNTRL instead of
diff --git a/lib/signal_.h b/lib/signal_.h
new file mode 100644 (file)
index 0000000..b028b47
--- /dev/null
@@ -0,0 +1,46 @@
+/* A GNU-like <signal.h>.
+
+   Copyright (C) 2007 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 2, 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, write to the Free Software Foundation,
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
+
+#if defined __need_sig_atomic_t || defined __need_sigset_t
+/* Special invocation convention inside glibc header files.  */
+
+#include @ABSOLUTE_SIGNAL_H@
+
+#else
+/* Normal invocation convention.  */
+
+#ifndef _GL_SIGNAL_H
+#define _GL_SIGNAL_H
+
+#include @ABSOLUTE_SIGNAL_H@
+
+
+/* The definition of GL_LINK_WARNING is copied here.  */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_SIGNAL_H */
+#endif
diff --git a/m4/signal_h.m4 b/m4/signal_h.m4
new file mode 100644 (file)
index 0000000..4ac1e40
--- /dev/null
@@ -0,0 +1,25 @@
+# signal_h.m4 serial 1
+dnl Copyright (C) 2007 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.
+
+AC_DEFUN([gl_SIGNAL_H],
+[
+  AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+  gl_ABSOLUTE_HEADER([signal.h])
+  ABSOLUTE_SIGNAL_H=\"$gl_cv_absolute_signal_h\"
+  AC_SUBST([ABSOLUTE_SIGNAL_H])
+])
+
+AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+  GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_SIGNAL_H_DEFAULTS],
+[
+  dnl Assume proper GNU behavior unless another module says otherwise.
+])
diff --git a/modules/signal b/modules/signal
new file mode 100644 (file)
index 0000000..5673278
--- /dev/null
@@ -0,0 +1,37 @@
+Description:
+A GNU-like <signal.h>.
+
+Files:
+lib/signal_.h
+m4/signal_h.m4
+
+Depends-on:
+absolute-header
+link-warning
+
+configure.ac:
+gl_SIGNAL_H
+
+Makefile.am:
+BUILT_SOURCES += signal.h
+
+# We need the following in order to create <signal.h> when the system
+# doesn't have a complete one.
+signal.h: signal_.h
+       rm -f $@-t $@
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+         sed -e 's|@''ABSOLUTE_SIGNAL_H''@|$(ABSOLUTE_SIGNAL_H)|g' \
+             -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+             < $(srcdir)/signal_.h; \
+       } > $@-t
+       mv $@-t $@
+MOSTLYCLEANFILES += signal.h signal.h-t
+
+Include:
+#include <signal.h>
+
+License:
+LGPL
+
+Maintainer:
+all