diff options
author | cvs2hg <devnull@localhost> | 2013-02-21 22:12:46 +0100 |
---|---|---|
committer | cvs2hg <devnull@localhost> | 2013-02-21 22:12:46 +0100 |
commit | 0141ab32dbe8a84fa5cbfcb6ddd4b091705f2452 (patch) | |
tree | 5cadb90f51a367b4fd7990191ab12f530b7c56dc | |
parent | df2a1b51080dd445b8c913db5a4b59b819a77d14 (diff) | |
parent | 7c91a96a408e792913ed86e61bec1305acf7011f (diff) | |
download | nss-hg-0141ab32dbe8a84fa5cbfcb6ddd4b091705f2452.tar.gz |
artificial changeset: close fixup head 416a9100fcdb for tag ANGELON_MOZ_14_20030709_TAG
-rw-r--r-- | dbm/include/mcom_db.h | 8 | ||||
-rw-r--r-- | dbm/src/Makefile.in | 7 | ||||
-rw-r--r-- | dbm/src/hash.c | 7 | ||||
-rw-r--r-- | dbm/src/mktemp.c | 2 | ||||
-rw-r--r-- | dbm/src/ndbm.c | 4 | ||||
-rw-r--r-- | dbm/src/nsres.c | 6 | ||||
-rw-r--r-- | dbm/tests/Makefile.in | 3 |
7 files changed, 24 insertions, 13 deletions
diff --git a/dbm/include/mcom_db.h b/dbm/include/mcom_db.h index 43d21ad9c..252a9b268 100644 --- a/dbm/include/mcom_db.h +++ b/dbm/include/mcom_db.h @@ -222,14 +222,6 @@ #define MAXPATHLEN 1024 #endif -#ifdef XP_OS2_VACPP -#include <os2.h> -#define MAXPATHLEN CCHMAXPATH -#define EPERM EINVAL -#define ENOTDIR EBADPOS -#define S_ISDIR(s) ((s) & S_IFDIR) -#endif - #define EFTYPE EINVAL /* POSIX 1003.1 format errno. */ #ifndef STDERR_FILENO diff --git a/dbm/src/Makefile.in b/dbm/src/Makefile.in index 280c944d1..2898c5230 100644 --- a/dbm/src/Makefile.in +++ b/dbm/src/Makefile.in @@ -51,11 +51,11 @@ CSRCS = \ ifeq ($(OS_ARCH),WINNT) CSRCS += memmove.c snprintf.c else -ifeq (,$(filter -DHAVE_MEMMOVE=1,$(ACDEFINES))) +ifeq (,$(filter -DHAVE_MEMMOVE=1,$(DEFS))) CSRCS += memmove.c endif -ifeq (,$(filter -DHAVE_SNPRINTF=1,$(ACDEFINES))) +ifeq (,$(filter -DHAVE_SNPRINTF=1,$(DEFS))) CSRCS += snprintf.c endif endif # WINNT @@ -68,6 +68,9 @@ FORCE_USE_PIC = 1 include $(topsrcdir)/config/rules.mk DEFINES += -DMEMMOVE -D__DBINTERFACE_PRIVATE $(SECURITY_FLAG) +ifeq ($(OS_ARCH), Linux) +DEFINES += -D_BSD_SOURCE +endif ifeq ($(OS_ARCH),AIX) OS_LIBS += -lc_r diff --git a/dbm/src/hash.c b/dbm/src/hash.c index 98f7440fc..d984c5f30 100644 --- a/dbm/src/hash.c +++ b/dbm/src/hash.c @@ -69,6 +69,11 @@ static char sccsid[] = "@(#)hash.c 8.9 (Berkeley) 6/16/94"; #include <windows.h> #endif +#ifdef XP_OS2_VACPP +#include "types.h" +#define EPERM SOCEPERM +#endif + #include <assert.h> #include "mcom_db.h" @@ -185,7 +190,7 @@ __hash_open(const char *file, int flags, int mode, const HASHINFO *info, int dfl if (file) { -#if defined(_WIN32) || defined(_WINDOWS) || defined (macintosh) || defined(XP_OS2) +#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 diff --git a/dbm/src/mktemp.c b/dbm/src/mktemp.c index 78cbc9edb..574eb9fe5 100644 --- a/dbm/src/mktemp.c +++ b/dbm/src/mktemp.c @@ -54,7 +54,9 @@ static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93"; #endif #ifdef XP_OS2_VACPP +#define ENOTDIR EBADPOS #include <process.h> +#include <dirent.h> #endif #ifdef _WINDOWS diff --git a/dbm/src/ndbm.c b/dbm/src/ndbm.c index ca008de0c..03d5cf381 100644 --- a/dbm/src/ndbm.c +++ b/dbm/src/ndbm.c @@ -52,6 +52,10 @@ static char sccsid[] = "@(#)ndbm.c 8.4 (Berkeley) 7/21/94"; #include <linux/limits.h> #endif +#ifdef __OS2__ +#include "dirent.h" +#endif + #include <stdio.h> #include <string.h> diff --git a/dbm/src/nsres.c b/dbm/src/nsres.c index 4b4dae4a2..e383d58e5 100644 --- a/dbm/src/nsres.c +++ b/dbm/src/nsres.c @@ -79,7 +79,8 @@ NSRESHANDLE NSResCreateTable(const char *filename, NSRESTHREADINFO *threadinfo) flag = O_RDWR | O_CREAT; - hres = (RESHANDLE) calloc ( 1, sizeof(struct RESDATABASE) ); + hres = (RESHANDLE) malloc ( sizeof(struct RESDATABASE) ); + memset(hres, 0, sizeof(struct RESDATABASE)); if (threadinfo && threadinfo->lock && threadinfo->fn_lock && threadinfo->fn_unlock) @@ -110,7 +111,8 @@ NSRESHANDLE NSResOpenTable(const char *filename, NSRESTHREADINFO *threadinfo) flag = O_RDONLY; /* only open database for reading */ - hres = (RESHANDLE) calloc ( 1, sizeof(struct RESDATABASE) ); + hres = (RESHANDLE) malloc ( sizeof(struct RESDATABASE) ); + memset(hres, 0, sizeof(struct RESDATABASE)); if (threadinfo && threadinfo->lock && threadinfo->fn_lock && threadinfo->fn_unlock) diff --git a/dbm/tests/Makefile.in b/dbm/tests/Makefile.in index 25ecd2a33..96cbdf8b5 100644 --- a/dbm/tests/Makefile.in +++ b/dbm/tests/Makefile.in @@ -41,3 +41,6 @@ LIBS = $(EXTRA_DSO_LIBS) include $(topsrcdir)/config/rules.mk +ifeq ($(OS_ARCH), Linux) +DEFINES += -D_BSD_SOURCE +endif |