[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wctype.h problem for MinGW build
From: |
Tatsuro MATSUOKA |
Subject: |
Re: wctype.h problem for MinGW build |
Date: |
Wed, 6 Jan 2010 18:33:26 +0900 (JST) |
Thank you for your help.
With your patch
In file included from
c:\programs\mingw\bin\../lib/gcc/mingw32/4.4.0/../../../../include/wchar.h:45,
from ../libgnu/wchar.h:73,
from
c:\programs\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/cwchar:47,
from
c:\programs\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/bits/postypes.h:42,
from
c:\programs\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/iosfwd:42,
from
c:\programs\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/ios:39,
from
c:\programs\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/ostream:40,
from
c:\programs\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/iostream:40,
from ../../../hg/octave-work/liboctave/CollocWt.cc:28:
../libgnu/wctype.h:238: error: expected declaration before '}' token
make[3]: *** [liboctave_la-CollocWt.lo] Error 1
make[3]: Leaving directory `/home/octaves/OctBuild/hg-devel/liboctave'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/octaves/OctBuild/hg-devel/liboctave'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/octaves/OctBuild/hg-devel'
make: *** [all] Error 2
So I moved the following 'extern "C" { }' declaration for C++
#ifdef __cplusplus
extern "C" {
#endif
:
:
#ifdef __cplusplus
}
#endif
at the most outside position like
***************
/*
* ISO C 99 <wctype.h> for platforms that lack it.
* <http://www.opengroup.org/susv3xbd/wctype.h.html>
*
* iswctype, towctrans, towlower, towupper, wctrans, wctype,
* wctrans_t, and wctype_t are not yet implemented.
*/
#ifdef __cplusplus
extern "C" {
#endif
*******************
++++++++++++++++++++
#endif /* _GL_WCTYPE_H */
#endif /* _GL_WCTYPE_H */
#ifdef __cplusplus
}
#endif
++++++++++++++++++++
Then compiling CollocWt.cc was done successfully.
Regards
Tatsuro
--- "John W. Eaton" wrote:
ny suggestions?
>
> I think the declarations in the gnulib/lib/wctype.in.h need to be
> inside an extern "C" block. Does the following patch help? If so,
> I'll report the problem to the gnulib maintainers.
>
> jwe
>
> > diff --git a/lib/wctype.in.h b/lib/wctype.in.h
> index 01a0779..56f3daf 100644
> --- a/lib/wctype.in.h
> +++ b/lib/wctype.in.h
> @@ -105,6 +105,10 @@
> # define towupper rpl_towupper
> # endif
>
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
> static inline int
> iswalnum (wint_t wc)
> {
> @@ -227,5 +231,9 @@ rpl_towupper (wint_t wc)
>
> # endif
>
> +#ifdef __cplusplus
> +}
> +#endif
> +
> #endif /* _GL_WCTYPE_H */
> #endif /* _GL_WCTYPE_H */
>
--------------------------------------
Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/ie8/