2012/7/6 Corinna Vinschen <[email protected]>: > Hi, > > > When building the Cygwin DLL, linking fails if the Win32 functions > have been declared with DECLSPEC_IMPORT. With the old w32api headers > this was handled by a __W32API_USE_DLLIMPORT__ definition in winbase.h > and other headers. This is obviously not defined when building Cygwin. > > However, I didn't want to enforce w32api-isms on Mingw64 headers, so I > looked for another solution. Apparently, many SDK headers have guarded > the DECLSPEC_IMPORT stuff along the lines of the upstream headers, but > some of them are missing the required guard. The below patch applies > them as needed. > > The downside of not having __W32API_USE_DLLIMPORT__ is that Cygwin now > has to do something like this: > > #define _ADVAPI32_ > #define _DSGETDCAPI_ > #define _GDI32_ > #define _KERNEL32_ > #define _OLE32_ > #define _SHELL32_ > #define _SPOOL32_ > #define _USER32_ > #define _WINMM_ > #define WINIMPM > #define WINSOCK_API_LINKAGE > > which looks kind of awkward. I'm ok to keep it that way, but maybe > somebody has a neat idea how to simplify this within the MIngw64 SDK > headers? > > Other than that, ok to apply? > > > Thanks, > Corinna
Hi Corinna, the patch is ok. I think we should stick to the used approach of guards. I admit that the list of _...x..._, _...y.._, etc macros looks a bit weird, but I think it is the most clear approach for now. We might could think about providing a global define, which defines by default those _..._ macros, but this isn't that urgent IMHO. Thanks, Kai ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
