Re: [Openocd-development] [PATCH] cast from long to HANDLER on MinGW-W64

2009-10-20 Thread Redirect "Slash" NIL
A very valid point indeed. ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development

Re: [Openocd-development] [PATCH] cast from long to HANDLER on MinGW-W64

2009-10-20 Thread Austin, Alex
velopment-boun...@lists.berlios.de] On Behalf Of Redirect "Slash" NIL Sent: Saturday, October 17, 2009 6:14 PM To: openocd-development@lists.berlios.de Subject: Re: [Openocd-development] [PATCH] cast from long to HANDLER on MinGW-W64 2009/10/17 David Brownell mailto:davi...@pacbell.net>> What&

Re: [Openocd-development] [PATCH] cast from long to HANDLER on MinGW-W64

2009-10-17 Thread Redirect "Slash" NIL
Forgot a cast on _get_osfhandle(i); Here's a safer (and hopefully final) version. patch_long_to_handler_mingw_w64_v3.diff Description: Binary data ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman

Re: [Openocd-development] [PATCH] cast from long to HANDLER on MinGW-W64

2009-10-17 Thread Redirect "Slash" NIL
2009/10/18 Igor Skochinsky > Actually, in VC9 it returns intptr_t (MSDN is wrong here): > > _CRTIMP intptr_t __cdecl _get_osfhandle(_In_ int _FileHandle); > (from io.h) > > So it might be worth it to get mingw people to fix their headers... > Actually, the io.h from MinGW-W64 does have the same

Re: [Openocd-development] [PATCH] cast from long to HANDLER on MinGW-W64

2009-10-17 Thread David Brownell
On Saturday 17 October 2009, Redirect "Slash" NIL wrote: > > > > The "0 +" is mutant... > > > > Yeah. The problem here is that HANDLE is typedef'd as void* (in winnt.h), > whereas _get_osfhandle() returns a long ( > http://msdn.microsoft.com/en-us/library/ks2530z6.aspx), and gcc insists on > retur

Re: [Openocd-development] [PATCH] cast from long to HANDLER on MinGW-W64

2009-10-17 Thread Igor Skochinsky
Hello Redirect, Sunday, October 18, 2009, 1:14:20 AM, you wrote: RSN> Yeah. The problem here is that HANDLE is typedef'd as void* (in RSN> winnt.h), whereas _get_osfhandle() returns a long RSN> (http://msdn.microsoft.com/en-us/library/ks2530z6.aspx), and gcc RSN> insists on returning a warning wh

Re: [Openocd-development] [PATCH] cast from long to HANDLER on MinGW-W64

2009-10-17 Thread Redirect "Slash" NIL
2009/10/17 David Brownell > > What's with the strange "(HANDLE)(0 + _get_osfhandle())"? > > The "0 +" is mutant... > Yeah. The problem here is that HANDLE is typedef'd as void* (in winnt.h), whereas _get_osfhandle() returns a long ( http://msdn.microsoft.com/en-us/library/ks2530z6.aspx), and gcc

Re: [Openocd-development] [PATCH] cast from long to HANDLER on MinGW-W64

2009-10-17 Thread David Brownell
What's with the strange "(HANDLE)(0 + _get_osfhandle())"? The "0 +" is mutant... ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development

[Openocd-development] [PATCH] cast from long to HANDLER on MinGW-W64

2009-10-16 Thread Redirect "Slash" NIL
This fix addresses the cast warnings issued on MinGW-W64 when casting a long to HANDLER in replacement.c Also removes the need for a temporary variable. patch_long_to_handler_mingw_w64.diff Description: Binary data ___ Openocd-development mailing list O