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.
This commit is contained in:
Nick Alcock 2019-12-13 14:54:09 +00:00
parent 2e428e7440
commit 866706584c
2 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,11 @@
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

View File

@ -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. */