diff options
Diffstat (limited to 'meta/recipes-devtools/pkgconfig/pkgconfig/0001-autotools-use-C99-printf-format-specifiers-on-Window.patch')
-rw-r--r-- | meta/recipes-devtools/pkgconfig/pkgconfig/0001-autotools-use-C99-printf-format-specifiers-on-Window.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig/0001-autotools-use-C99-printf-format-specifiers-on-Window.patch b/meta/recipes-devtools/pkgconfig/pkgconfig/0001-autotools-use-C99-printf-format-specifiers-on-Window.patch new file mode 100644 index 0000000000..a4e92da34b --- /dev/null +++ b/meta/recipes-devtools/pkgconfig/pkgconfig/0001-autotools-use-C99-printf-format-specifiers-on-Window.patch | |||
@@ -0,0 +1,68 @@ | |||
1 | From 3d7cde654c4c6f3bdad32f5521f28f5802a7c377 Mon Sep 17 00:00:00 2001 | ||
2 | From: Christoph Reiter <reiter.christoph@gmail.com> | ||
3 | Date: Fri, 24 Aug 2018 21:46:47 +0200 | ||
4 | Subject: [PATCH] autotools: use C99 printf format specifiers on Windows. Fixes | ||
5 | #1497 | ||
6 | |||
7 | Since we now require a C99 compatible printf and use gnulib on Windows, | ||
8 | we also mark our printf functions as gnu_printf. GCC complains about the | ||
9 | Windows specific I64 specifiers we still write to glibconfig.h with the | ||
10 | autotools build. | ||
11 | |||
12 | To fix this switch all I64(x) to ll(x). | ||
13 | |||
14 | This also makes the glibconfig.h output for those macros match the ones | ||
15 | we get when using meson. | ||
16 | |||
17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
18 | Upstream-Status: Backport [https://github.com/GNOME/glib/commit/3d7cde654c] | ||
19 | --- | ||
20 | configure.ac | 18 +++++++++--------- | ||
21 | 1 file changed, 9 insertions(+), 9 deletions(-) | ||
22 | |||
23 | --- a/glib/configure.ac | ||
24 | +++ b/glib/configure.ac | ||
25 | @@ -576,7 +576,7 @@ AS_IF([test x$ac_cv_sizeof_long_long = x | ||
26 | # long long is a 64 bit integer. | ||
27 | AC_MSG_CHECKING(for format to printf and scanf a guint64) | ||
28 | AC_CACHE_VAL(glib_cv_long_long_format,[ | ||
29 | - for format in ll q I64; do | ||
30 | + for format in ll q; do | ||
31 | AC_TRY_RUN([#include <stdio.h> | ||
32 | int main() | ||
33 | { | ||
34 | @@ -2995,8 +2995,8 @@ long) | ||
35 | glib_msize_type='LONG' | ||
36 | ;; | ||
37 | "long long") | ||
38 | - gsize_modifier='"I64"' | ||
39 | - gsize_format='"I64u"' | ||
40 | + gsize_modifier='"ll"' | ||
41 | + gsize_format='"llu"' | ||
42 | glib_msize_type='INT64' | ||
43 | ;; | ||
44 | esac | ||
45 | @@ -3018,8 +3018,8 @@ long) | ||
46 | glib_mssize_type='LONG' | ||
47 | ;; | ||
48 | "long long") | ||
49 | - gssize_modifier='"I64"' | ||
50 | - gssize_format='"I64i"' | ||
51 | + gssize_modifier='"ll"' | ||
52 | + gssize_format='"lli"' | ||
53 | glib_mssize_type='INT64' | ||
54 | ;; | ||
55 | esac | ||
56 | @@ -3048,9 +3048,9 @@ $ac_cv_sizeof_long) | ||
57 | ;; | ||
58 | $ac_cv_sizeof_long_long) | ||
59 | glib_intptr_type_define='long long' | ||
60 | - gintptr_modifier='"I64"' | ||
61 | - gintptr_format='"I64i"' | ||
62 | - guintptr_format='"I64u"' | ||
63 | + gintptr_modifier='"ll"' | ||
64 | + gintptr_format='"lli"' | ||
65 | + guintptr_format='"llu"' | ||
66 | glib_gpi_cast='(gint64)' | ||
67 | glib_gpui_cast='(guint64)' | ||
68 | ;; | ||