/* libemcommon.h */ /* Copyright 1997 by Eberhard Mattes Donated to the public domain. No warranty. 1997-07-24 Initial version */ #ifndef LIBEMCOMMON_INCLUDED #define LIBEMCOMMON_INCLUDED /* To let GCC check all the arguments of a printf()-like function, add ATTR_PRINTF(s,f) to the prototype, just before the semicolon. The format string is passed in argument S of the function, the first optional argument is passed in argument F of the function. Both S and F are integers and start from 1. Functions which never return can be annotated with ATTR_NORETURN. */ #ifdef __GNUC__ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) #define ATTR_PRINTF(s,f) __attribute__ ((__format__ (__printf__, (s), (f)))) #define ATTR_NORETURN __attribute__ ((__noreturn__)) extern void _exit (int) ATTR_NORETURN; #endif #endif #ifndef ATTR_PRINTF #define ATTR_PRINTF(s,f) #define ATTR_NORETURN #endif #endif