| --- gettext-runtime/libasprintf/vasnprintf.h.orig 2013-01-17 09:09:12 +0400 |
| +++ gettext-runtime/libasprintf/vasnprintf.h 2013-05-01 17:33:31 +0400 |
| @@ -40,6 +40,8 @@ |
| extern "C" { |
| #endif |
| |
| +#if !defined(__USE_MINGW_ANSI_STDIO) && defined(__MINGW64_VERSION_MAJOR) |
| + |
| /* Write formatted output to a string dynamically allocated with malloc(). |
| You can pass a preallocated buffer for the result in RESULTBUF and its |
| size in *LENGTHP; otherwise you pass RESULTBUF = NULL. |
| @@ -64,11 +66,14 @@ |
| free (output); |
| } |
| */ |
| + |
| extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) |
| __attribute__ ((__format__ (__printf__, 3, 4))); |
| extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args) |
| __attribute__ ((__format__ (__printf__, 3, 0))); |
| |
| +#endif /* !defined(__USE_MINGW_ANSI_STDIO) && defined(__MINGW64_VERSION_MAJOR) */ |
| + |
| #ifdef __cplusplus |
| } |
| #endif |
| --- gettext-runtime/libasprintf/vasprintf.h.orig 2013-04-30 09:03:19 +0400 |
| +++ gettext-runtime/libasprintf/vasprintf.h 2013-05-01 17:32:04 +0400 |
| @@ -37,6 +37,8 @@ |
| extern "C" { |
| #endif |
| |
| +#if !defined(__USE_MINGW_ANSI_STDIO) && defined(__MINGW64_VERSION_MAJOR) |
| + |
| /* Write formatted output to a string dynamically allocated with malloc(). |
| If the memory allocation succeeds, store the address of the string in |
| *RESULT and return the number of resulting bytes, excluding the trailing |
| @@ -46,6 +48,8 @@ |
| extern int vasprintf (char **result, const char *format, va_list args) |
| __attribute__ ((__format__ (__printf__, 2, 0))); |
| |
| +#endif /* !defined(__USE_MINGW_ANSI_STDIO) && defined(__MINGW64_VERSION_MAJOR) */ |
| + |
| #ifdef __cplusplus |
| } |
| #endif |
| --- gettext-runtime/libasprintf/vasnprintf.c.orig 2013-05-01 18:07:02 +0400 |
| +++ gettext-runtime/libasprintf/vasnprintf.c 2013-05-01 18:42:46 +0400 |
| @@ -67,7 +67,14 @@ |
| #endif |
| |
| #include <locale.h> /* localeconv() */ |
| +#if defined(__MINGW64_VERSION_MAJOR) && defined(__USE_MINGW_ANSI_STDIO) |
| +# define REMOVED__USE_MINGW_ANSI_STDIO |
| +# undef __USE_MINGW_ANSI_STDIO |
| +#endif |
| #include <stdio.h> /* snprintf(), sprintf() */ |
| +#if defined(__MINGW64_VERSION_MAJOR) && defined(REMOVED__USE_MINGW_ANSI_STDIO) |
| +# define __USE_MINGW_ANSI_STDIO |
| +#endif |
| #include <stdlib.h> /* abort(), malloc(), realloc(), free() */ |
| #include <string.h> /* memcpy(), strlen() */ |
| #include <errno.h> /* errno */ |