From 6dcf524e1f4e344cc0256b3b7efb53babc452a62 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 17 Sep 2010 02:02:23 +0200 Subject: [PATCH] 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. --- ChangeLog | 8 ++++++++ doc/posix-headers/termios.texi | 2 +- lib/termios.in.h | 34 ++++++++++++++++++++++++++++++++++ m4/termios_h.m4 | 27 +++++++++++++++++++++++++++ modules/termios | 37 +++++++++++++++++++++++++++++++++++++ 5 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 lib/termios.in.h create mode 100644 m4/termios_h.m4 create mode 100644 modules/termios diff --git a/ChangeLog b/ChangeLog index 328f8dada..26b850512 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-09-16 Bruno Haible + + 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. + 2010-09-16 Eric Blake fdutimensat: add an atflag parameter diff --git a/doc/posix-headers/termios.texi b/doc/posix-headers/termios.texi index 85d26163d..5b00ee7de 100644 --- a/doc/posix-headers/termios.texi +++ b/doc/posix-headers/termios.texi @@ -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 diff --git a/lib/termios.in.h b/lib/termios.in.h new file mode 100644 index 000000000..2873bfe3b --- /dev/null +++ b/lib/termios.in.h @@ -0,0 +1,34 @@ +/* Substitute for and wrapper around . + 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 */ diff --git a/m4/termios_h.m4 b/m4/termios_h.m4 new file mode 100644 index 000000000..762151a29 --- /dev/null +++ b/m4/termios_h.m4 @@ -0,0 +1,27 @@ +# 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], +[ +]) diff --git a/modules/termios b/modules/termios new file mode 100644 index 000000000..e2deddbd8 --- /dev/null +++ b/modules/termios @@ -0,0 +1,37 @@ +Description: +A 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 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: + + +License: +LGPL + +Maintainer: +Bruno Haible -- 2.11.0