diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2019-12-13 14:54:09 +0000 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2020-06-26 15:56:39 +0100 |
commit | 866706584c6622bd7f9f595c307422771ce1d564 (patch) | |
tree | d38f09284f2fd8789e5493d2057f73780e589c40 /libctf | |
parent | 2e428e74401480c562a203ba6b6923ce8c7811fa (diff) | |
download | gdb-866706584c6622bd7f9f595c307422771ce1d564.zip gdb-866706584c6622bd7f9f595c307422771ce1d564.tar.gz gdb-866706584c6622bd7f9f595c307422771ce1d564.tar.bz2 |
libctf: work with compilers not supporting GNU C attributes
The obvious fallback __attribute__ stanza was missing.
Thanks to Harald van Dijk.
PR 25120
libctf/
* ctf-impl.h (_libctf_printflike_): Add non-GNU-C fallback.
(_libctf_unlikely_): Likewise.
(_libctf_unused): Likewise.
(_libctf_malloc_): Likewise.
Diffstat (limited to 'libctf')
-rw-r--r-- | libctf/ChangeLog | 8 | ||||
-rw-r--r-- | libctf/ctf-impl.h | 7 |
2 files changed, 15 insertions, 0 deletions
diff --git a/libctf/ChangeLog b/libctf/ChangeLog index 62c2cc5..a8217fa 100644 --- a/libctf/ChangeLog +++ b/libctf/ChangeLog @@ -1,6 +1,14 @@ 2020-06-26 Nick Alcock <nick.alcock@oracle.com> PR libctf/25120 + * ctf-impl.h (_libctf_printflike_): Add non-GNU-C fallback. + (_libctf_unlikely_): Likewise. + (_libctf_unused): Likewise. + (_libctf_malloc_): Likewise. + +2020-06-26 Nick Alcock <nick.alcock@oracle.com> + + PR libctf/25120 * ctf-archive.c (search_nametbl): No longer global: declare... (ctf_arc_open_by_name_internal): ... here. Use bsearch_r. (search_modent_by_name): Take and use ARG for the nametbl. diff --git a/libctf/ctf-impl.h b/libctf/ctf-impl.h index ade1a6e..133ca0e 100644 --- a/libctf/ctf-impl.h +++ b/libctf/ctf-impl.h @@ -59,6 +59,13 @@ extern "C" #define _libctf_unused_ __attribute__ ((__unused__)) #define _libctf_malloc_ __attribute__((__malloc__)) +#else + +#define _libctf_printflike_(string_index,first_to_check) +#define _libctf_unlikely_(x) (x) +#define _libctf_unused_ +#define _libctf_malloc_ + #endif /* libctf in-memory state. */ |