зеркало из https://github.com/mozilla/gecko-dev.git
Landing MODULAR_NETLIB_BRANCH on windows.
This commit is contained in:
Родитель
b9d1162d8f
Коммит
4abbc8d703
|
@ -0,0 +1,80 @@
|
|||
# The contents of this file are subject to the Netscape Public License
|
||||
# Version 1.0 (the "NPL"); you may not use this file except in
|
||||
# compliance with the NPL. You may obtain a copy of the NPL at
|
||||
# http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
# for the specific language governing rights and limitations under the
|
||||
# NPL.
|
||||
#
|
||||
# The Initial Developer of this code under the NPL is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
# Reserved.
|
||||
|
||||
NODEPEND=1
|
||||
IGNORE_MANIFEST = 1
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Specify the depth of the current directory relative to the
|
||||
#// root of NS
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
DEPTH= ..\..\
|
||||
|
||||
MAKE_OBJ_TYPE=DLL
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define any Public Make Variables here: (ie. PDFFILE, MAPFILE, ...)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
LIBNAME=xplib
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define the files necessary to build the target (ie. OBJS)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
OBJS= \
|
||||
.\$(OBJDIR)\xp_stub.obj \
|
||||
.\$(OBJDIR)\xp_file.obj \
|
||||
.\$(OBJDIR)\xp_list.obj \
|
||||
.\$(OBJDIR)\allxpstr.obj \
|
||||
.\$(OBJDIR)\xp_error.obj \
|
||||
$(NULL)
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define any Public Targets here (ie. PROGRAM, LIBRARY, DLL, ...)
|
||||
#// (these must be defined before the common makefiles are included)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
|
||||
LIBRARY=.\$(OBJDIR)\$(LIBNAME).lib
|
||||
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Define any local options for the make tools
|
||||
#// (ie. LCFLAGS, LLFLAGS, LLIBS, LINCS)
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
LINCS=$(LINCS) -I. \
|
||||
-I$(PUBLIC)\security
|
||||
|
||||
|
||||
# clobber and clobber_all will remove the following garbage:
|
||||
GARBAGE= $(GARBAGE) _gen
|
||||
|
||||
#//------------------------------------------------------------------------
|
||||
#//
|
||||
#// Include the common makefile rules
|
||||
#//
|
||||
#//------------------------------------------------------------------------
|
||||
include <$(DEPTH)/config/rules.mak>
|
||||
|
||||
export:: $(LIBRARY)
|
||||
$(MAKE_INSTALL) $(LIBRARY) $(DIST)\lib
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
|
||||
#include "xp.h"
|
||||
#include "plstr.h"
|
||||
#include "prmon.h"
|
||||
|
||||
#ifdef NSPR20
|
||||
|
@ -906,7 +907,7 @@ xp_FileName (const char *name, XP_FileType type, char* buf, char* configBuf)
|
|||
if (dot) {
|
||||
|
||||
len = dot - name + 1;
|
||||
XP_STRNCPY_SAFE(buf, name, len);
|
||||
PL_strncpyz(buf, name, len);
|
||||
}/* if */
|
||||
|
||||
XP_STRCAT (buf, ".nab");
|
||||
|
@ -948,7 +949,7 @@ xp_FileName (const char *name, XP_FileType type, char* buf, char* configBuf)
|
|||
dot = XP_STRRCHR(name, '.');
|
||||
if (dot) {
|
||||
len = dot - name + 1;
|
||||
XP_STRNCPY_SAFE(buf, name, len);
|
||||
PL_strncpyz(buf, name, len);
|
||||
}/* if */
|
||||
|
||||
XP_STRCAT (buf, ".vcf");
|
||||
|
@ -984,7 +985,7 @@ xp_FileName (const char *name, XP_FileType type, char* buf, char* configBuf)
|
|||
dot = XP_STRRCHR(name, '.');
|
||||
if (dot) {
|
||||
len = dot - name + 1;
|
||||
XP_STRNCPY_SAFE(buf, name, len);
|
||||
PL_strncpyz(buf, name, len);
|
||||
}/* if */
|
||||
|
||||
XP_STRCAT (buf, ".ldif");
|
||||
|
@ -1077,7 +1078,7 @@ xp_FileName (const char *name, XP_FileType type, char* buf, char* configBuf)
|
|||
prefbuf, &len) == PREF_NOERROR)
|
||||
&& *prefbuf == '/')
|
||||
/* guard against assert: line 806, file xp_file.c */
|
||||
XP_STRNCPY_SAFE(buf, prefbuf, len);
|
||||
PL_strncpyz(buf, prefbuf, len);
|
||||
/* Copy back to the buffer that was passed in.
|
||||
* We couldn't have PREF_GetCharPref() just put it there
|
||||
* initially because the size of buf wasn't passed in
|
||||
|
@ -1116,6 +1117,7 @@ xp_FileName (const char *name, XP_FileType type, char* buf, char* configBuf)
|
|||
name = buf;
|
||||
break;
|
||||
|
||||
#ifndef NO_SECURITY
|
||||
case xpCryptoPolicy:
|
||||
{
|
||||
extern void fe_GetProgramDirectory(char *path, int len);
|
||||
|
@ -1138,7 +1140,7 @@ xp_FileName (const char *name, XP_FileType type, char* buf, char* configBuf)
|
|||
sprintf(buf, "%.900s/%s", conf_dir, policyFN);
|
||||
break;
|
||||
}
|
||||
|
||||
#endif
|
||||
case xpPKCS12File:
|
||||
/* Convert /a/b/c/foo to /a/b/c/foo.p12 (note leading dot) */
|
||||
{
|
||||
|
@ -1153,7 +1155,7 @@ xp_FileName (const char *name, XP_FileType type, char* buf, char* configBuf)
|
|||
|
||||
/* include NULL in length */
|
||||
len = XP_STRLEN(name) + 1;
|
||||
XP_STRNCPY_SAFE(buf, name, len);
|
||||
PL_strncpyz(buf, name, len);
|
||||
|
||||
/* we want to concatenate ".p12" if it is not the
|
||||
* last 4 characters of the name already.
|
||||
|
@ -1165,7 +1167,7 @@ xp_FileName (const char *name, XP_FileType type, char* buf, char* configBuf)
|
|||
* only side effect -- this allows for the filename
|
||||
* ".p12" which is fine.
|
||||
*/
|
||||
if((len >= 5) && XP_STRCASECMP(&(name[len-4-1]), ".p12")) {
|
||||
if((len >= 5) && PL_strcasecmp(&(name[len-4-1]), ".p12")) {
|
||||
XP_STRCAT(buf, ".p12");
|
||||
} else if(len < 5) {
|
||||
/* can't be ".p12", so we append ".p12" */
|
||||
|
|
|
@ -254,6 +254,7 @@ strncasecomp (const char* one, const char * two, int n)
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef MODULAR_NETLIB /* moved to nsNetStubs.cpp */
|
||||
/* Allocate a new copy of a block of binary data, and returns it
|
||||
*/
|
||||
PUBLIC char *
|
||||
|
@ -448,6 +449,7 @@ char *XP_Cat(char *a0, ...)
|
|||
va_end(ap);
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
/************************************************************************
|
||||
* These are "safe" versions of the runtime library routines. The RTL
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "prlog.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
char *
|
||||
NOT_NULL (const char *x)
|
||||
{
|
||||
PR_ASSERT(x);
|
||||
return (char *)x;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void XP_AssertAtLine( char *pFileName, int iLine )
|
||||
{
|
||||
PR_Assert("XP Assert", pFileName, iLine);
|
||||
}
|
||||
|
||||
/* XP_GetString
|
||||
*
|
||||
* This one takes XP string ID (which is used mainly by libnet, libsec)
|
||||
* and loads String from resource file (netscape.rc3).
|
||||
*/
|
||||
char *XP_GetString(int id)
|
||||
{
|
||||
return "Not implemented...";
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче