Re: [Mingw-w64-public] [PATCH 1/2] stdlib.h: Add mkstemp implementation.

2015-01-26 Thread Alexey Pavlov
2015-01-25 6:13 GMT+03:00 Dongsheng Song : > On Fri, Jan 23, 2015 at 6:35 PM, Jacek Caban > wrote: > > On 01/22/15 15:35, Dongsheng Song wrote: > >> Please review. > > > > Looks good to me. > > > > Thanks, > > Jacek > > > > Pushed as 842d5c6b20526a78b3d29550c9dd196ec3215d21. > > Can you also do t

Re: [Mingw-w64-public] [PATCH 1/2] stdlib.h: Add mkstemp implementation.

2015-01-24 Thread Dongsheng Song
On Fri, Jan 23, 2015 at 6:35 PM, Jacek Caban wrote: > On 01/22/15 15:35, Dongsheng Song wrote: >> Please review. > > Looks good to me. > > Thanks, > Jacek > Pushed as 842d5c6b20526a78b3d29550c9dd196ec3215d21. Thanks, Dongsheng

Re: [Mingw-w64-public] [PATCH 1/2] stdlib.h: Add mkstemp implementation.

2015-01-23 Thread Jacek Caban
On 01/22/15 15:35, Dongsheng Song wrote: > On Thu, Jan 22, 2015 at 5:59 PM, Alexpux wrote: >>> 22 янв. 2015 г., в 12:50, Jacek Caban написал(а): >>> >>> On 01/22/15 06:05, Dongsheng Song wrote: Passed full gcc 4.9 32 bit and 64 bit building, then pushed. >>> Did anyone review the patch befo

Re: [Mingw-w64-public] [PATCH 1/2] stdlib.h: Add mkstemp implementation.

2015-01-22 Thread Dongsheng Song
On Thu, Jan 22, 2015 at 5:59 PM, Alexpux wrote: > >> 22 янв. 2015 г., в 12:50, Jacek Caban написал(а): >> >> On 01/22/15 06:05, Dongsheng Song wrote: >>> Passed full gcc 4.9 32 bit and 64 bit building, then pushed. >> >> Did anyone review the patch before you pushed? You shouldn't mark is as >>

Re: [Mingw-w64-public] [PATCH 1/2] stdlib.h: Add mkstemp implementation.

2015-01-22 Thread Alexpux
> 22 янв. 2015 г., в 12:50, Jacek Caban написал(а): > > On 01/22/15 06:05, Dongsheng Song wrote: >> Passed full gcc 4.9 32 bit and 64 bit building, then pushed. > > Did anyone review the patch before you pushed? You shouldn't mark is as > DATA until it has emulation code. Agree with it. Rega

Re: [Mingw-w64-public] [PATCH 1/2] stdlib.h: Add mkstemp implementation.

2015-01-22 Thread Jacek Caban
On 01/22/15 06:05, Dongsheng Song wrote: > Passed full gcc 4.9 32 bit and 64 bit building, then pushed. Did anyone review the patch before you pushed? You shouldn't mark is as DATA until it has emulation code. Jacek --

Re: [Mingw-w64-public] [PATCH 1/2] stdlib.h: Add mkstemp implementation.

2015-01-21 Thread Dongsheng Song
Passed full gcc 4.9 32 bit and 64 bit building, then pushed. On Thu, Jan 22, 2015 at 10:27 AM, Dongsheng Song wrote: > On Thu, Jan 22, 2015 at 10:24 AM, Óscar Fuentes wrote: >> I can attest that _sopen_s is not present on the msvcrt.dll version >> 7.0.2600.5512 installed on Windows XP SP3. >> >

Re: [Mingw-w64-public] [PATCH 1/2] stdlib.h: Add mkstemp implementation.

2015-01-21 Thread Dongsheng Song
On Thu, Jan 22, 2015 at 10:15 AM, LRN wrote: > On 22.01.2015 5:01, Dongsheng Song wrote: >> On Thu, Jan 22, 2015 at 1:03 AM, Alexey Pavlov wrote: >>> >>> Current "mkstemp" implementation call "_sopen_s" that is not present in >>> WinXP msvcrt.dll. So this break supporting WinXP. >>> >> >> I have

Re: [Mingw-w64-public] [PATCH 1/2] stdlib.h: Add mkstemp implementation.

