summaryrefslogtreecommitdiff
path: root/source4/lib/replace/replace.h
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/replace/replace.h')
-rw-r--r--source4/lib/replace/replace.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/source4/lib/replace/replace.h b/source4/lib/replace/replace.h
index f85c8de634..f906e7a2f5 100644
--- a/source4/lib/replace/replace.h
+++ b/source4/lib/replace/replace.h
@@ -23,6 +23,10 @@
#ifndef _replace_h
#define _replace_h
+#if defined(_MSC_VER) || defined(__MINGW32__)
+#include "lib/replace/win32/replace.h"
+#endif
+
#ifdef __COMPAR_FN_T
#define QSORT_CAST (__compar_fn_t)
#endif
@@ -31,6 +35,15 @@
#define QSORT_CAST (int (*)(const void *, const void *))
#endif
+#ifndef HAVE_STRERROR
+extern char *sys_errlist[];
+#define strerror(i) sys_errlist[i]
+#endif
+
+#ifndef HAVE_ERRNO_DECL
+extern int errno;
+#endif
+
#ifndef HAVE_STRDUP
char *strdup(const char *s);
#endif
@@ -136,4 +149,13 @@ typedef unsigned char u_int8_t;
#define HAVE_SOCKLEN_T 1
#endif
+#ifdef HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#ifndef HAVE_SECURE_MKSTEMP
+#define mkstemp(path) rep_mkstemp(path)
+int rep_mkstemp(char *temp);
+#endif
+
#endif