diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2017-04-20 15:55:47 +0200 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2017-05-02 13:07:28 +0200 |
commit | c73a00d82bbb7196c517f61cdf14c09b2b16a668 (patch) | |
tree | 24cee57d746d82fae3cc18672c145e36ac00c727 /libdw/libdw.h | |
parent | ab293bfbc76a0fa5461bcbdb105332a9f1d85892 (diff) | |
download | elfutils-c73a00d82bbb7196c517f61cdf14c09b2b16a668.tar.gz |
Make __attribute__ conditional in all installed headers
__attribute__ is a GNU extension. If we want to link against the
libraries using a different compiler, it needs to be disabled. It was
already disabled in libdw.h, and this patch extends this to the other
headers. We move the defines to libelf.h as that is included in all
the others.
Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'libdw/libdw.h')
-rw-r--r-- | libdw/libdw.h | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/libdw/libdw.h b/libdw/libdw.h index 473e1a25..9ae80ebb 100644 --- a/libdw/libdw.h +++ b/libdw/libdw.h @@ -34,23 +34,6 @@ #include <stddef.h> #include <stdint.h> - -#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) -# define __nonnull_attribute__(...) __attribute__ ((__nonnull__ (__VA_ARGS__))) -# define __deprecated_attribute__ __attribute__ ((__deprecated__)) -#else -# define __nonnull_attribute__(args...) -# define __deprecated_attribute__ -#endif - - -#ifdef __GNUC_STDC_INLINE__ -# define __libdw_extern_inline extern __inline __attribute__ ((__gnu_inline__)) -#else -# define __libdw_extern_inline extern __inline -#endif - - /* Mode for the session. */ typedef enum { @@ -242,11 +225,7 @@ typedef struct Dwarf Dwarf; /* Out-Of-Memory handler. */ -#if __GNUC__ < 4 -typedef void (*Dwarf_OOM) (void); -#else -typedef void (*__attribute__ ((noreturn)) Dwarf_OOM) (void); -#endif +typedef void (*__noreturn_attribute__ Dwarf_OOM) (void); #ifdef __cplusplus |