2015-01-21 Thread Dongsheng Song
On Thu, Jan 22, 2015 at 10:24 AM, Óscar Fuentes wrote: > I can attest that _sopen_s is not present on the msvcrt.dll version > 7.0.2600.5512 installed on Windows XP SP3. > > Please note that MSDN says that _sopen_s is present since Windows 95, > which is absurd, so don't rely on that either. (The

Re: [Mingw-w64-public] [PATCH 1/2] stdlib.h: Add mkstemp implementation.

2015-01-21 Thread Óscar Fuentes
Dongsheng Song writes: > On Thu, Jan 22, 2015 at 1:03 AM, Alexey Pavlov wrote: >> >> Current "mkstemp" implementation call "_sopen_s" that is not present in >> WinXP msvcrt.dll. So this break supporting WinXP. >> > > I have no WinXP now, but '_sopen_s' in the msvcrt.def file: > > $ grep _sopen_s

Re: [Mingw-w64-public] [PATCH 1/2] stdlib.h: Add mkstemp implementation.

2015-01-21 Thread Dongsheng Song
On Thu, Jan 22, 2015 at 1:03 AM, Alexey Pavlov wrote: > > Current "mkstemp" implementation call "_sopen_s" that is not present in > WinXP msvcrt.dll. So this break supporting WinXP. > I have no WinXP now, but '_sopen_s' in the msvcrt.def file: $ grep _sopen_s mingw-w64-crt/def-include/msvcrt-com

Re: [Mingw-w64-public] [PATCH 1/2] stdlib.h: Add mkstemp implementation.

2015-01-21 Thread Alexey Pavlov
2015-01-07 12:12 GMT+03:00 Dongsheng Song : > On Wed, Jan 7, 2015 at 4:50 PM, niXman wrote: > > Dongsheng Song 2015-01-07 11:34: > > > >> Since the last 6 characters must be "XX" is mandatory, I think no > >> need such tricks. > > You do not know what will change through the 1,5,10 years. > >

Re: [Mingw-w64-public] [PATCH 1/2] stdlib.h: Add mkstemp implementation.

2015-01-07 Thread Dongsheng Song
On Wed, Jan 7, 2015 at 4:50 PM, niXman wrote: > Dongsheng Song 2015-01-07 11:34: > >> Since the last 6 characters must be "XX" is mandatory, I think no >> need such tricks. > You do not know what will change through the 1,5,10 years. > No, it should not changed, this is widely used API. Such

Re: [Mingw-w64-public] [PATCH 1/2] stdlib.h: Add mkstemp implementation.

2015-01-07 Thread niXman
Dongsheng Song 2015-01-07 11:34: > Since the last 6 characters must be "XX" is mandatory, I think no > need such tricks. You do not know what will change through the 1,5,10 years. > I think the merged condition statement is not very complicated. But why is it deliberately complicated? ps I

Re: [Mingw-w64-public] [PATCH 1/2] stdlib.h: Add mkstemp implementation.

2015-01-07 Thread Dongsheng Song
On Wed, Jan 7, 2015 at 4:00 PM, niXman wrote: >> +int __cdecl mkstemp (char *template_name) >> +{ >> +errno_t ec; >> +int i, j, fd, len, index; >> + >> +/* These are the (62) characters used in temporary filenames. */ >> +static const char letters[] = >> "abcdefghijklmnopqrstuvwxyz

Re: [Mingw-w64-public] [PATCH 1/2] stdlib.h: Add mkstemp implementation.

2015-01-07 Thread niXman
dongsheng.s...@gmail.com 2015-01-07 10:29: > From: 宋冬生 Hi, > > --- > mingw-w64-crt/Makefile.am | 2 +- > mingw-w64-crt/misc/mkstemp.c | 91 > ++ > mingw-w64-headers/crt/stdlib.h | 1 + > 3 files changed, 93 insertions(+), 1 deletion(-) > creat

[Mingw-w64-public] [PATCH 1/2] stdlib.h: Add mkstemp implementation.

2015-01-06 Thread dongsheng . song
From: 宋冬生 --- mingw-w64-crt/Makefile.am | 2 +- mingw-w64-crt/misc/mkstemp.c | 91 ++ mingw-w64-headers/crt/stdlib.h | 1 + 3 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 mingw-w64-crt/misc/mkstemp.c diff --git a/mingw-w64-c