Tweak types detection, make gint64 and int64_t match on 64 bits base-gcc archs.
Fixes www/webkitgtk4 on sparc64. Help and ok ajacoutot@
This commit is contained in:
parent
c2525adf70
commit
48f5813cb8
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.303 2019/05/03 16:31:36 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.304 2019/05/12 22:03:53 jca Exp $
|
||||
|
||||
# Everything is a Freaking GLib/GTK+ problem
|
||||
CFLAGS += -g
|
||||
@ -8,6 +8,7 @@ COMMENT= general-purpose utility library
|
||||
|
||||
GNOME_PROJECT= glib
|
||||
GNOME_VERSION= 2.60.2
|
||||
REVISION= 0
|
||||
PKGNAME= ${DISTNAME:S/glib/glib2/}
|
||||
|
||||
CATEGORIES= devel
|
||||
|
@ -1,6 +1,11 @@
|
||||
$OpenBSD: patch-meson_build,v 1.4 2019/05/12 04:04:12 ajacoutot Exp $
|
||||
$OpenBSD: patch-meson_build,v 1.5 2019/05/12 22:03:53 jca Exp $
|
||||
|
||||
https://gitlab.gnome.org/GNOME/glib/issues/1777
|
||||
gint64 should be long long: https://gitlab.gnome.org/GNOME/glib/issues/1442
|
||||
Reordering needed to prefer long long because base-gcc doesn't recognize
|
||||
#pragma GCC diagnostic error "-Wincompatible-pointer-types"
|
||||
and doesn't fail to compile the test case.
|
||||
|
||||
gsize should be unsigned long: https://gitlab.gnome.org/GNOME/glib/issues/1777
|
||||
|
||||
Last hunk: __GCC_HAVE_SYNC_* macros were introduced after gcc 4.2.1,
|
||||
make the workaround more generic.
|
||||
@ -8,6 +13,44 @@ make the workaround more generic.
|
||||
Index: meson.build
|
||||
--- meson.build.orig
|
||||
+++ meson.build
|
||||
@@ -1118,18 +1118,6 @@ endif
|
||||
# works.
|
||||
if long_long_size == long_size
|
||||
if cc.compiles('''#if defined(_AIX) && !defined(__GNUC__)
|
||||
- #pragma options langlvl=stdc99
|
||||
- #endif
|
||||
- #pragma GCC diagnostic error "-Wincompatible-pointer-types"
|
||||
- #include <stdint.h>
|
||||
- #include <stdio.h>
|
||||
- int main () {
|
||||
- int64_t i1 = 1;
|
||||
- long *i2 = &i1;
|
||||
- return 1;
|
||||
- }''', name : 'int64_t is long')
|
||||
- int64_t_typedef = 'long'
|
||||
- elif cc.compiles('''#if defined(_AIX) && !defined(__GNUC__)
|
||||
#pragma options langlvl=stdc99
|
||||
#endif
|
||||
#pragma GCC diagnostic error "-Wincompatible-pointer-types"
|
||||
@@ -1141,6 +1129,18 @@ if long_long_size == long_size
|
||||
return 1;
|
||||
}''', name : 'int64_t is long long')
|
||||
int64_t_typedef = 'long long'
|
||||
+ elif cc.compiles('''#if defined(_AIX) && !defined(__GNUC__)
|
||||
+ #pragma options langlvl=stdc99
|
||||
+ #endif
|
||||
+ #pragma GCC diagnostic error "-Wincompatible-pointer-types"
|
||||
+ #include <stdint.h>
|
||||
+ #include <stdio.h>
|
||||
+ int main () {
|
||||
+ int64_t i1 = 1;
|
||||
+ long *i2 = &i1;
|
||||
+ return 1;
|
||||
+ }''', name : 'int64_t is long')
|
||||
+ int64_t_typedef = 'long'
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -1275,13 +1275,6 @@ if sizet_size == short_size
|
||||
glibconfig_conf.set_quoted('gsize_format', 'hu')
|
||||
glibconfig_conf.set_quoted('gssize_format', 'hi')
|
||||
|
Loading…
Reference in New Issue
Block a user