[dovecot-cvs] dovecot/src/lib macros.h,1.22,1.23
tss at dovecot.org
tss at dovecot.org
Thu Mar 29 14:48:20 EEST 2007
- Previous message: [dovecot-cvs] dovecot/src/lib-storage/list index-mailbox-list-sync.c, 1.5, 1.6 mailbox-list-fs-iter.c, 1.2, 1.3 mailbox-list-fs.c, 1.4, 1.5 mailbox-list-maildir-iter.c, 1.2, 1.3 mailbox-list-maildir.c, 1.5, 1.6
- Next message: [dovecot-cvs] dovecot/src/plugins/acl Makefile.am, 1.3, 1.4 acl-mailbox-list.c, 1.3, 1.4 acl-mailbox.c, 1.4, 1.5 acl-plugin.h, 1.3, 1.4 acl-storage.c, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv16022
Modified Files:
macros.h
Log Message:
Added HAVE_TYPEOF, COMPILE_ERROR_IF_TRUE() and
COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE() macros.
Index: macros.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/macros.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- macros.h 22 Feb 2007 15:59:54 -0000 1.22
+++ macros.h 29 Mar 2007 11:48:18 -0000 1.23
@@ -142,6 +142,18 @@
name(__VA_ARGS__, (callback_type *)callback, context)
#endif
+#ifdef __GNUC__
+# define HAVE_TYPEOF
+# define COMPILE_ERROR_IF_TRUE(condition) \
+ (sizeof(char[1 - 2 * !!(condition)]) - 1)
+# define COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE(_a, _b) \
+ COMPILE_ERROR_IF_TRUE( \
+ !__builtin_types_compatible_p(typeof(_a), typeof(_b)))
+#else
+# define COMPILE_ERROR_IF_TRUE(condition) 0
+# define COMPILE_ERROR_IF_TYPES_NOT_COMPATIBLE(_a, _b) 0
+#endif
+
/* Wrap the gcc __PRETTY_FUNCTION__ and __FUNCTION__ variables with
macros, so we can refer to them as strings unconditionally. */
#ifdef __GNUC__
- Previous message: [dovecot-cvs] dovecot/src/lib-storage/list index-mailbox-list-sync.c, 1.5, 1.6 mailbox-list-fs-iter.c, 1.2, 1.3 mailbox-list-fs.c, 1.4, 1.5 mailbox-list-maildir-iter.c, 1.2, 1.3 mailbox-list-maildir.c, 1.5, 1.6
- Next message: [dovecot-cvs] dovecot/src/plugins/acl Makefile.am, 1.3, 1.4 acl-mailbox-list.c, 1.3, 1.4 acl-mailbox.c, 1.4, 1.5 acl-plugin.h, 1.3, 1.4 acl-storage.c, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list