diff options
author | David Young <dyoung@hdfgroup.org> | 2020-02-24 17:03:26 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-02-24 17:03:26 (GMT) |
commit | 1a4097e55cabfb2b70e0262a73e86629d8a509a7 (patch) | |
tree | ab3e959caa2d17ddb3bbeb19247a3fc3675338f3 /src | |
parent | 48ca10f80ee7dab2277feb83472466b79110cea6 (diff) | |
download | hdf5-1a4097e55cabfb2b70e0262a73e86629d8a509a7.zip hdf5-1a4097e55cabfb2b70e0262a73e86629d8a509a7.tar.gz hdf5-1a4097e55cabfb2b70e0262a73e86629d8a509a7.tar.bz2 |
Don't use the __ prefix for attributes __unused and such, since that's reserved
for the system software, IIUC, and it clashes with a symbol on CentOS.
Instead, use a _ prefix.
Diffstat (limited to 'src')
-rw-r--r-- | src/hlog.c | 4 | ||||
-rw-r--r-- | src/hlog.h | 42 |
2 files changed, 23 insertions, 23 deletions
@@ -31,7 +31,7 @@ HLOG_OUTLET_TOP_DEFN(all); static struct timespec timestamp_zero; -void hlog_init(void) __constructor; +void hlog_init(void) _constructor; static void hlog_init_timestamps(void); void @@ -246,7 +246,7 @@ hlog_outlet_find_active(struct hlog_outlet *ls0) } void -hlog_always(struct hlog_outlet *ls __unused, const char *fmt, ...) +hlog_always(struct hlog_outlet *ls _unused, const char *fmt, ...) { va_list ap; @@ -18,20 +18,20 @@ #include "bsdqueue.h" -#ifndef __unused -#define __unused __attribute__((unused)) +#ifndef _unused +#define _unused __attribute__((unused)) #endif -#ifndef __constructor -#define __constructor __attribute__((constructor)) +#ifndef _constructor +#define _constructor __attribute__((constructor)) #endif -#ifndef __noreturn -#define __noreturn __attribute__((__noreturn__)) +#ifndef _noreturn +#define _noreturn __attribute__((__noreturn__)) #endif -#ifndef __printflike -#define __printflike(_fmt, _args) \ +#ifndef _printflike +#define _printflike(_fmt, _args) \ __attribute__((__format__(__printf__,_fmt,_args))) #endif @@ -56,13 +56,13 @@ struct hlog_outlet { typedef struct hlog_outlet hlog_outlet_t; #define HLOG_CONSTRUCTOR(__sym) \ -void hlog_constructor_##__sym(void) __constructor; \ +void hlog_constructor_##__sym(void) _constructor; \ void \ hlog_constructor_##__sym(void) \ { \ hlog_outlet_register(&__sym); \ } \ -void hlog_undefined_##__sym(void) __constructor +void hlog_undefined_##__sym(void) _constructor #define HLOG_OUTLET_FOREACH(__le, __le0) \ for ((__le) = (__le0); (__le) != NULL; (__le) = (__le)->ls_parent) @@ -111,23 +111,23 @@ void hlog_outlet_register(struct hlog_outlet *); struct hlog_outlet *hlog_outlet_lookup(const char *); int hlog_set_state(const char *, hlog_outlet_state_t, bool); -void vhlog(const char *, va_list) __printflike(1,0); +void vhlog(const char *, va_list) _printflike(1,0); -void vhlog_warn(const char *, va_list) __printflike(1,0); -void vhlog_warnx(const char *, va_list) __printflike(1,0); -void vhlog_err(int, const char *, va_list) __printflike(2,0) __noreturn; -void vhlog_errx(int, const char *, va_list) __printflike(2,0) __noreturn; +void vhlog_warn(const char *, va_list) _printflike(1,0); +void vhlog_warnx(const char *, va_list) _printflike(1,0); +void vhlog_err(int, const char *, va_list) _printflike(2,0) _noreturn; +void vhlog_errx(int, const char *, va_list) _printflike(2,0) _noreturn; -void hlog_warnx(const char *, ...) __printflike(1,2); -void hlog_warn(const char *, ...) __printflike(1,2); +void hlog_warnx(const char *, ...) _printflike(1,2); +void hlog_warn(const char *, ...) _printflike(1,2); -void hlog_err(int, const char *, ...) __printflike(2,3) __noreturn; -void hlog_errx(int, const char *, ...) __printflike(2,3) __noreturn; +void hlog_err(int, const char *, ...) _printflike(2,3) _noreturn; +void hlog_errx(int, const char *, ...) _printflike(2,3) _noreturn; void hlog_always(struct hlog_outlet *, const char *, ...) - __printflike(2,3); + _printflike(2,3); void hlog_impl(struct hlog_outlet *, const char *, ...) - __printflike(2,3); + _printflike(2,3); #endif /* _HLOG_H */ |