[PATCH] Support cross compiling with MinGW-w64 on Debian GNU/Linux
kou at cozmixng.org
Sat Oct 11 12:29:02 UTC 2014
Sorry... I missed your reply...
I attach a new patch that is applied your comments.
In <20141008142441.GE31276 at mdounin.ru>
"Re: [PATCH] Support cross compiling with MinGW-w64 on Debian GNU/Linux" on Wed, 8 Oct 2014 18:24:41 +0400,
Maxim Dounin <mdounin at mdounin.ru> wrote:
>> diff --git a/src/event/modules/ngx_iocp_module.c b/src/event/modules/ngx_iocp_module.c
>> --- a/src/event/modules/ngx_iocp_module.c
>> +++ b/src/event/modules/ngx_iocp_module.c
> Looks fine, though I think it should be a separate patch.
I did: http://mailman.nginx.org/pipermail/nginx-devel/2014-October/006072.html
>> diff --git a/src/os/win32/ngx_win32_config.h b/src/os/win32/ngx_win32_config.h
>> --- a/src/os/win32/ngx_win32_config.h
>> +++ b/src/os/win32/ngx_win32_config.h
>> @@ -131,25 +130,31 @@ typedef int int32_t;
>> typedef unsigned short int uint16_t;
>> #define ngx_libc_cdecl
>> typedef __int64 int64_t;
>> typedef unsigned __int64 uint64_t;
>> -#ifndef __WATCOMC__
>> +#ifdef __WATCOMC__
>> +/* do nothing */
>> +#elif defined(__GNUC__)
>> +#include <stdint.h>
>> typedef int intptr_t;
>> typedef u_int uintptr_t;
> I think that ngx_win32_config.h part needs a bit more work. In
> particular, "#include <stdint.h>" should be placed with other
> includes if it's needed.
I see. The attached patch puts "#include <stdint.h>" after
>> +#ifndef __GNUC__
>> /* Windows defines off_t as long, which is 32-bit */
>> -typedef __int64 off_t;
>> -#define _OFF_T_DEFINED
>> +typedef __int64 off64_t;
>> +#define _OFF64_T_DEFINED
> Defining off64_t looks very wrong for me. There is nothing in
> nginx which use it, and it shouldn't be defined.
> Additionally, this breaks at least compilation with MSVC.
You're absolutely right.
This type name change is needless.
(off64_t was introduced in my first try but it was removed
in my second try. So I should remove the change before sending
The attached patch just adds "#ifdef __GNUC__" and "#endif"
>> --- a/src/os/win32/ngx_wsasend_chain.c
>> +++ b/src/os/win32/ngx_wsasend_chain.c
> Looks fine, though should be a separate patch. See above.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7140 bytes
Desc: not available
More information about the nginx-devel