[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
mknod on OSF/1
From: |
Bruno Haible |
Subject: |
mknod on OSF/1 |
Date: |
Sun, 19 Dec 2010 15:47:10 +0100 |
User-agent: |
KMail/1.9.9 |
On OSF/1 with g++, I'm seeing this error in the test suite:
depbase=`echo test-glob-c++.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; g++
-DHAVE_CONFIG_H -I. -DGNULIB_STRICT_CHECKING=1 -I. -I. -I.. -I./..
-I../gllib -I./../gllib -mieee -MT test-glob-c++.o -MD -MP -MF $depbase.Tpo
-c -o test-glob-c++.o test-glob-c++.cc && mv -f $depbase.Tpo $depbase.Po
In file included from ../gllib/glob.h:34,
from test-glob-c++.cc:22:
../gllib/sys/stat.h:865: error: invalid conversion from 'int (*)(const char*,
mode_t, ...)' to 'int (*)(const char*, mode_t, dev_t)'
*** Exit 1
The reason is that 'mknod' is declared as
extern int mknod (const char*, mode_t, ...);
whereas gnulib expects
extern int mknod (const char*, mode_t, dev_t);
This fixes it.
2010-12-19 Bruno Haible <address@hidden>
mknod: Avoid error in C++ mode on OSF/1 with GCC.
* lib/sys_stat.in.h (mknod): Use _GL_CXXALIAS_SYS_CAST instead of
_GL_CXXALIAS_SYS.
--- lib/sys_stat.in.h.orig Sun Dec 19 15:43:12 2010
+++ lib/sys_stat.in.h Sun Dec 19 15:43:03 2010
@@ -550,7 +550,8 @@
_GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev)
_GL_ARG_NONNULL ((1)));
# endif
-_GL_CXXALIAS_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev));
+/* Need to cast, because on OSF/1 5.1, the third parameter is '...'. */
+_GL_CXXALIAS_SYS_CAST (mknod, int, (char const *file, mode_t mode, dev_t dev));
# endif
_GL_CXXALIASWARN (mknod);
#elif defined GNULIB_POSIXCHECK
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- mknod on OSF/1,
Bruno Haible <=