open: Avoid C++ error on HP-UX 11.
authorBruno Haible <bruno@clisp.org>
Fri, 31 Dec 2010 13:17:55 +0000 (14:17 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 31 Dec 2010 13:17:55 +0000 (14:17 +0100)
* lib/fcntl.in.h (open): Disable _GL_CXXALIASWARN invocation on HP-UX.

ChangeLog
lib/fcntl.in.h

index 865705d3dcc3ef79435f50f6c4596f9d22ab778f..5810281ee2576ef8aefb1437e770613c3a9f688a 100644 (file)
--- 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.
index 73c5f1ef03f1b6c96f76862b442a8fc2949b1a6c..5f9eba59e7484525cebc88d7e074f7ecd19344b1 100644 (file)
@@ -107,7 +107,11 @@ _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
 # 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.  */