mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-10-16 18:56:56 +02:00
Support GCC deprecated attribute for GCC older than 4.5
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=99190 Based-on-patch-by: Eric Smith <brouhaha@fedoraproject.org>
This commit is contained in:
@@ -49,6 +49,14 @@
|
||||
#define LIBBSD_GCC_VERSION 0
|
||||
#endif
|
||||
|
||||
#if LIBBSD_GCC_VERSION >= 0x0405
|
||||
#define LIBBSD_DEPRECATED(x) __attribute__((deprecated(x)))
|
||||
#elif LIBBSD_GCC_VERSION >= 0x0301
|
||||
#define LIBBSD_DEPRECATED(x) __attribute__((deprecated))
|
||||
#else
|
||||
#define LIBBSD_DEPRECATED(x)
|
||||
#endif
|
||||
|
||||
#ifndef __dead2
|
||||
# if LIBBSD_GCC_VERSION >= 0x0207
|
||||
# define __dead2 __attribute__((__noreturn__))
|
||||
|
Reference in New Issue
Block a user