X-Git-Url: http://git.jankratochvil.net/?p=mdsms.git;a=blobdiff_plain;f=acconfig.h;h=c20241f71937974f095e1d2c2e3c01160e02377e;hp=6d7a2b03d3266ca8c20e79cb2d9f17079191bc2d;hb=024c037ad5868decb5d300355ccd6220848ee220;hpb=8409e729e576b28d6c74c9fae7971aa64bd4a906 diff --git a/acconfig.h b/acconfig.h index 6d7a2b0..c20241f 100644 --- a/acconfig.h +++ b/acconfig.h @@ -41,19 +41,9 @@ /* snprintf(3) unsafe emulation */ #undef HAVE_SNPRINTF -#ifdef HAVE_SNPRINTF -#define VARPRINTF(v,f,d) snprintf((v),sizeof((v)),f,(d)) -#else -#define VARPRINTF(v,f,d) sprintf((v),f,(d)) -#endif /* vsnprintf(3) unsafe emulation */ #undef HAVE_VSNPRINTF -#ifdef HAVE_VSNPRINTF -#define VARVPRINTF(v,f,d) vsnprintf((v),sizeof((v)),f,(d)) -#else -#define VARVPRINTF(v,f,d) vsprintf((v),f,(d)) -#endif /* printf family accepts %m */ #undef PRINTF_WORKS_PM @@ -64,3 +54,62 @@ /* how to declare __atribute__ ((__unused__)) */ #undef ATTR_UNUSED +@BOTTOM@ +/* Declaration for gethostname(3)? */ +#undef NEED_DECLARATION_GETHOSTNAME +#ifdef NEED_DECLARATION_GETHOSTNAME +#include +int gethostname(char *name, size_t len); +#endif + +/* Declaration for kill(2)? */ +#undef NEED_DECLARATION_KILL +#ifdef NEED_DECLARATION_KILL +#include +#include +int kill(pid_t pid, int sig); +#endif + +/* Declaration for snprintf(3)? */ +#undef NEED_DECLARATION_SNPRINTF +#ifdef NEED_DECLARATION_SNPRINTF +#include +int snprintf(char *str, size_t n, const char *format, ...); +#endif + +/* Declaration for vsnprintf(3)? */ +#undef NEED_DECLARATION_VSNPRINTF +#ifdef NEED_DECLARATION_VSNPRINTF +#include +#include +int vsnprintf(char *str, size_t n, const char *format, va_list ap); +#endif + +/* Declaration for strdup(3)? */ +#undef NEED_DECLARATION_STRDUP +#ifdef NEED_DECLARATION_STRDUP +#include +char *strdup(const char *s); +#endif + +/* Declaration for usleep(3)? */ +#undef NEED_DECLARATION_USLEEP +#ifdef NEED_DECLARATION_USLEEP +#include +void usleep(unsigned long usec); +#endif + +/* snprintf(3) unsafe emulation */ +#ifdef HAVE_SNPRINTF +#define VARPRINTF(v,f,d) snprintf((v),sizeof((v)),f,(d)) +#else +#define VARPRINTF(v,f,d) sprintf((v),f,(d)) +#endif + +/* vsnprintf(3) unsafe emulation */ +#ifdef HAVE_VSNPRINTF +#define VARVPRINTF(v,f,d) vsnprintf((v),sizeof((v)),f,(d)) +#else +#define VARVPRINTF(v,f,d) vsprintf((v),f,(d)) +#endif +