[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Compile error with GNULIB_NAMESPACE on Solaris (stdio.h)
From: |
Christian Biesinger |
Subject: |
Compile error with GNULIB_NAMESPACE on Solaris (stdio.h) |
Date: |
Tue, 19 Nov 2019 13:57:33 -0600 |
Hi all!
I got a compile error with Gnulib on Solaris 11 / gcc:
$ cat test.cc
#define GNULIB_NAMESPACE gnulib
#include "gnulib/config.h"
#include "stdio.h"
$ g++ test.cc -I gnulib/import/ -I ../gnulib/import/
gnulib/import/stdio.h:1717:1: error: ‘int vfprintf(std::FILE*, const
char*, __va_list)’ conflicts with a previous declaration
_GL_CXXALIASWARN (vfprintf);
^
In file included from
/opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/stdio.h:75:0,
from gnulib/import/stdio.h:43,
from test.cc:3:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/iso/stdio_iso.h:223:12:
note: previous declaration ‘int std::vfprintf(std::FILE*, const char*,
__va_list)’
extern int vfprintf(FILE *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
^
In file included from /usr/include/sys/time.h:480:0,
from gnulib/import/sys/time.h:39,
from /usr/include/sys/select.h:28,
from /usr/include/sys/types.h:664,
from gnulib/import/sys/types.h:39,
from gnulib/import/stdio.h:58,
from test.cc:3:
And lots of other functions.
I'm not sure which module is responsible for this but this is the list
I'm importing:
IMPORTED_GNULIB_MODULES="\
alloca \
canonicalize-lgpl \
dirent \
dirfd \
errno \
fnmatch-gnu \
frexpl \
getcwd \
glob \
inet_ntop
inttypes \
lstat \
limits-h \
memchr \
memmem \
mkdir \
mkdtemp \
mkostemp \
pathmax \
rawmemchr \
readlink \
rename \
setenv \
signal-h \
strchrnul \
strerror_r-posix \
strstr \
strtok_r \
sys_stat \
time_r \
unistd \
unsetenv \
update-copyright \
wchar \
wctype-h
Any ideas?
Christian
- Compile error with GNULIB_NAMESPACE on Solaris (stdio.h),
Christian Biesinger <=