As a preparation for the soon-to-come module 'tcgetsid', I need a module that allows to add function declarations to the <termios.h> file. So far this is just boilerplate.
2010-09-16 Bruno Haible <br...@clisp.org> New module 'termios'. * modules/termios: New file. * lib/termios.in.h: New file. * m4/termios_h.m4: New file. * doc/posix-headers/termios.texi: Mention the new module. =============================== modules/termios =============================== Description: A <termios.h> that works around platform issues. Files: lib/termios.in.h m4/termios_h.m4 Depends-on: include_next configure.ac: gl_TERMIOS_H Makefile.am: BUILT_SOURCES += termios.h # We need the following in order to create <termios.h> when the system # version does not have all declarations. termios.h: termios.in.h $(AM_V_GEN)rm -f $...@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''NEXT_TERMIOS_H''@|$(NEXT_TERMIOS_H)|g' \ < $(srcdir)/termios.in.h; \ } > $...@-t && \ mv $...@-t $@ MOSTLYCLEANFILES += termios.h termios.h-t Include: <termios.h> License: LGPL Maintainer: Bruno Haible =============================== lib/termios.in.h =============================== /* Substitute for and wrapper around <termios.h>. Copyright (C) 2010 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. */ #ifndef _GL_TERMIOS_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif /* The include_next requires a split double-inclusion guard. */ #...@include_next@ @NEXT_TERMIOS_H@ #ifndef _GL_TERMIOS_H #define _GL_TERMIOS_H /* Declare overridden functions. */ #endif /* _GL_TERMIOS_H */ #endif /* _GL_TERMIOS_H */ =============================== m4/termios_h.m4 =============================== # termios_h.m4 serial 1 dnl Copyright (C) 2010 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_TERMIOS_H], [ dnl Use AC_REQUIRE here, so that the default behavior below is expanded dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_TERMIOS_H_DEFAULTS]) gl_CHECK_NEXT_HEADERS([termios.h]) ]) AC_DEFUN([gl_TERMIOS_MODULE_INDICATOR], [ dnl Use AC_REQUIRE here, so that the default settings are expanded once only. AC_REQUIRE([gl_TERMIOS_H_DEFAULTS]) gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) AC_DEFUN([gl_TERMIOS_H_DEFAULTS], [ ]) =============================================================================== --- doc/posix-headers/termios.texi.orig Fri Sep 17 02:05:37 2010 +++ doc/posix-headers/termios.texi Fri Sep 17 01:42:20 2010 @@ -3,7 +3,7 @@ POSIX specification:@* @url{http://www.opengroup.org/susv3xbd/termios.h.html} -Gnulib module: --- +Gnulib module: termios Portability problems fixed by Gnulib: @itemize