aboutsummaryrefslogtreecommitdiff
path: root/libctf/ctf-impl.h
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2019-12-13 14:54:09 +0000
committerNick Alcock <nick.alcock@oracle.com>2020-06-26 15:56:39 +0100
commit866706584c6622bd7f9f595c307422771ce1d564 (patch)
treed38f09284f2fd8789e5493d2057f73780e589c40 /libctf/ctf-impl.h
parent2e428e74401480c562a203ba6b6923ce8c7811fa (diff)
downloadgdb-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/ctf-impl.h')
-rw-r--r--libctf/ctf-impl.h7
1 files changed, 7 insertions, 0 deletions
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. */