summaryrefslogtreecommitdiff
path: root/common/compat.h
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2004-04-21 17:37:06 +0000
committerStef Walter <stef@memberwebs.com>2004-04-21 17:37:06 +0000
commitff76efc3e5e1b0e4ca3b10b7402406f619509bba (patch)
treec3b1e49235f67eabd22d31ebfc14934743b70858 /common/compat.h
parent01430fca169c1b8d7b1b4f1bdd529aa6bc4be80b (diff)
Initial Import
Diffstat (limited to 'common/compat.h')
-rw-r--r--common/compat.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/common/compat.h b/common/compat.h
new file mode 100644
index 0000000..c250db1
--- /dev/null
+++ b/common/compat.h
@@ -0,0 +1,40 @@
+
+
+#ifndef _COMPAT_H_
+#define _COMPAT_H_
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <sys/types.h>
+
+#ifndef HAVE_STDARG_H
+#error ERROR: Must have a working stdarg.h header
+#else
+#include <stdarg.h>
+#endif
+
+#ifndef HAVE_REALLOCF
+void* reallocf(void* p, size_t sz);
+#endif
+
+#include <pthread.h>
+
+/* TODO: Move this logic to configure */
+#if HAVE_ERR_MUTEX == 1
+# define HA_MUTEX_TYPE PTHREAD_MUTEX_ERRORCHECK_NP
+#else
+# if HAVE_ERR_MUTEX == 2
+# define HA_MUTEX_TYPE PTHREAD_MUTEX_ERRORCHECK
+# else
+# error "Need error checking mutex functionality"
+# endif
+#endif
+
+#ifndef HAVE_STRLWR
+char* strlwr(char* s);
+#endif
+
+
+#endif /* _COMPAT_H_ */