[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
wcwidth: declare also when it's aliased
From: |
Bruno Haible |
Subject: |
wcwidth: declare also when it's aliased |
Date: |
Sun, 2 May 2010 23:06:27 +0200 |
User-agent: |
KMail/1.9.9 |
Inside libunistring, I got this test compilation failure on mingw:
depbase=`echo test-wcwidth.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc-3 -mno-cygwin -DHAVE_CONFIG_H -I. -I. -I../lib -I..
-DIN_LIBUNISTRING_GNULIB_TESTS=1 -I. -I. -I.. -I./.. -I../lib -I./../lib
-I/usr/local/mingw/include -Wall -g -O2 -MT test-wcwidth.o -MD -MP -MF
$depbase.Tpo -c -o test-wcwidth.o test-wcwidth.c &&\
mv -f $depbase.Tpo $depbase.Po
test-wcwidth.c:24: error: `libunistring_wcwidth' undeclared here (not in a
function)
make[4]: *** [test-wcwidth.o] Error 1
The reason is that
1) mingw does not have the wcwidth function and also does not declare it,
2) config.h contains a "#define wcwidth libunistring_wcwidth" alias,
that ensures namespace cleanliness.
On platforms where wcwidth is defined as a macro in the system header file,
@HAVE_DECL_WCWIDTH@ will expand to 1. Therefore this simplification is OK:
2010-05-02 Bruno Haible <address@hidden>
wcwidth: Declare also when it's aliased.
* lib/wchar.in.h (wcwidth): Don't test whether wcwidth is defined as a
macro.
--- lib/wchar.in.h.orig Sun May 2 23:00:45 2010
+++ lib/wchar.in.h Sun May 2 22:14:12 2010
@@ -407,7 +407,7 @@
_GL_FUNCDECL_RPL (wcwidth, int, (wchar_t));
_GL_CXXALIAS_RPL (wcwidth, int, (wchar_t));
# else
-# if !defined wcwidth && address@hidden@
+# if address@hidden@
/* wcwidth exists but is not declared. */
_GL_FUNCDECL_SYS (wcwidth, int, (wchar_t));
# endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- wcwidth: declare also when it's aliased,
Bruno Haible <=