Re: [PATCH v3] gettext.c: detect the vsnprintf bug at runtime

2013-12-02 Thread Trần Ngọc Quân
On 02/12/2013 14:40, Trần Ngọc Quân wrote: On 02/12/2013 12:57, Duy Nguyen wrote: I suggest use C preprocessor instead. The person who complete git (make debian, rpm etc. package) decide enable it or not (disable by default). Most of people use git from distribution instead of complete it

Re: [PATCH v3] gettext.c: detect the vsnprintf bug at runtime

2013-12-02 Thread Duy Nguyen
On Mon, Dec 2, 2013 at 2:40 PM, Trần Ngọc Quân vnwild...@gmail.com wrote: On 02/12/2013 12:57, Duy Nguyen wrote: I suggest use C preprocessor instead. The person who complete git (make debian, rpm etc. package) decide enable it or not (disable by default). Most of people use git from

Re: [PATCH v3] gettext.c: detect the vsnprintf bug at runtime

2013-12-01 Thread Trần Ngọc Quân
On 01/12/2013 09:45, Nguyễn Thái Ngọc Duy wrote: Bug 6530 [1] in glibc causes git show v0.99.6~1 to fail with error your vsnprintf is broken. The workaround avoids that, but it corrupts system error messages in non-C locales. The bug has been fixed since 2.17. We could know running glibc

Re: [PATCH v3] gettext.c: detect the vsnprintf bug at runtime

2013-12-01 Thread Duy Nguyen
On Mon, Dec 2, 2013 at 7:31 AM, Trần Ngọc Quân vnwild...@gmail.com wrote: --- a/gettext.c +++ b/gettext.c @@ -29,6 +29,17 @@ int use_gettext_poison(void) #endif #ifndef NO_GETTEXT +static int test_vsnprintf(const char *fmt, ...) +{ + char buf[26]; + int ret; + va_list ap;

Re: [PATCH v3] gettext.c: detect the vsnprintf bug at runtime

2013-12-01 Thread Trần Ngọc Quân
On 02/12/2013 12:57, Duy Nguyen wrote: I suggest use C preprocessor instead. The person who complete git (make debian, rpm etc. package) decide enable it or not (disable by default). Most of people use git from distribution instead of complete it from source. #ifndef VSNPRINTF_OK