mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-05 23:48:44 +02:00
Add G_G[U]INTPTR_FORMAT and G_GINTPTR_MODIFIER
Add macros for printf formatting for g[u]intptr. Bug 569376.
This commit is contained in:
16
configure.in
16
configure.in
@@ -2846,6 +2846,10 @@ _______EOF
|
||||
|
||||
typedef signed $glib_intptr_type_define gintptr;
|
||||
typedef unsigned $glib_intptr_type_define guintptr;
|
||||
|
||||
#define G_GINTPTR_MODIFIER $gintptr_modifier
|
||||
#define G_GINTPTR_FORMAT $gintptr_format
|
||||
#define G_GUINTPTR_FORMAT $guintptr_format
|
||||
_______EOF
|
||||
else
|
||||
echo '#error SIZEOF_VOID_P unknown - This should never happen' >>$outfile
|
||||
@@ -3225,21 +3229,33 @@ glongbits=`expr $ac_cv_sizeof_long \* 8`
|
||||
case $ac_cv_sizeof_void_p in
|
||||
$ac_cv_sizeof_int)
|
||||
glib_intptr_type_define=int
|
||||
gintptr_modifier='""'
|
||||
gintptr_format='"i"'
|
||||
guintptr_format='"u"'
|
||||
glib_gpi_cast=''
|
||||
glib_gpui_cast=''
|
||||
;;
|
||||
$ac_cv_sizeof_long)
|
||||
glib_intptr_type_define=long
|
||||
gintptr_modifier='"l"'
|
||||
gintptr_format='"li"'
|
||||
guintptr_format='"lu"'
|
||||
glib_gpi_cast='(glong)'
|
||||
glib_gpui_cast='(gulong)'
|
||||
;;
|
||||
$ac_cv_sizeof_long_long)
|
||||
glib_intptr_type_define='long long'
|
||||
gintptr_modifier='"I64"'
|
||||
gintptr_format='"I64i"'
|
||||
guintptr_format='"I64u"'
|
||||
glib_gpi_cast='(gint64)'
|
||||
glib_gpui_cast='(guint64)'
|
||||
;;
|
||||
$ac_cv_sizeof___int64)
|
||||
glib_intptr_type_define=__int64
|
||||
gintptr_modifier='"I64"'
|
||||
gintptr_format='"I64i"'
|
||||
guintptr_format='"I64u"'
|
||||
glib_gpi_cast='(gint64)'
|
||||
glib_gpui_cast='(guint64)'
|
||||
;;
|
||||
|
Reference in New Issue
Block a user