Bugzilla bug 112198: Port NSS to Mac OS X (Darwin). The patch is

contributed by Javier Pedemonte <pedemonte@alumni.utexas.net>.
Modified Files:
	coreconf/config.mk coreconf/nsinstall/nsinstall.c
	coreconf/nsinstall/pathsub.c nss/lib/freebl/unix_rand.c
	nss/lib/ssl/unix_err.c
This commit is contained in:
wtc%netscape.com 2002-02-10 05:24:49 +00:00
Родитель 1caaa87135
Коммит 6ae7c77fa5
5 изменённых файлов: 15 добавлений и 6 удалений

Просмотреть файл

@ -56,7 +56,7 @@ include $(CORE_DEPTH)/coreconf/command.mk
# each OS release. # # each OS release. #
####################################################################### #######################################################################
ifeq (,$(filter-out FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX,$(OS_TARGET))) ifeq (,$(filter-out FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin,$(OS_TARGET)))
include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk
else else
include $(CORE_DEPTH)/coreconf/$(OS_CONFIG).mk include $(CORE_DEPTH)/coreconf/$(OS_CONFIG).mk

Просмотреть файл

@ -55,7 +55,7 @@ typedef unsigned int mode_t;
#define HAVE_LCHOWN #define HAVE_LCHOWN
#if defined(AIX) || defined(BSDI) || defined(HPUX) || defined(LINUX) || defined(SUNOS4) || defined(SCO) || defined(UNIXWARE) || defined(VMS) || defined(NTO) #if defined(AIX) || defined(BSDI) || defined(HPUX) || defined(LINUX) || defined(SUNOS4) || defined(SCO) || defined(UNIXWARE) || defined(VMS) || defined(NTO) || defined(DARWIN)
#undef HAVE_LCHOWN #undef HAVE_LCHOWN
#endif #endif

Просмотреть файл

@ -35,7 +35,7 @@
** Pathname subroutines. ** Pathname subroutines.
*/ */
#include <assert.h> #include <assert.h>
#if defined(FREEBSD) || defined(BSDI) #if defined(FREEBSD) || defined(BSDI) || defined(DARWIN)
#include <sys/types.h> #include <sys/types.h>
#endif /* FREEBSD */ #endif /* FREEBSD */
#include <dirent.h> #include <dirent.h>

Просмотреть файл

@ -78,7 +78,7 @@ static size_t CopyLowBits(void *dst, size_t dstlen, void *src, size_t srclen)
} }
#if defined(SCO) || defined(UNIXWARE) || defined(BSDI) || defined(FREEBSD) \ #if defined(SCO) || defined(UNIXWARE) || defined(BSDI) || defined(FREEBSD) \
|| defined(NETBSD) || defined(NTO) || defined(NETBSD) || defined(NTO) || defined(DARWIN)
#include <sys/times.h> #include <sys/times.h>
#define getdtablesize() sysconf(_SC_OPEN_MAX) #define getdtablesize() sysconf(_SC_OPEN_MAX)
@ -718,6 +718,11 @@ safe_pclose(FILE *fp)
#if !defined(VMS) #if !defined(VMS)
#ifdef DARWIN
#include <crt_externs.h>
#endif
void RNG_SystemInfoForRNG(void) void RNG_SystemInfoForRNG(void)
{ {
FILE *fp; FILE *fp;
@ -725,7 +730,11 @@ void RNG_SystemInfoForRNG(void)
size_t bytes; size_t bytes;
const char * const *cp; const char * const *cp;
char *randfile; char *randfile;
#ifdef DARWIN
char **environ = *_NSGetEnviron();
#else
extern char **environ; extern char **environ;
#endif
static const char * const files[] = { static const char * const files[] = {
"/etc/passwd", "/etc/passwd",
"/etc/utmp", "/etc/utmp",

Просмотреть файл

@ -38,7 +38,7 @@
* may use your version of this file under either the MPL or the * may use your version of this file under either the MPL or the
* GPL. * GPL.
* *
* $Id: unix_err.c,v 1.4 2001-12-04 18:20:57 wtc%netscape.com Exp $ * $Id: unix_err.c,v 1.5 2002-02-10 05:24:49 wtc%netscape.com Exp $
*/ */
#if 0 #if 0
@ -48,7 +48,7 @@
#include "prerror.h" #include "prerror.h"
#endif #endif
#if defined (__bsdi__) || defined(NTO) #if defined (__bsdi__) || defined(NTO) || defined(DARWIN)
#undef _PR_POLL_AVAILABLE #undef _PR_POLL_AVAILABLE
#endif #endif