summaryrefslogtreecommitdiff
path: root/source4/lib/replace/replace.h
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-09-23 00:38:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:38:45 -0500
commitf3b412fbd6dd94d64eb6a63d88baef2816891c29 (patch)
tree61b6086157d30cf1dd64c8cc720638cd484c78d1 /source4/lib/replace/replace.h
parent92d74c340843f52aaced18dcc243965387fcaedb (diff)
downloadsamba-f3b412fbd6dd94d64eb6a63d88baef2816891c29.tar.gz
samba-f3b412fbd6dd94d64eb6a63d88baef2816891c29.tar.bz2
samba-f3b412fbd6dd94d64eb6a63d88baef2816891c29.zip
r10438: Move portability functions to lib/replace/; replace now simply ensures
that a given set of (working) POSIX functions are available (without prefixes to their names, etc). See lib/replace/README for a list. Functions that behave different from their POSIX specification (such as sys_select, sys_read, etc) have kept the sys_ prefix. (This used to be commit 29919a71059b29fa27a49b1f5b84bb8881de65fc)
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