2012/6/12 Yaakov (Cygwin/X) <yselkow...@users.sourceforge.net>: > On 2012-06-04 02:10, Kai Tietz wrote: >> >> The change in crt/wchar.h about __mingw_ovr macro looks wrong to me, >> or at least inconsistent. As stdio.h has same macro. At least a >> libstdc++ bootstrap test is required for this change. > > > Currently I get: > > /usr/i686-w64-mingw32/sys-root/mingw/lib/libmsvcrt.a(daqubs01139.o):(.text+0x0): > multiple definition of `_swprintf' > io_stream_file.o:/usr/i686-w64-mingw32/sys-root/mingw/include/wchar.h:547: > first defined here > > How about this change instead to both headers: > > --- crt/wchar.h (revision 5094) > +++ crt/wchar.h (working copy) > @@ -450,10 +450,10 @@ > int __cdecl __mingw_vsnwprintf (wchar_t * __restrict__ , size_t, const > wchar_t * __restrict__ , va_list); > > #undef __mingw_ovr > -#ifdef __cplusplus > -#define __mingw_ovr inline __cdecl > -#elif defined (__GNUC__) > +#if defined (__GNUC__) > #define __mingw_ovr static __attribute__ ((__unused__)) __inline__ __cdecl > +#elif defined(__cplusplus) > +#define __mingw_ovr inline __cdecl > #else > #define __mingw_ovr static __cdecl > #endif
Hmm, that's looking wrong to me, too. __GNUC__ gets defined also for c++, So issue might be more related to inline being not inlined. Could you provide me a small sample to reproduce this issue? >> The hunk in winnt.h: >> @@ -88,7 +88,7 @@ extern "C" { >> >> #include<basetsd.h> >> >> -#if defined(_X86_) || defined(__ia64__) || defined(__x86_64) >> +#if defined(__W32API_USE_DLLIMPORT__)&& (defined(_X86_) || >> defined(__ia64__) || defined(__x86_64)) >> #define DECLSPEC_IMPORT __declspec(dllimport) >> #else >> #define DECLSPEC_IMPORT >> >> I would like to see here a different macro-name and the logic needs to >> be inverted. Our default scenario uses dllimport and just in cygwin's >> setup-case we don't want it. >> So I would like to see here instead: !defined (__NO_USE_DLLIMPORT) > > > How about just !defined(DECLSPEC_IMPORT)? Yes, that's fine. > > Yaakov > Cygwin/X -- Kai