[glib] glib-private.h: add _glib_alignof
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] glib-private.h: add _glib_alignof
- Date: Mon, 20 Jan 2014 01:26:39 +0000 (UTC)
commit 476aa9ae46098f1090fc52ab2c10859fa8bb5495
Author: Simon McVittie <simon mcvittie collabora co uk>
Date: Fri Nov 16 12:49:15 2012 +0000
glib-private.h: add _glib_alignof
glib/glib-private.h | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/glib/glib-private.h b/glib/glib-private.h
index 44cbf3d..6195ad9 100644
--- a/glib/glib-private.h
+++ b/glib/glib-private.h
@@ -23,6 +23,12 @@
#include <glib.h>
#include "gwakeup.h"
+#if defined(__GNUC__)
+# define _g_alignof(type) (__alignof__ (type))
+#else
+# define _g_alignof(type) (G_STRUCT_OFFSET (struct { char a; type b; }, b))
+#endif
+
GMainContext * g_get_worker_context (void);
gboolean g_check_setuid (void);
GMainContext * g_main_context_new_with_next_id (guint next_id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]