summaryrefslogtreecommitdiff
path: root/compat.h
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2002-10-28 10:07:08 +0000
committerColin Watson <cjwatson@debian.org>2002-10-28 10:07:08 +0000
commit38a03f9f9593a1185c8996ef1024346ae12224aa (patch)
tree06a0dac4c8ca6fd421233ae33ad671b1372ae49a /compat.h
db1-compat: Create initial directory structure and import upstream from
glibc 2.1.3.
Diffstat (limited to 'compat.h')
-rw-r--r--compat.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/compat.h b/compat.h
new file mode 100644
index 0000000..706e582
--- /dev/null
+++ b/compat.h
@@ -0,0 +1,49 @@
+/* Values for building 4.4 BSD db routines in the GNU C library. */
+
+#ifndef _compat_h_
+#define _compat_h_
+
+#include <fcntl.h>
+
+/*
+ * If you can't provide lock values in the open(2) call. Note, this
+ * allows races to happen.
+ */
+#ifndef O_EXLOCK /* 4.4BSD extension. */
+#define O_EXLOCK 0
+#endif
+
+#ifndef O_SHLOCK /* 4.4BSD extension. */
+#define O_SHLOCK 0
+#endif
+
+#include <errno.h>
+
+#ifndef EFTYPE
+#define EFTYPE EINVAL /* POSIX 1003.1 format errno. */
+#endif
+
+#include <unistd.h>
+#include <limits.h>
+
+#ifndef _POSIX_VDISABLE /* POSIX 1003.1 disabling char. */
+#define _POSIX_VDISABLE 0 /* Some systems used 0. */
+#endif
+
+#include <termios.h>
+
+#ifndef TCSASOFT /* 4.4BSD extension. */
+#define TCSASOFT 0
+#endif
+
+#include <sys/param.h>
+
+#ifndef MAX /* Usually found in <sys/param.h>. */
+#define MAX(_a,_b) ((_a)<(_b)?(_b):(_a))
+#endif
+#ifndef MIN /* Usually found in <sys/param.h>. */
+#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b))
+#endif
+
+
+#endif /* compat.h */