diff options
author | mkaply%us.ibm.com <devnull@localhost> | 2000-03-07 21:00:06 +0000 |
---|---|---|
committer | mkaply%us.ibm.com <devnull@localhost> | 2000-03-07 21:00:06 +0000 |
commit | 12ca0ffadfb852af2e6bfe7dc8b54679b11ff8a4 (patch) | |
tree | 982bc0fc5e1bf4848bafd8156a6c44a7dc117651 /dbm/src | |
parent | c39be6e6b6830c1d9ed6b95de90badcb864dbe3a (diff) | |
download | nss-hg-12ca0ffadfb852af2e6bfe7dc8b54679b11ff8a4.tar.gz |
# 25555travisWebshell_03082000_BASEnscp_beta1_BASETravisWebshell_03082000_BRANCHSeaMonkey_M15_RELEASESeaMonkey_M15_BASE
r= pavlov@netscape.com
OS/2 changes for Mozilla - add #ifdef, change #ifdef
Diffstat (limited to 'dbm/src')
-rw-r--r-- | dbm/src/h_bigkey.c | 2 | ||||
-rw-r--r-- | dbm/src/h_page.c | 10 | ||||
-rw-r--r-- | dbm/src/hash.c | 17 | ||||
-rw-r--r-- | dbm/src/hash_buf.c | 2 | ||||
-rw-r--r-- | dbm/src/mktemp.c | 8 | ||||
-rw-r--r-- | dbm/src/ndbm.c | 2 | ||||
-rw-r--r-- | dbm/src/snprintf.c | 8 |
7 files changed, 33 insertions, 16 deletions
diff --git a/dbm/src/h_bigkey.c b/dbm/src/h_bigkey.c index 5dfa0cc4f..fe5d8f800 100644 --- a/dbm/src/h_bigkey.c +++ b/dbm/src/h_bigkey.c @@ -58,7 +58,7 @@ static char sccsid[] = "@(#)hash_bigkey.c 8.3 (Berkeley) 5/31/94"; * collect_data */ -#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2_VACPP) #include <sys/param.h> #endif diff --git a/dbm/src/h_page.c b/dbm/src/h_page.c index da31e9dbd..aa82b4ad4 100644 --- a/dbm/src/h_page.c +++ b/dbm/src/h_page.c @@ -75,7 +75,7 @@ static char sccsid[] = "@(#)hash_page.c 8.7 (Berkeley) 8/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 @@ -1146,12 +1146,12 @@ __free_ovflpage(HTAB *hashp, BUFHEAD *obufp) static int open_temp(HTAB *hashp) { -#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2) sigset_t set, oset; #endif static char namestr[] = "_hashXXXXXX"; -#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2) /* Block signals; make sure file goes away at process exit. */ (void)sigfillset(&set); (void)sigprocmask(SIG_BLOCK, &set, &oset); @@ -1159,12 +1159,12 @@ open_temp(HTAB *hashp) if ((hashp->fp = mkstemp(namestr)) != -1) { (void)unlink(namestr); -#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2) (void)fcntl(hashp->fp, F_SETFD, 1); #endif } -#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2) (void)sigprocmask(SIG_SETMASK, &oset, (sigset_t *)NULL); #endif return (hashp->fp != -1 ? 0 : -1); 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 diff --git a/dbm/src/hash_buf.c b/dbm/src/hash_buf.c index 764a22d3e..7bfe01a34 100644 --- a/dbm/src/hash_buf.c +++ b/dbm/src/hash_buf.c @@ -55,7 +55,7 @@ static char sccsid[] = "@(#)hash_buf.c 8.5 (Berkeley) 7/15/94"; * Internal * newbuf */ -#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2_VACPP) #include <sys/param.h> #endif diff --git a/dbm/src/mktemp.c b/dbm/src/mktemp.c index 51b669b18..ab606e30f 100644 --- a/dbm/src/mktemp.c +++ b/dbm/src/mktemp.c @@ -49,10 +49,16 @@ static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93"; #include <ctype.h> #include "mcom_db.h" -#if !defined(_WINDOWS) +#if !defined(_WINDOWS) && !defined(XP_OS2_VACPP) #include <unistd.h> #endif +#ifdef XP_OS2_VACPP +#define ENOTDIR EBADPOS +#include <process.h> +#include <dirent.h> +#endif + #ifdef _WINDOWS #include <process.h> #include "winfile.h" diff --git a/dbm/src/ndbm.c b/dbm/src/ndbm.c index 99da62c07..ca008de0c 100644 --- a/dbm/src/ndbm.c +++ b/dbm/src/ndbm.c @@ -44,7 +44,7 @@ static char sccsid[] = "@(#)ndbm.c 8.4 (Berkeley) 7/21/94"; * This package provides a dbm compatible interface to the new hashing * package described in db(3). */ -#if !defined(_WIN32) && !defined(_WINDOWS) +#if !defined(_WIN32) && !defined(_WINDOWS) && !defined(XP_OS2_VACPP) #include <sys/param.h> #endif diff --git a/dbm/src/snprintf.c b/dbm/src/snprintf.c index baf86cc3f..7a6b2005c 100644 --- a/dbm/src/snprintf.c +++ b/dbm/src/snprintf.c @@ -4,6 +4,7 @@ #include <sys/types.h> #include <stddef.h> #include <stdio.h> + #if defined(_WINDOWS) || defined(SOLARIS) || defined(AIXV3) || defined(AIX) || defined(OSF1) || defined(NEC) || !defined(HAVE_SYS_CDEFS_H) #include "cdefs.h" #elif !defined(HPUX) && !defined(UNIXWARE) && !defined(SNI) @@ -14,14 +15,15 @@ #include <ncompat.h> -#ifdef __STDC__ +/* The OS/2 VAC compiler doesn't appear to define __STDC__ and won't let us define it either */ +#if defined(__STDC__) || defined(XP_OS2_VACPP) #include <stdarg.h> #else #include <varargs.h> #endif int -#ifdef __STDC__ +#if defined(__STDC__) || defined(XP_OS2_VACPP) snprintf(char *str, size_t n, const char *fmt, ...) #else snprintf(str, n, fmt, va_alist) @@ -37,7 +39,7 @@ snprintf(str, n, fmt, va_alist) #else int rval; #endif -#ifdef __STDC__ +#if defined(__STDC__) || defined(XP_OS2_VACPP) va_start(ap, fmt); #else va_start(ap); |