summaryrefslogtreecommitdiff
path: root/dbm/src/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'dbm/src/hash.c')
-rw-r--r--dbm/src/hash.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/dbm/src/hash.c b/dbm/src/hash.c
index 23b172ef8..be08567fc 100644
--- a/dbm/src/hash.c
+++ b/dbm/src/hash.c
@@ -40,11 +40,15 @@ static char sccsid[] = "@(#)hash.c 8.9 (Berkeley) 6/16/94";
#include "watcomfx.h"
-#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh)
+#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2_VACPP)
#include <sys/param.h>
#endif
#if !defined(macintosh)
+#ifdef XP_OS2_EMX
+#include <sys/types.h>
+#include "xp_mcom.h" /* For strdup. */
+#endif
#include <sys/stat.h>
#endif
@@ -58,10 +62,15 @@ static char sccsid[] = "@(#)hash.c 8.9 (Berkeley) 6/16/94";
#include <stdlib.h>
#include <string.h>
-#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh)
+#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2_VACPP)
#include <unistd.h>
#endif
+#ifdef XP_OS2_VACPP
+#include "types.h"
+#define EPERM SOCEPERM
+#endif
+
#ifdef DEBUG
#include <assert.h>
#endif
@@ -183,7 +192,7 @@ __hash_open(const char *file, int flags, int mode, const HASHINFO *info, int dfl
if (file) {
-#if defined(_WIN32) || defined(_WINDOWS) || defined (macintosh)
+#if defined(_WIN32) || defined(_WINDOWS) || defined (macintosh) || defined(XP_OS2_VACPP)
if ((hashp->fp = DBFILE_OPEN(file, flags | O_BINARY, mode)) == -1)
RETURN_ERROR(errno, error0);
#else
@@ -411,7 +420,7 @@ init_hash(HTAB *hashp, const char *file, HASHINFO *info)
if (stat(file, &statbuf))
return (NULL);
-#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(VMS)
+#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(VMS) && !defined(XP_OS2)
#ifdef __QNX__
hashp->BSIZE = statbuf.st_size;
#else