X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/141c1c6f498390820c8913408d8af6cf6e97152a..febd0bc5aa33b3de9b5864e8c5565fe7b63f519f:/netdissect.h diff --git a/netdissect.h b/netdissect.h index 899e4b62..26d6d47b 100644 --- a/netdissect.h +++ b/netdissect.h @@ -186,27 +186,15 @@ struct netdissect_options { /* pointer to function to do regular output */ int (*ndo_printf)(netdissect_options *, const char *fmt, ...) -#ifdef __ATTRIBUTE___FORMAT_OK_FOR_FUNCTION_POINTERS - __attribute__ ((format (printf, 2, 3))) -#endif - ; + PRINTFLIKE_FUNCPTR(2, 3); /* pointer to function to output errors */ - void (*ndo_error)(netdissect_options *, - const char *fmt, ...) -#ifdef __ATTRIBUTE___NORETURN_OK_FOR_FUNCTION_POINTERS - __attribute__ ((noreturn)) -#endif /* __ATTRIBUTE___NORETURN_OK_FOR_FUNCTION_POINTERS */ -#ifdef __ATTRIBUTE___FORMAT_OK_FOR_FUNCTION_POINTERS - __attribute__ ((format (printf, 2, 3))) -#endif /* __ATTRIBUTE___FORMAT_OK_FOR_FUNCTION_POINTERS */ - ; + void NORETURN_FUNCPTR (*ndo_error)(netdissect_options *, + const char *fmt, ...) + PRINTFLIKE_FUNCPTR(2, 3); /* pointer to function to output warnings */ void (*ndo_warning)(netdissect_options *, const char *fmt, ...) -#ifdef __ATTRIBUTE___FORMAT_OK_FOR_FUNCTION_POINTERS - __attribute__ ((format (printf, 2, 3))) -#endif - ; + PRINTFLIKE_FUNCPTR(2, 3); }; #define PT_VAT 1 /* Visual Audio Tool */