GCC_NEED_DECLARATION used to prevent (maintainer-only) GCC warnings.
[mdsms.git] / acconfig.h
index 6d7a2b0..c20241f 100644 (file)
 
 /* 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
 /* how to declare __atribute__ ((__unused__)) */
 #undef ATTR_UNUSED
 
+@BOTTOM@
+/* Declaration for gethostname(3)? */
+#undef NEED_DECLARATION_GETHOSTNAME
+#ifdef NEED_DECLARATION_GETHOSTNAME
+#include <unistd.h>
+int gethostname(char *name, size_t len);
+#endif
+
+/* Declaration for kill(2)? */
+#undef NEED_DECLARATION_KILL
+#ifdef NEED_DECLARATION_KILL
+#include <sys/types.h>
+#include <signal.h>
+int kill(pid_t pid, int sig);
+#endif
+
+/* Declaration for snprintf(3)? */
+#undef NEED_DECLARATION_SNPRINTF
+#ifdef NEED_DECLARATION_SNPRINTF
+#include <stdio.h>
+int snprintf(char *str, size_t n, const char *format, ...);
+#endif
+
+/* Declaration for vsnprintf(3)? */
+#undef NEED_DECLARATION_VSNPRINTF
+#ifdef NEED_DECLARATION_VSNPRINTF
+#include <stdio.h>
+#include <stdarg.h>
+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 <string.h>
+char *strdup(const char *s);
+#endif
+
+/* Declaration for usleep(3)? */
+#undef NEED_DECLARATION_USLEEP
+#ifdef NEED_DECLARATION_USLEEP
+#include <unistd.h>
+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
+