Re: Unable to cross build for Windows

2023-06-09 Thread Torbjorn SVENSSON
On 2023-06-09 09:11, Eli Zaretskii wrote: From: Martin Dorey CC: "bug-make@gnu.org" Date: Fri, 9 Jun 2023 06:32:28 + msip_labels: #include intptr_t _get_osfhandle(int); typedef void* HANDLE; HANDLE fn() {   return (HANDLE)_get_osfhandle(0); }

Re: Unable to cross build for Windows

2023-06-09 Thread Paul Smith
On Fri, 2023-06-09 at 14:16 +0200, Torbjorn SVENSSON wrote: > The only thing left, that I don't know how to handle, is the use of > O() where the 3rd parameter is not a string literal. > > src/job.c: In function 'create_batch_file': > src/job.c:365:3: error: format not a string literal and no

Re: Unable to cross build for Windows

2023-06-09 Thread Torbjorn SVENSSON
On 2023-06-09 14:44, Paul Smith wrote: On Fri, 2023-06-09 at 14:16 +0200, Torbjorn SVENSSON wrote: The only thing left, that I don't know how to handle, is the use of O() where the 3rd parameter is not a string literal. src/job.c: In function 'create_batch_file': src/job.c:365:3: error:

Re: Unable to cross build for Windows

2023-06-09 Thread Eli Zaretskii
> From: Martin Dorey > CC: "bug-make@gnu.org" > Date: Fri, 9 Jun 2023 06:32:28 + > msip_labels: > > #include > > intptr_t _get_osfhandle(int); > typedef void* HANDLE; > > HANDLE fn() { >   return (HANDLE)_get_osfhandle(0); > } > martind@sirius:~/tmp/svensson-2023-06-08$ gcc -c

Re: Unable to cross build for Windows

2023-06-09 Thread Martin Dorey
> in some MinGW64 header files? Easily eliminated: martind@sirius:~/tmp/svensson-2023-06-08$ cat make.c #include intptr_t _get_osfhandle(int); typedef void* HANDLE; HANDLE fn() {   return (HANDLE)_get_osfhandle(0); } martind@sirius:~/tmp/svensson-2023-06-08$ gcc -c -Wbad-function-cast make.c

Re: Unable to cross build for Windows

2023-06-08 Thread Eli Zaretskii
> Date: Thu, 8 Jun 2023 20:39:43 +0200 > CC: > From: Torbjorn SVENSSON > > > If you get the error about casting _get_osfhandle to HANDLE only for > > the 32-bit build, and you don't care about that build, then just > > ignore it. But if that error is emitted for the 64-bit build, then > >

Re: Unable to cross build for Windows

2023-06-08 Thread Paul Smith
On Thu, 2023-06-08 at 20:39 +0200, Torbjorn SVENSSON wrote: > > If you get the error about casting _get_osfhandle to HANDLE only > > for the 32-bit build, and you don't care about that build, then > > just ignore it.  But if that error is emitted for the 64-bit build, > > then there's something

Re: Unable to cross build for Windows

2023-06-08 Thread Torbjorn SVENSSON
On 2023-06-08 17:05, Eli Zaretskii wrote: Date: Thu, 8 Jun 2023 16:19:04 +0200 CC: From: Torbjorn SVENSSON On 2023-06-08 16:14, Eli Zaretskii wrote: Date: Thu, 8 Jun 2023 14:44:35 +0200 From: Torbjorn SVENSSON /build/gnu-make_4.4.1-45-g07fcee35/src/function.c: In function

Re: Unable to cross build for Windows

2023-06-08 Thread Torbjorn SVENSSON
On 2023-06-08 16:14, Eli Zaretskii wrote: Date: Thu, 8 Jun 2023 14:44:35 +0200 From: Torbjorn SVENSSON /build/gnu-make_4.4.1-45-g07fcee35/src/function.c: In function 'windows32_openpipe': /build/gnu-make_4.4.1-45-g07fcee35/src/function.c:1676:12: error: cast from function call of type

Re: Unable to cross build for Windows

2023-06-08 Thread Eli Zaretskii
> Date: Thu, 8 Jun 2023 14:44:35 +0200 > From: Torbjorn SVENSSON > > /build/gnu-make_4.4.1-45-g07fcee35/src/function.c: In function > 'windows32_openpipe': > /build/gnu-make_4.4.1-45-g07fcee35/src/function.c:1676:12: error: cast from > function call of type 'intptr_t {aka long long int}' to