summaryrefslogtreecommitdiffstats
path: root/source/include/includes.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/include/includes.h')
-rw-r--r--source/include/includes.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/source/include/includes.h b/source/include/includes.h
index f8dcee4aab5..74f9c4af257 100644
--- a/source/include/includes.h
+++ b/source/include/includes.h
@@ -208,7 +208,9 @@
#ifdef HAVE_SYSLOG_H
#include <syslog.h>
#endif
+#ifdef HAVE_SYS_FILE_H
#include <sys/file.h>
+#endif
#ifdef HAVE_NETINET_TCP_H
#include <netinet/tcp.h>
@@ -388,8 +390,12 @@
/*
* Define additional missing types
*/
-#ifndef HAVE_SIG_ATOMIC_T_TYPE
-typedef int sig_atomic_t;
+#if defined(HAVE_SIG_ATOMIC_T_TYPE) && defined(AIX)
+typedef sig_atomic_t SIG_ATOMIC_T;
+#elif defined(HAVE_SIG_ATOMIC_T_TYPE) && !defined(AIX)
+typedef sig_atomic_t VOLATILE SIG_ATOMIC_T;
+#else
+typedef int VOLATILE SIG_ATOMIC_T;
#endif
#ifndef HAVE_SOCKLEN_T_TYPE
@@ -688,6 +694,8 @@ extern int errno;
#include "popt.h"
+#include "mangle.h"
+
#ifndef MAXCODEPAGELINES
#define MAXCODEPAGELINES 256
#endif
@@ -875,6 +883,14 @@ size_t strlcat(char *d, const char *s, size_t bufsize);
int ftruncate(int f,long l);
#endif
+#ifndef HAVE_STRNDUP
+char *strndup(const char *s, size_t n);
+#endif
+
+#ifndef HAVE_STRNLEN
+size_t strnlen(const char *s, size_t n);
+#endif
+
#ifndef HAVE_STRTOUL
unsigned long strtoul(const char *nptr, char **endptr, int base);
#endif
@@ -1072,5 +1088,12 @@ int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3);
#define slprintf snprintf
#define vslprintf vsnprintf
+/* we need to use __va_copy() on some platforms */
+#ifdef HAVE_VA_COPY
+#define VA_COPY(dest, src) __va_copy(dest, src)
+#else
+#define VA_COPY(dest, src) (dest) = (src)
+#endif
+
#endif /* _INCLUDES_H */