mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-04 18:26:19 +01:00
glib-init: statically assert that we have 8-bit bytes
configure.ac assumes this. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=730932
This commit is contained in:
parent
7269d75321
commit
9060a85193
@ -2812,6 +2812,7 @@ _______EOF
|
|||||||
|
|
||||||
|
|
||||||
### this should always be true in a modern C/C++ compiler
|
### this should always be true in a modern C/C++ compiler
|
||||||
|
### and is statically asserted by glib-init.c
|
||||||
cat >>$outfile <<_______EOF
|
cat >>$outfile <<_______EOF
|
||||||
typedef signed char gint8;
|
typedef signed char gint8;
|
||||||
typedef unsigned char guint8;
|
typedef unsigned char guint8;
|
||||||
|
@ -35,6 +35,9 @@
|
|||||||
/* This seems as good a place as any to make static assertions about platform
|
/* This seems as good a place as any to make static assertions about platform
|
||||||
* assumptions we make throughout GLib. */
|
* assumptions we make throughout GLib. */
|
||||||
|
|
||||||
|
/* We do not support 36-bit bytes or other historical curiosities. */
|
||||||
|
G_STATIC_ASSERT (CHAR_BIT == 8);
|
||||||
|
|
||||||
/* We assume that data pointers are the same size as function pointers... */
|
/* We assume that data pointers are the same size as function pointers... */
|
||||||
G_STATIC_ASSERT (sizeof (gpointer) == sizeof (GFunc));
|
G_STATIC_ASSERT (sizeof (gpointer) == sizeof (GFunc));
|
||||||
G_STATIC_ASSERT (_g_alignof (gpointer) == _g_alignof (GFunc));
|
G_STATIC_ASSERT (_g_alignof (gpointer) == _g_alignof (GFunc));
|
||||||
|
Loading…
Reference in New Issue
Block a user