This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=b1ede27290bb9c32c5f6a2f455dca42109f9406f

commit b1ede27290bb9c32c5f6a2f455dca42109f9406f
Author: Guillem Jover <[email protected]>
AuthorDate: Fri Dec 9 23:35:32 2022 +0100

    libcompat: Add noreturn and sentinel C attributes
    
    This will be used by u-a and s-s-d, to avoid dpkg specific symbol usage.
---
 lib/compat/compat.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lib/compat/compat.h b/lib/compat/compat.h
index 3201efc07..8a96fcf12 100644
--- a/lib/compat/compat.h
+++ b/lib/compat/compat.h
@@ -55,6 +55,18 @@
 #define LIBCOMPAT_ATTR_VPRINTF(n)
 #endif
 
+#if LIBCOMPAT_GCC_VERSION >= 0x0300
+#define LIBCOMPAT_ATTR_NORET           __attribute__((noreturn))
+#else
+#define LIBCOMPAT_ATTR_NORET
+#endif
+
+#if LIBCOMPAT_GCC_VERSION >= 0x0400
+#define LIBCOMPAT_ATTR_SENTINEL                __attribute__((sentinel))
+#else
+#define LIBCOMPAT_ATTR_SENTINEL
+#endif
+
 /* For C++, define a __func__ fallback in case it's not natively supported. */
 #if defined(__cplusplus) && __cplusplus < 201103L
 # if LIBCOMPAT_GCC_VERSION >= 0x0200

-- 
Dpkg.Org's dpkg

Reply via email to