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 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 ins

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 comp

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

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 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 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 gl

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

2013-11-30 Thread Nguyễn Thái Ngọc Duy
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 version with gnu_get_libc_version(). But version is no