Re: [Mingw-w64-public] [PATCH] Add a windowsapp.lib

2016-09-06 Thread Hugo Beauzée-Luyssen
On 09/07/2016 02:15 AM, Martell Malone wrote: > Hey, > > Are you sure this is correct? > It seems to be for libarm32 but the xbox1 is x64. > > Best, > Martell > > On Tue, Sep 6, 2016 at 8:27 AM, Hugo Beauzée-Luyssen > wrote: > >> Hi, >> >> When building apps for Xbox1 (at least), this lib must be

Re: [Mingw-w64-public] Wrong quotient results of `remquo()`?

2016-09-06 Thread lhmouse
More likely a bug in mingw-w64: #include #include volatile double x = 10.001000, y = -1.299000; int main(){ int quo; double rem = remquo(x, y, &quo); printf("rem = %f, quo = %d\n", rem, quo); } With mingw-w64 this program gives the following output:

Re: [Mingw-w64-public] [PATCH] Add a windowsapp.lib

2016-09-06 Thread Martell Malone
Hey, Are you sure this is correct? It seems to be for libarm32 but the xbox1 is x64. Best, Martell On Tue, Sep 6, 2016 at 8:27 AM, Hugo Beauzée-Luyssen wrote: > Hi, > > When building apps for Xbox1 (at least), this lib must be used instead > of kernel32.lib, since kernel32.dll isn't shipped on

Re: [Mingw-w64-public] How to properly print a long long int?

2016-09-06 Thread David Grayson
That flag also fixes the return values of certain functions like vsnprintf where the Microsoft behavior deviated from the standard. --David On Tue, Sep 6, 2016 at 3:01 PM, Jeroen Ooms wrote: > On Tue, Sep 6, 2016 at 8:50 PM, Stefan Weil wrote: >> I suggest using the ANSI format specifiers ("%ll

Re: [Mingw-w64-public] How to properly print a long long int?

2016-09-06 Thread Jeroen Ooms
On Tue, Sep 6, 2016 at 8:50 PM, Stefan Weil wrote: > I suggest using the ANSI format specifiers ("%lld" is correct in > your example) and telling the compiler that you do so. Add > -D__USE_MINGW_ANSI_STDIO=1 to the compiler options > (or define that macro before including any header files). > > If

Re: [Mingw-w64-public] How to properly print a long long int?

2016-09-06 Thread Stefan Weil
Am 06.09.2016 um 19:29 schrieb David Grayson: > Having only thought about this for a few minutes, I am guessing that > you would need to use the Microsoft-style printf modifier and also use > a GCC pragma to suppress the warning: > > https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html > > --

Re: [Mingw-w64-public] How to properly print a long long int?

2016-09-06 Thread David Grayson
Having only thought about this for a few minutes, I am guessing that you would need to use the Microsoft-style printf modifier and also use a GCC pragma to suppress the warning: https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html --David On Tue, Sep 6, 2016 at 9:06 AM, Jeroen Ooms wrote:

[Mingw-w64-public] How to properly print a long long int?

2016-09-06 Thread Jeroen Ooms
How to print a 'long long int' so that it compiles without -pedantic warnings? I tried: long long int number char i[32]; sprintf(i, "%lld", number); But this gives: warning: unknown conversion type character 'l' in format. I also tried: sprintf(i, "%I64d", number); But this gives: warn

[Mingw-w64-public] [PATCH] Add a windowsapp.lib

2016-09-06 Thread Hugo Beauzée-Luyssen
Hi, When building apps for Xbox1 (at least), this lib must be used instead of kernel32.lib, since kernel32.dll isn't shipped on this system. Since the patch is big, and I've been asked to refrain from sending big chunks here, the patch is located there: http://people.videolan.org/~hugo/0001-li

[Mingw-w64-public] [PATCH 3/4] winstorecompat: Add GetConsoleOutputCP replacement

2016-09-06 Thread Hugo Beauzée-Luyssen
--- mingw-w64-headers/include/wincon.h | 4 +++ mingw-w64-libraries/winstorecompat/Makefile.am | 1 + .../winstorecompat/src/GetConsoleOutputCP.c| 38 ++ 3 files changed, 43 insertions(+) create mode 100644 mingw-w64-libraries/winstorecompat/src/G

[Mingw-w64-public] [PATCH 1/4] winstorecompat: Add a GetStartupInfo stub

2016-09-06 Thread Hugo Beauzée-Luyssen
This is required for configure test executables to link when building with windowsapp.lib --- mingw-w64-libraries/winstorecompat/Makefile.am | 1 + .../winstorecompat/src/GetStartupInfo.c| 40 ++ 2 files changed, 41 insertions(+) create mode 100644 mingw-w64-l

[Mingw-w64-public] [PATCH 4/4] winstorecompat: Regenerate Makefile.in

2016-09-06 Thread Hugo Beauzée-Luyssen
--- mingw-w64-libraries/winstorecompat/Makefile.in | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mingw-w64-libraries/winstorecompat/Makefile.in b/mingw-w64-libraries/winstorecompat/Makefile.in index a52f2ad..31123de 100644 --- a/mingw-w64-libraries/winstorecompat/Makef

[Mingw-w64-public] [PATCH 2/4] include: SwitchToThread is always available on Win10

2016-09-06 Thread Hugo Beauzée-Luyssen
--- mingw-w64-headers/include/processthreadsapi.h | 1 + 1 file changed, 1 insertion(+) diff --git a/mingw-w64-headers/include/processthreadsapi.h b/mingw-w64-headers/include/processthreadsapi.h index 7e14eb9..c4629f7 100755 --- a/mingw-w64-headers/include/processthreadsapi.h +++ b/mingw-w64-hea