diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2015-11-19 19:46:06 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2015-11-19 19:46:06 +0200 |
commit | 8b093fab319ec83248c05b84a1c4ad4f49a689e3 (patch) | |
tree | 8889177bf450e918873ee677e7b6f58ccbeda17a | |
parent | e75ddb00248488710a6a85410dfda1edbf8e0b53 (diff) |
gettext: Undef __USE_MINGW_ANSI_STDIO for fixing the gettext-tools build on Windows
-rw-r--r-- | recipes/build-tools/gettext-tools.recipe | 2 | ||||
-rw-r--r-- | recipes/gettext.recipe | 3 | ||||
-rw-r--r-- | recipes/gettext/0001-Undefine-__USE_MINGW_ANSI_STDIO-as-otherwise-stdio.h.patch | 29 |
3 files changed, 33 insertions, 1 deletions
diff --git a/recipes/build-tools/gettext-tools.recipe b/recipes/build-tools/gettext-tools.recipe index 909ab742..7da1df96 100644 --- a/recipes/build-tools/gettext-tools.recipe +++ b/recipes/build-tools/gettext-tools.recipe @@ -13,6 +13,8 @@ class Recipe(recipe.Recipe): Platform.DARWIN: ['sed'], Platform.WINDOWS: ['libiconv', 'mingw-runtime'],} configure_options = ' --disable-java --disable-csharp --disable-native-java --without-csv' + patches = ['../gettext/0001-Fix-linker-error-redefinition-of-vasprintf.patch', + '../gettext/0001-Undefine-__USE_MINGW_ANSI_STDIO-as-otherwise-stdio.h.patch' ] def prepare(self): if self.config.target_platform == Platform.WINDOWS: diff --git a/recipes/gettext.recipe b/recipes/gettext.recipe index 1257420d..66e97885 100644 --- a/recipes/gettext.recipe +++ b/recipes/gettext.recipe @@ -9,7 +9,8 @@ class Recipe(recipe.Recipe): stype = SourceType.TARBALL url = 'http://ftp.gnu.org/pub/gnu/gettext/gettext-0.19.5.1.tar.gz' srcdir = 'gettext-runtime' - patches = ['gettext/0001-Fix-linker-error-redefinition-of-vasprintf.patch'] + patches = ['gettext/0001-Fix-linker-error-redefinition-of-vasprintf.patch', + 'gettext/0001-Undefine-__USE_MINGW_ANSI_STDIO-as-otherwise-stdio.h.patch' ] platform_deps = { Platform.ANDROID: ['libiconv'], Platform.WINDOWS: ['mingw-runtime'], diff --git a/recipes/gettext/0001-Undefine-__USE_MINGW_ANSI_STDIO-as-otherwise-stdio.h.patch b/recipes/gettext/0001-Undefine-__USE_MINGW_ANSI_STDIO-as-otherwise-stdio.h.patch new file mode 100644 index 00000000..fb55e175 --- /dev/null +++ b/recipes/gettext/0001-Undefine-__USE_MINGW_ANSI_STDIO-as-otherwise-stdio.h.patch @@ -0,0 +1,29 @@ +From 6da35c23861c1a442abd62657098b1824f891427 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com> +Date: Thu, 19 Nov 2015 19:42:04 +0200 +Subject: [PATCH] Undefine __USE_MINGW_ANSI_STDIO as otherwise stdio.h defines + asprintf + +And configure did not find it because it's an inline function in stdio.h, +not a function that is available in some library. Fixes compilation on Windows. +--- + gettext-tools/gnulib-lib/asprintf.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/gettext-tools/gnulib-lib/asprintf.c b/gettext-tools/gnulib-lib/asprintf.c +index 06ae3dd..60b9c10 100644 +--- a/gettext-tools/gnulib-lib/asprintf.c ++++ b/gettext-tools/gnulib-lib/asprintf.c +@@ -21,6 +21,9 @@ + #ifdef IN_LIBASPRINTF + # include "vasprintf.h" + #else ++# ifdef __USE_MINGW_ANSI_STDIO ++# undef __USE_MINGW_ANSI_STDIO ++# endif + # include <stdio.h> + #endif + +-- +2.6.2 + |