Re: [Mingw-w64-public] linking error: "*x* referenced in section `.text' of [...]: defined in discarded section `.text' of [...]"

2012-07-06 Thread Ozkan Sezer
> -lwsock32 -lws2_32 -liberty-o > streamer-ml-monl-chunkstream-static.exe You aren't supposed to link to both wsock32 and ws2_32: only to one which you are supposed to be using. >>> >>> And you should be using ws2_32 (WinSOCK version 2) and not wsock32 >>> (WinSOCK versio

Re: [Mingw-w64-public] linking error: "*x* referenced in section `.text' of [...]: defined in discarded section `.text' of [...]"

2012-07-06 Thread Earnie Boyd
On Fri, Jul 6, 2012 at 9:07 AM, Ozkan Sezer wrote: -lwsock32 -lws2_32 -liberty-o streamer-ml-monl-chunkstream-static.exe >>> >>> You aren't supposed to link to both wsock32 and ws2_32: >>> only to one which you are supposed to be using. >> >> And you should be using ws2_32 (WinSOCK version

Re: [Mingw-w64-public] [patch] in6addr.h: Define s6_addr16 when building Cygwin

2012-07-06 Thread Corinna Vinschen
On Jul 6 15:34, Kai Tietz wrote: > 2012/7/6 Corinna Vinschen : > > Hi, > > > > the subject says it all. Is that ok? > > > > > > Thanks, > > Corinna > > Sure. Thanks, Corinna -- Live Security Virtual Conference Exclusiv

Re: [Mingw-w64-public] [patch] in6addr.h: Define s6_addr16 when building Cygwin

2012-07-06 Thread Kai Tietz
2012/7/6 Corinna Vinschen : > Hi, > > the subject says it all. Is that ok? > > > Thanks, > Corinna Sure. Thanks, Kai -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and

[Mingw-w64-public] [patch] in6addr.h: Define s6_addr16 when building Cygwin

2012-07-06 Thread Corinna Vinschen
Hi, the subject says it all. Is that ok? Thanks, Corinna * in6addr.h (s6_addr16): Define when building Cygwin. Index: in6addr.h === --- in6addr.h (revision 5172) +++ in6addr.h (working copy) @@ -28,6 +28,7 @@ #def

Re: [Mingw-w64-public] linking error: "*x* referenced in section `.text' of [...]: defined in discarded section `.text' of [...]"

2012-07-06 Thread Ozkan Sezer
>>> -lwsock32 -lws2_32 -liberty-o streamer-ml-monl-chunkstream-static.exe >> >> You aren't supposed to link to both wsock32 and ws2_32: >> only to one which you are supposed to be using. > > And you should be using ws2_32 (WinSOCK version 2) and not wsock32 > (WinSOCK version 1). No, that depe

Re: [Mingw-w64-public] linking error: "*x* referenced in section `.text' of [...]: defined in discarded section `.text' of [...]"

2012-07-06 Thread Earnie Boyd
On Fri, Jul 6, 2012 at 1:25 AM, Ozkan Sezer wrote: > On 7/5/12, Rune K. Svendsen wrote: > >> -lwsock32 -lws2_32 -liberty-o streamer-ml-monl-chunkstream-static.exe > > You aren't supposed to link to both wsock32 and ws2_32: > only to one which you are supposed to be using. And you should be u

Re: [Mingw-w64-public] [patch] Add guards to drop DECLSPEC_IMPORT usage in a couple of headers

2012-07-06 Thread Kai Tietz
2012/7/6 Corinna Vinschen : > 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 def

[Mingw-w64-public] [patch] Add guards to drop DECLSPEC_IMPORT usage in a couple of headers

2012-07-06 Thread Corinna Vinschen
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 d

Re: [Mingw-w64-public] [patch] windows.h: Don't include winsock.h on Cygwin by default

2012-07-06 Thread Corinna Vinschen
On Jul 6 13:23, Kai Tietz wrote: > 2012/7/6 Corinna Vinschen : > > Hi, > > > > For years, it has been the default on Cygwin not to include winsock.h > > from windows.h, unless __USE_W32_SOCKETS is defined. The below patch > > carries that over to Mingw64's windows.h. Ok to apply? > > > > > > Tha

Re: [Mingw-w64-public] [patch] windows.h: Don't include winsock.h on Cygwin by default

2012-07-06 Thread Kai Tietz
2012/7/6 Corinna Vinschen : > Hi, > > For years, it has been the default on Cygwin not to include winsock.h > from windows.h, unless __USE_W32_SOCKETS is defined. The below patch > carries that over to Mingw64's windows.h. Ok to apply? > > > Thanks, > Corinna Sure, this is ok. We want to have b

[Mingw-w64-public] [patch] windows.h: Don't include winsock.h on Cygwin by default

