Re: [Mingw-w64-public] Patch for locking printf

2015-08-02 Thread lh_mouse
ISO C11 requires operations on the same stream (or whatever a FILE struct handles) _not_ to interleave with each other. This should include outputting each character using puts() or printf() functions, since they both manipulate the `stdout` stream. It should be noted that mingw-w64 has never cl

Re: [Mingw-w64-public] Patch for locking printf

2015-08-02 Thread Dongsheng Song
On Sat, Aug 1, 2015 at 6:56 AM, JonY wrote: > > On 7/23/2015 06:24, JonY wrote: > > Hi, > > > > Patch introduces a new macro __MINGW_PRINTF_LOCKING for fprintf and > > vfprintf so when called on the same FILE stream, the operations are not > > overlapped. __USE_MINGW_ANSI_STDIO must also be set fo

Re: [Mingw-w64-public] Proposition for locking printf

2015-08-02 Thread Mateusz
Now _lock_file/_unlock_file are in stdio/mingw_lock.c (new) file. printf_full.diff works out of the box but I edited makefile.am & makefile.in by hands which is wrong. I tested this patch with 64 and 32-bit GCC 5.2 with link to msvcrt.dll/msvcr100.dll/msvcr120.dll -- all is working. printf.d

Re: [Mingw-w64-public] Patch: complete implementation of intsafe.h

2015-08-02 Thread David Grayson
Hello. Attached is version 2.0.0 of the patch, which is very different and only supports GCC 5 and above, because it uses new built-in functions. This version is only 331 lines long (down from ~1600). It is easy for anyone to check it because it makes no assumptions about the sizes, signedne

Re: [Mingw-w64-public] Strange linker error with gcc-5.1 32-bit involving 'virtual thunk'

2015-08-02 Thread Edward Diener
On 7/31/2015 12:27 PM, Óscar Fuentes wrote: > Edward Diener > writes: > >>> Calling a virtual member requires an access to the vtable of the class. >>> The vtable is defined on the dll that contains the class' code. If the >>> class is not exported, the vtable is not exported. The errors you are >

Re: [Mingw-w64-public] Strange linker error with gcc-5.1 32-bit involving 'virtual thunk'

2015-08-02 Thread Edward Diener
On 7/31/2015 12:27 PM, Óscar Fuentes wrote: > Edward Diener > writes: > >>> Calling a virtual member requires an access to the vtable of the class. >>> The vtable is defined on the dll that contains the class' code. If the >>> class is not exported, the vtable is not exported. The errors you are >

Re: [Mingw-w64-public] Patch: complete implementation of intsafe.h

2015-08-02 Thread David Grayson
Thank you, Kai. Before Jacek or anyone spends too much time checking my add/subtract/multiply operations, please note that I just learned about GCC's integer overflow built-ins, and I will be rewriting the math operations to use those and submitting a new version of this patch: https://gcc.gnu.or

Re: [Mingw-w64-public] Patch: complete implementation of intsafe.h

2015-08-02 Thread Kai Tietz
Thanks for your contribution. I would like to see Jacek's comment on this before it gets applied. Kai Am 02.08.2015 05:57 schrieb "David Grayson" : > Hello. Attached is a patch that adds a complete implementation of > intsafe.h that I generated and tested using Ruby. It would be great if > some

Re: [Mingw-w64-public] winpthreads

2015-08-02 Thread Mattias Engdegård
> For debugging issue can be used OpmeMP test > https://github.com/niXman/mingw-builds/blob/master/tests/omp_test.c > > Build it with «gcc omp_test.c -fopenmp -o omp_test.exe» and run. No crash when I run that code. Is this the same for everybody else? Perhaps you could find a different test case

Re: [Mingw-w64-public] Proposition for locking printf

2015-08-02 Thread JonY
On 8/2/2015 09:15, Mateusz wrote: > I'm not diff expert, but I tried "git diff" -- maybe now is better. Due > to problem with new file I copy context of "mingw_lock.c" to smallest > "ftello.c" -- surprisingly make install works and with new > "libmingwex.a" I can compile "test-stdio.c" file and it