]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: macros - Use __typeof__ instead of typeof from C11 onwards
authorAki Tuomi <aki.tuomi@open-xchange.com>
Thu, 28 Aug 2025 09:46:08 +0000 (12:46 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Fri, 29 Aug 2025 08:41:41 +0000 (11:41 +0300)
typeof and __typeof__ are not standard until C23, and C11
requires using __typeof__.

src/lib/macros.h

index 5be1fceaa0503d9a00dd636e5fb9afa5c247e59c..bccd09f8a700515caaad488b6ad1498b98bc662c 100644 (file)
@@ -3,6 +3,10 @@
 
 /* several useful macros, mostly from glib.h */
 
+#ifdef __USE_ISOC11
+#  define typeof __typeof__
+#endif
+
 #ifndef NULL
 #  define NULL ((void *)0)
 #endif