diff options
author | Bruno Haible <bruno@clisp.org> | 2011-07-07 12:48:38 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2011-07-07 12:49:27 +0200 |
commit | 03dba954ec49ef82c97d5906b90add5474074876 (patch) | |
tree | 1ee47841e1463804d16e74ca2d3e34ff18641ff1 | |
parent | 08c067e139e0c4116a59e6629901c8cf64c3588e (diff) | |
download | gettext-03dba954ec49ef82c97d5906b90add5474074876.tar.gz |
Complete the change in vasnprintf.c from 2010-04-10.
-rw-r--r-- | gettext-runtime/intl/ChangeLog | 6 | ||||
-rw-r--r-- | gettext-runtime/intl/printf.c | 14 |
2 files changed, 16 insertions, 4 deletions
diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index faa63636b..e65acd269 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,9 @@ +2011-07-07 Bruno Haible <bruno@clisp.org> + + Complete the change in vasnprintf.c from 2010-04-10. + * printf.c (system_vsnprintf) [mingw]: Prefer vsnprintf over + _vsnprintf. + 2011-06-15 Paul Eggert <eggert@cs.ucla.edu> * verify.h (verify_true): Deprecate. diff --git a/gettext-runtime/intl/printf.c b/gettext-runtime/intl/printf.c index 40ce7eefe..157853ad4 100644 --- a/gettext-runtime/intl/printf.c +++ b/gettext-runtime/intl/printf.c @@ -1,5 +1,5 @@ /* Formatted output to strings, using POSIX/XSI format strings with positions. - Copyright (C) 2003, 2006-2007, 2009-2010 Free Software Foundation, Inc. + Copyright (C) 2003, 2006-2007, 2009-2011 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2003. This program is free software: you can redistribute it and/or modify @@ -191,8 +191,13 @@ libintl_sprintf (char *resultbuf, const char *format, ...) #if HAVE_SNPRINTF # if HAVE_DECL__SNPRINTF - /* Windows. */ -# define system_vsnprintf _vsnprintf + /* Windows. The mingw function vsnprintf() has fewer bugs than the MSVCRT + function _vsnprintf(), so prefer that. */ +# if defined __MINGW32__ +# define system_vsnprintf vsnprintf +# else +# define system_vsnprintf _vsnprintf +# endif # else /* Unix. */ # define system_vsnprintf vsnprintf @@ -302,7 +307,8 @@ libintl_asprintf (char **resultp, const char *format, ...) #endif # if HAVE_DECL__SNWPRINTF - /* Windows. */ + /* Windows. The function vswprintf() has a different signature than + on Unix; we use the function _vsnwprintf() instead. */ # define system_vswprintf _vsnwprintf # else /* Unix. */ |