From: Bruno Haible Date: Sun, 2 Jan 2011 12:30:17 +0000 (+0100) Subject: tcgetsid: Correct linkage in C++ mode on HP-UX 11.00. X-Git-Tag: v0.1~3404 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=1944a32b6bf83cb80ce324295c19b72221e2fa11;p=gnulib.git tcgetsid: Correct linkage in C++ mode on HP-UX 11.00. * lib/termios.in.h: In C++ mode, on HP-UX, include with C linkage. * doc/posix-functions/tcgetsid.texi: Mention the HP-UX 11.00 bug. --- diff --git a/ChangeLog b/ChangeLog index 1ba03669b..370d22f5e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-01-02 Bruno Haible + + tcgetsid: Correct linkage in C++ mode on HP-UX 11.00. + * lib/termios.in.h: In C++ mode, on HP-UX, include with + C linkage. + * doc/posix-functions/tcgetsid.texi: Mention the HP-UX 11.00 bug. + 2011-01-01 Ben Pfaff Rename uc_is_grapheme_cluster_break() to uc_is_grapheme_break() diff --git a/doc/posix-functions/tcgetsid.texi b/doc/posix-functions/tcgetsid.texi index 1bcc4d042..745b44693 100644 --- a/doc/posix-functions/tcgetsid.texi +++ b/doc/posix-functions/tcgetsid.texi @@ -14,6 +14,10 @@ MacOS X 10.3, FreeBSD 6.0, OpenBSD 4.5, Cygwin, mingw, Interix 3.5, BeOS. @item This function is not declared on some platforms: OSF/1 5.1. +@item +The declaration of this function in C++ compilation units has C++ linkage, not +C linkage, on some platforms: +HP-UX 11.00. @end itemize Portability problems not fixed by Gnulib: diff --git a/lib/termios.in.h b/lib/termios.in.h index 6d4a2a789..cc749d0b8 100644 --- a/lib/termios.in.h +++ b/lib/termios.in.h @@ -22,6 +22,17 @@ #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. */ #if @HAVE_TERMIOS_H@ # @INCLUDE_NEXT@ @NEXT_TERMIOS_H@