# HG changeset patch # User Bruno Haible # Date 1293971417 -3600 # Node ID 5c5416c2942eb4790bc75c8091954ce7da9441d8 # Parent 42f8fcc42425872b646ace82b3d7b58a518625ce 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 --- 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 --- a/doc/posix-functions/tcgetsid.texi +++ b/doc/posix-functions/tcgetsid.texi @@ -14,6 +14,10 @@ @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 --- 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@