Re: [Mesa-dev] [PATCH] util: implement strndup for WIN32

2015-09-29 Thread Samuel Iglesias Gonsálvez
On 29/09/15 15:21, Neil Roberts wrote: > I think this implementation will have problems if the string being > copied is not null terminated. It's not clear from the man pages whether > that is an allowed way to use the function but a quick Google shows up a > few similar patches where they have l

Re: [Mesa-dev] [PATCH] util: implement strndup for WIN32

2015-09-29 Thread Neil Roberts
I think this implementation will have problems if the string being copied is not null terminated. It's not clear from the man pages whether that is an allowed way to use the function but a quick Google shows up a few similar patches where they have later been fixed by using strnlen. It looks like s

Re: [Mesa-dev] [PATCH] util: implement strndup for WIN32

2015-09-28 Thread Samuel Iglesias Gonsálvez
On 28/09/15 21:44, Jose Fonseca wrote: > Looks great Samuel. > > Just minor suggestions. > > Either way: > > Reviewed-by: Jose Fonseca > Thanks! > > On 28/09/15 15:19, Samuel Iglesias Gonsalvez wrote: >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92124 >> Cc: Jose Fonseca >>

Re: [Mesa-dev] [PATCH] util: implement strndup for WIN32

2015-09-28 Thread Samuel Iglesias Gonsálvez
On 28/09/15 18:14, Emil Velikov wrote: > Hi Samuel, > > On 28 September 2015 at 15:19, Samuel Iglesias Gonsalvez > wrote: >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92124 >> Cc: Jose Fonseca >> --- >> >> I tested it on MSVC but not MinGW. I hope I did not something wrong. >> >>

Re: [Mesa-dev] [PATCH] util: implement strndup for WIN32

2015-09-28 Thread Jose Fonseca
Looks great Samuel. Just minor suggestions. Either way: Reviewed-by: Jose Fonseca On 28/09/15 15:19, Samuel Iglesias Gonsalvez wrote: Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92124 Cc: Jose Fonseca --- I tested it on MSVC but not MinGW. I hope I did not something wrong. s

Re: [Mesa-dev] [PATCH] util: implement strndup for WIN32

2015-09-28 Thread Emil Velikov
Hi Samuel, On 28 September 2015 at 15:19, Samuel Iglesias Gonsalvez wrote: > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92124 > Cc: Jose Fonseca > --- > > I tested it on MSVC but not MinGW. I hope I did not something wrong. > > src/mesa/main/shader_query.cpp | 1 + > src/util/Makef

Re: [Mesa-dev] [PATCH] util: implement strndup for WIN32

2015-09-28 Thread Eirik Byrkjeflot Anonsen
Samuel Iglesias Gonsalvez writes: > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92124 > Cc: Jose Fonseca > --- > > I tested it on MSVC but not MinGW. I hope I did not something wrong. > > src/mesa/main/shader_query.cpp | 1 + > src/util/Makefile.sources | 1 + > src/util/strnd

[Mesa-dev] [PATCH] util: implement strndup for WIN32

2015-09-28 Thread Samuel Iglesias Gonsalvez
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92124 Cc: Jose Fonseca --- I tested it on MSVC but not MinGW. I hope I did not something wrong. src/mesa/main/shader_query.cpp | 1 + src/util/Makefile.sources | 1 + src/util/strndup.c | 47 ++