1 From 7e821441c482917e54435a07893272d87d3ad9e5 Mon Sep 17 00:00:00 2001
2 From: Christoph Reiter <reiter.christoph@gmail.com>
3 Date: Fri, 24 Aug 2018 19:43:04 +0200
4 Subject: [PATCH] autotools: remove support for the __int64 type. See #1313
6 __int64 was the 64bit type for Visual Studio before it added support for
7 "long long" with VS2013. I think this was used to build glib with mingw and
8 make the result usable for VS 6.0 which didn't support "long long" (??)
10 Given that newer MSVC links against a different crt and mixing is not supported
11 and everything supports "long long" nowadays just remove it.
13 This is also a cleanup for printf format changes needed for #1497
15 Signed-off-by: Khem Raj <raj.khem@gmail.com>
16 Upstream-Status: Backport [https://github.com/GNOME/glib/commit/7e821441c4]
18 configure.ac | 43 ++++---------------------------------------
19 1 file changed, 4 insertions(+), 39 deletions(-)
21 --- a/glib/configure.ac
22 +++ b/glib/configure.ac
23 @@ -550,7 +550,6 @@ AC_CHECK_SIZEOF(long)
25 AC_CHECK_SIZEOF(void *)
26 AC_CHECK_SIZEOF(long long)
27 -AC_CHECK_SIZEOF(__int64)
29 AC_CACHE_CHECK([for sig_atomic_t], ac_cv_type_sig_atomic_t,
30 [AC_TRY_LINK([#include <signal.h>
31 @@ -564,7 +563,7 @@ if test x$ac_cv_type_sig_atomic_t = xyes
32 [Define if you have the 'sig_atomic_t' type.])
35 -if test x$ac_cv_sizeof_long = x8 || test x$ac_cv_sizeof_long_long = x8 || test x$ac_cv_sizeof___int64 = x8 ; then
36 +if test x$ac_cv_sizeof_long = x8 || test x$ac_cv_sizeof_long_long = x8 ; then
40 @@ -573,7 +572,7 @@ else
44 -AS_IF([test x$glib_native_win32 != xyes && test x$ac_cv_sizeof_long_long = x8], [
45 +AS_IF([test x$ac_cv_sizeof_long_long = x8], [
46 # long long is a 64 bit integer.
47 AC_MSG_CHECKING(for format to printf and scanf a guint64)
48 AC_CACHE_VAL(glib_cv_long_long_format,[
49 @@ -599,14 +598,6 @@ AS_IF([test x$glib_native_win32 != xyes
50 AC_DEFINE(HAVE_INT64_AND_I64,1,[define to support printing 64-bit integers with format I64])
52 ], [AC_MSG_RESULT(none)])
53 -],[ test x$ac_cv_sizeof___int64 = x8], [
54 - # __int64 is a 64 bit integer.
55 - AC_MSG_CHECKING(for format to printf and scanf a guint64)
56 - # We know this is MSVCRT.DLL, and what the formats are
57 - glib_cv_long_long_format=I64
58 - AC_MSG_RESULT(%${glib_cv_long_long_format}u)
59 - AC_DEFINE(HAVE_LONG_LONG_FORMAT,1,[define if system printf can print long long])
60 - AC_DEFINE(HAVE_INT64_AND_I64,1,[define to support printing 64-bit integers with format I64])
64 @@ -872,9 +863,6 @@ case $ac_cv_sizeof_size_t in
65 $ac_cv_sizeof_long_long)
66 glib_size_type='long long'
68 - $ac_cv_sizeof__int64)
69 - glib_size_type='__int64'
71 *) AC_MSG_ERROR([No type matching size_t in size])
74 @@ -931,9 +919,6 @@ case $ac_cv_sizeof_ssize_t in
75 $ac_cv_sizeof_long_long)
76 glib_ssize_type='long long'
78 - $ac_cv_sizeof__int64)
79 - glib_ssize_type='__int64'
81 *) AC_MSG_ERROR([No type matching ssize_t in size])
84 @@ -2985,17 +2970,6 @@ $ac_cv_sizeof_long_long)
85 gint64_constant='(G_GNUC_EXTENSION (val##LL))'
86 guint64_constant='(G_GNUC_EXTENSION (val##ULL))'
88 -$ac_cv_sizeof___int64)
90 - if test -n "$glib_cv_long_long_format"; then
91 - gint64_modifier='"'$glib_cv_long_long_format'"'
92 - gint64_format='"'$glib_cv_long_long_format'i"'
93 - guint64_format='"'$glib_cv_long_long_format'u"'
96 - gint64_constant='(val##i64)'
97 - guint64_constant='(val##ui64)'
100 glib_size_t=$ac_cv_sizeof_size_t
101 glib_ssize_t=$ac_cv_sizeof_ssize_t
102 @@ -3020,7 +2994,7 @@ long)
104 glib_msize_type='LONG'
106 -"long long"|__int64)
108 gsize_modifier='"I64"'
109 gsize_format='"I64u"'
110 glib_msize_type='INT64'
111 @@ -3043,7 +3017,7 @@ long)
113 glib_mssize_type='LONG'
115 -"long long"|__int64)
117 gssize_modifier='"I64"'
118 gssize_format='"I64i"'
119 glib_mssize_type='INT64'
120 @@ -3080,14 +3054,6 @@ $ac_cv_sizeof_long_long)
121 glib_gpi_cast='(gint64)'
122 glib_gpui_cast='(guint64)'
124 -$ac_cv_sizeof___int64)
125 - glib_intptr_type_define=__int64
126 - gintptr_modifier='"I64"'
127 - gintptr_format='"I64i"'
128 - guintptr_format='"I64u"'
129 - glib_gpi_cast='(gint64)'
130 - glib_gpui_cast='(guint64)'
133 glib_unknown_void_p=yes
135 @@ -3258,9 +3224,6 @@ $ac_cv_sizeof_long)
136 $ac_cv_sizeof_long_long)
139 -$ac_cv_sizeof___int64)
144 AC_CHECK_TYPE([guint32],,,[typedef unsigned $gint32 guint32;])