changeset 14058:4b44ba76787f

open: Avoid C++ error on HP-UX 11. * lib/fcntl.in.h (open): Disable _GL_CXXALIASWARN invocation on HP-UX.
author Bruno Haible <bruno@clisp.org>
date Fri, 31 Dec 2010 14:17:55 +0100
parents f00add3c323d
children fedf2b2f460a
files ChangeLog lib/fcntl.in.h
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-12-31  Bruno Haible  <bruno@clisp.org>
+
+	open: Avoid C++ error on HP-UX 11.
+	* lib/fcntl.in.h (open): Disable _GL_CXXALIASWARN invocation on HP-UX.
+
 2010-12-31  Bruno Haible  <bruno@clisp.org>
 
 	time_r: Add missing declarations on HP-UX 11.
--- a/lib/fcntl.in.h
+++ b/lib/fcntl.in.h
@@ -107,7 +107,11 @@
 # else
 _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
 # endif
+/* On HP-UX 11, in C++ mode, open() is defined as an inline function with a
+   default argument.  _GL_CXXALIASWARN does not work in this case.  */
+# if !defined __hpux
 _GL_CXXALIASWARN (open);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef open
 /* Assume open is always declared.  */