2012-07-06 Thread Corinna Vinschen
Hi, For years, it has been the default on Cygwin not to include winsock.h from windows.h, unless __USE_W32_SOCKETS is defined. The below patch carries that over to Mingw64's windows.h. Ok to apply? Thanks, Corinna * windows.h: DOn't include winsock.h on Cygwin, unless __USE_W

Re: [Mingw-w64-public] [patch] in6addr.h: Extend in6_addr to allow accessing as 32 bit typed array, Linux-like

2012-07-06 Thread Kai Tietz
2012/7/6 Corinna Vinschen : > Hi, > > Cygwin performs a couple of 32 bit operations within in6_addr. The below > patch adds matching Linux-like members *only* when building CYgwin itself. > > Ok to apply? > > > Thanks, > Corinna Patch is ok. Thanks, Kai -

Re: [Mingw-w64-public] [patch] psdk_inc/_ip_types.h: Allow definition of struct sockaddr when building Cygwin

2012-07-06 Thread Kai Tietz
2012/7/6 Corinna Vinschen : > Hi, > > while working on the complex mix of Winsock and POSIX definitions in > Cygwin's network-related code, I figured that it's easier to do as > much using Winsock definitions. So I changed the Cygwin headers instead > to drop lots of definitions when building Cygw

Re: [Mingw-w64-public] [patch/ob]: Always define NtCurrentTeb, GetCurrentFiber, GetFiberData, MemoryBarrier inline

2012-07-06 Thread Kai Tietz
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,

[Mingw-w64-public] [patch] psdk_inc/_ip_types.h: Allow definition of struct sockaddr when building Cygwin

2012-07-06 Thread Corinna Vinschen
Hi, while working on the complex mix of Winsock and POSIX definitions in Cygwin's network-related code, I figured that it's easier to do as much using Winsock definitions. So I changed the Cygwin headers instead to drop lots of definitions when building Cygwin. The side effect is that we need th

Re: [Mingw-w64-public] [patch] Avoid collisions between winnt.h and ntdef.h

2012-07-06 Thread Kai Tietz
2012/7/6 Corinna Vinschen : > Hi, > > the below patch fixes two definition collision between ntdef.h and winnt.h > Ok to apply? > > > Thanks, > Corinna Yes, this guard makes sense. Patch is ok. Thanks, Kai -- Live Secur

Re: [Mingw-w64-public] [patch] winsock2.h: Revert Cygwin patch

2012-07-06 Thread Kai Tietz
2012/7/6 Corinna Vinschen : > Hi, > > at one point I added a #ifndef __INSIDE_CYGWIN__ to winsock2.h to > guard the declaration of gethostname. That was wrong. The below > patch fixes that. > > Ok to apply? > > > Thanks, > Corinna Patch is ok. Regards, Kai -

[Mingw-w64-public] [patch] winsock2.h: Revert Cygwin patch

2012-07-06 Thread Corinna Vinschen
Hi, at one point I added a #ifndef __INSIDE_CYGWIN__ to winsock2.h to guard the declaration of gethostname. That was wrong. The below patch fixes that. Ok to apply? Thanks, Corinna * winsock2.h (gethostname): Drop __INSIDE_CYGWIN__ guard. Index: winsock2.h

[Mingw-w64-public] [patch] Avoid collisions between winnt.h and ntdef.h

2012-07-06 Thread Corinna Vinschen
Hi, the below patch fixes two definition collision between ntdef.h and winnt.h Ok to apply? Thanks, Corinna * ntdef.h (struct _PROCESSOR_NUMBER): Guard definition with ___PROCESSOR_NUMBER_DEFINED. (struct _GROUP_AFFINITY): Guard definition with ___GROUP_AFFINITY

[Mingw-w64-public] [patch/ob]: Always define NtCurrentTeb, GetCurrentFiber, GetFiberData, MemoryBarrier inline

2012-07-06 Thread Corinna Vinschen
Hi, I just applied the below patch, which has been preapproved by ktietz on IRC yesterday. Since the affected functions don't exist as exported functions in kernel32.dll, their inline implementation must always be available, even if __CRT__NO_INLINE is defined. Corinna * winnt.h (NtCu

[Mingw-w64-public] [patch] in6addr.h: Extend in6_addr to allow accessing as 32 bit typed array, Linux-like

2012-07-06 Thread Corinna Vinschen
Hi, Cygwin performs a couple of 32 bit operations within in6_addr. The below patch adds matching Linux-like members *only* when building CYgwin itself. Ok to apply? Thanks, Corinna * in6addr.h (struct in6addr): Add u.__s6_addr32 member when building Cygwin. (s6_addr32

Re: [Mingw-w64-public] Strange behavior of snwprintf() function

2012-07-06 Thread niXman
2012/7/5 niXman: > 2012/7/4 xunxun: > > Thank you for reply. > >> Maybe someone can explain it here. > > Maybe... ping? -- Regards, niXman ___ Dual-target(32 & 64 bit) MinGW compilers for 32 and 64 bit Windows: http://sourceforge.net/projects/ming