X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Ftermios.in.h;h=f69786b3d22eac798d51f0a000aea7a142747993;hb=6add58a9a1e2531ac96079cc063201ef3b3c2b98;hp=2873bfe3b9f964efce71e5fa8de3ab0f60c6bd2d;hpb=6dcf524e1f4e344cc0256b3b7efb53babc452a62;p=gnulib.git diff --git a/lib/termios.in.h b/lib/termios.in.h index 2873bfe3b..f69786b3d 100644 --- a/lib/termios.in.h +++ b/lib/termios.in.h @@ -1,5 +1,5 @@ /* Substitute for and wrapper around . - Copyright (C) 2010 Free Software Foundation, Inc. + Copyright (C) 2010-2011 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 @@ -15,20 +15,62 @@ 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 +#ifndef _@GUARD_PREFIX@_TERMIOS_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif +@PRAGMA_COLUMNS@ + +/* On HP-UX 11.00, some of the function declarations in , + included by , are not protected by extern "C". Enforce + "C" linkage for these functions nevertheless. */ +#if defined __hpux && defined __cplusplus +# include +# include +extern "C" { +# include +} +#endif /* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_TERMIOS_H@ +#if @HAVE_TERMIOS_H@ +# @INCLUDE_NEXT@ @NEXT_TERMIOS_H@ +#endif + +#ifndef _@GUARD_PREFIX@_TERMIOS_H +#define _@GUARD_PREFIX@_TERMIOS_H + +#if @GNULIB_TCGETSID@ +/* Get pid_t. */ +# include +#endif + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -#ifndef _GL_TERMIOS_H -#define _GL_TERMIOS_H +/* The definition of _GL_WARN_ON_USE is copied here. */ /* Declare overridden functions. */ -#endif /* _GL_TERMIOS_H */ -#endif /* _GL_TERMIOS_H */ +#if @GNULIB_TCGETSID@ +/* Return the session ID of the controlling terminal of the current process. + The argument is a descriptor if this controlling terminal. + Return -1, with errno set, upon failure. errno = ENOSYS means that the + function is unsupported. */ +# if !@HAVE_DECL_TCGETSID@ +_GL_FUNCDECL_SYS (tcgetsid, pid_t, (int fd)); +# endif +_GL_CXXALIAS_SYS (tcgetsid, pid_t, (int fd)); +_GL_CXXALIASWARN (tcgetsid); +#elif defined GNULIB_POSIXCHECK +# undef tcgetsid +# if HAVE_RAW_DECL_TCGETSID +_GL_WARN_ON_USE (tcgetsid, "tcgetsid is not portable - " + "use gnulib module tcgetsid for portability"); +# endif +#endif + + +#endif /* _@GUARD_PREFIX@_TERMIOS_H */ +#endif /* _@GUARD_PREFIX@_TERMIOS_H */