NO_NSPR_PRIVATE_HEADER_BRANCH landing. Removed the inclusions of

private NSPR headers (prosdep.h and primpl.h) from the Mozilla source.
The part of prosdep.h that is actually needed by Mozilla was extracted
and put in the new file mozilla/include/xp_path.h.
This commit is contained in:
wtc%netscape.com 1998-09-22 16:59:57 +00:00
Родитель 24ce948921
Коммит 96a6a02078
32 изменённых файлов: 116 добавлений и 93 удалений

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

@ -23,6 +23,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef XP_MAC
#include "macstdlibextras.h" /* for strncasecmp */
#endif
#include <fcntl.h>
#if !(XP_MAC)
#include <sys/types.h>

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

@ -43,6 +43,8 @@
#include "prlink.h"
#define MAX_MAC_FILENAME 31
/* The difference between calling the spell checker lib from a DLL or from
a static linked lib depends on whether we're generating CFM code
(and on whether the static lib was included in the application project) */

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

@ -45,6 +45,7 @@ extern "C" {
#include "resgui.h"
#ifdef NSPR20
#include "prthread.h"
PR_BEGIN_EXTERN_C
PR_EXTERN(PRThread*) PR_GetPrimaryThread(void);
PR_END_EXTERN_C

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

@ -1329,9 +1329,8 @@ int XP_FileDuplicateResourceFork( const char* oldFilePath, XP_FileType oldType,
// I put these stubs here. They can go away when we move to MSL.
//======================================
PR_EXTERN(char*) PR_GetEnv(const char *var);
#include "prenv.h" /* For PR_GetEnv */
extern "C" {
char* PR_GetEnv(const char *var);
char* getenv(const char *var);
}

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

@ -38,6 +38,7 @@
#ifdef _WIN32
#include <afxcmn.h>
#endif
#include <winsock.h>
/* More XP than anything */
#include "xp.h"

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

@ -28,6 +28,7 @@ DEPTH=..\..\..\..
OBJS = $(OBJS) .\$(OBJDIR)\xpstrdll.obj
RCFLAGS=\
/I$(DEPTH)\include \
/I$(DIST)\include \
/I$(DEPTH)\dist\public\security \
!if "$(MOZ_BITS)" == "32"
/DWIN32 \

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

@ -76,11 +76,7 @@
#include "icondata.h"
#include "icons.h"
#ifndef NSPR20
#include "prosdep.h" /* for IS_LITTLE_ENDIAN / IS_BIG_ENDIAN */
#else
#include "prtypes.h"
#endif
#include "prtypes.h" /* for IS_LITTLE_ENDIAN / IS_BIG_ENDIAN */
#include <xpgetstr.h> /* for XP_GetString() */

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

@ -25,11 +25,7 @@
#define JMC_INIT_IMGCB_ID
#define JMC_INIT_IMGCBIF_ID
#ifndef NSPR20
#include "prosdep.h"
#else
#include "prtypes.h"
#endif
static char* header_comment =
"/*\n"

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

@ -92,6 +92,7 @@ xp_md5.h
xp_mem.h
xp_mesg.h
xp_ncent.h
xp_path.h
xp_qsort.h
xp_rgb.h
xp_str.h

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

@ -31,6 +31,7 @@
#define _NET_PROTO_H_
#include "xp_core.h"
#include "prio.h"
#include "ntypes.h"
#include "shistele.h"
#include "xp_list.h"

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

@ -36,15 +36,8 @@
And TRUE, FALSE, ON, OFF, YES, NO
-----------------------------------------------------------------------------*/
#ifdef NSPR20
#include "prtypes.h" /* for intn, etc. */
#ifdef XP_MAC
#include "prosdep.h"
#else
#include "md/prosdep.h"
#endif
#include "prlog.h"
#endif /* NSPR20 */
#ifndef _XP_Core_
#define _XP_Core_
@ -155,14 +148,6 @@
/* simple common types */
#if defined(XP_WIN) || defined(XP_OS2)
#ifndef RESOURCE_STR
#include "prtypes.h"
#endif /* RESOURCE_STR */
#else /* XP_WIN */
#include "prtypes.h"
#endif /* XP_WIN */
#ifdef XP_MAC
#include <Types.h>
@ -180,7 +165,6 @@
typedef int Bool;
typedef int XP_Bool;
#elif defined(XP_OS2) && !defined(RC_INVOKED)
#include "prosdep.h"
typedef unsigned long Bool;
typedef unsigned long XP_Bool;
#else
@ -194,6 +178,10 @@
typedef char XP_Bool;
#endif
#if !defined(XP_WIN)
typedef int (*FARPROC)();
#endif
#if defined(XP_WIN)
#ifndef BOOL
#define BOOL Bool
@ -215,15 +203,7 @@
#define FALSE 0
#endif
/* disable the TRUE redefinition warning
* TRUE is defined by windows.h in the MSVC
* development environment, and creates a
* nasty warning for every file. The only
* way to turn it off is to disable all
* macro redefinition warnings or to not
* define TRUE here
*/
#if !defined(TRUE) && !defined(XP_WIN)
#ifndef TRUE
#define TRUE !FALSE
#endif

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

@ -20,6 +20,8 @@
#ifndef _XP_File_
#define _XP_File_
#include "xp_path.h"
#define XP_FILE_NATIVE_PATH char *
#define XP_FILE_URL_PATH char*
/*-----------------------------------------------------------------------------

51
include/xp_path.h Normal file
Просмотреть файл

@ -0,0 +1,51 @@
/* -*- 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.
*/
/*
* The contents of this file used to be part of prosdep.h,
* a private NSPR header file of the NSPR module. The macros
* defined in this file are the only things the Mozilla
* client needs from prosdep.h, so I extracted them and put
* them in this new file.
* -- Wan-Teh Chang <wtc@netscape.com>, 18 September 1998
*/
#ifndef _XP_PATH_H
#define _XP_PATH_H
#if defined(XP_UNIX) || defined(XP_MAC)
#define PR_DIRECTORY_SEPARATOR '/'
#define PR_DIRECTORY_SEPARATOR_STR "/"
#define PR_PATH_SEPARATOR ':'
#define PR_PATH_SEPARATOR_STR ":"
#elif defined(XP_PC) /* Win32, Win16, and OS/2 */
#define PR_DIRECTORY_SEPARATOR '\\'
#define PR_DIRECTORY_SEPARATOR_STR "\\"
#define PR_PATH_SEPARATOR ';'
#define PR_PATH_SEPARATOR_STR ";"
#else
#error "Unknown platform"
#endif
#ifdef XP_MAC
#define PATH_SEPARATOR_STR ":"
#define DIRECTORY_SEPARATOR_STR "/"
#define MAXPATHLEN 512
#endif
#endif /* _XP_PATH_H */

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

@ -44,7 +44,7 @@
#endif
#ifdef XP_MAC
# include "prosdep.h"
#include "macstdlibextras.h" /* for strdup() */
#endif
#include "jsj_hash.h" /* Hash tables */

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

@ -25,20 +25,6 @@
#include <string.h>
#include <time.h>
#include "prtypes.h"
/*
* Not sure if prosdep is required on any platform but, for now,
* we're including it on non-Unix platforms.
*/
#ifndef NSPR20
#include "prosdep.h"
#else
#ifdef XP_MAC
#include "prosdep.h"
#elif defined(XP_WIN)
#include "md/prosdep.h"
#endif
#endif
#include "prprf.h"
#include "prmjtime.h"

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

@ -26,6 +26,10 @@
#ifdef EDITOR
#include "editor.h"
#ifdef XP_UNIX
#include <unistd.h> /* for getpid() */
#endif
#ifdef DEBUG
const char* kCommandNames[kCommandIDMax+1] = {

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

@ -26,6 +26,9 @@
#include "xp_list.h"
#include "layers.h"
#include "cl_priv.h"
#ifdef XP_MAC
#include "macstdlibextras.h" /* for strdup */
#endif
static void
cl_hidden_changed(CL_Layer *layer);

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

@ -30,6 +30,10 @@
#include "nspr.h"
#include "CMochaHacks.h"
enum {
kPrivateNSPREventType = 13
};
// ---------------------------------------------------------------------------------
// ¥ [Static data members]
// ---------------------------------------------------------------------------------
@ -156,4 +160,4 @@ void
CApplicationEventAttachment::ProcessNextEvent()
{
GetApplication().ProcessNextEvent();
}
}

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

@ -18,7 +18,7 @@
/* if.h --- Top-level image library internal routines
*
* $Id: if.h,v 3.2 1998/07/27 16:09:30 hardts%netscape.com Exp $
* $Id: if.h,v 3.3 1998/09/22 16:59:42 wtc%netscape.com Exp $
*/
#ifndef _if_h
@ -103,11 +103,7 @@ extern PRLogModuleInfo *il_log_module;
#define FREE_IF_NOT_NULL(x) do {if (x) {PR_FREEIF(x); (x) = NULL;}} while (0)
#ifndef NSPR20
#include "prosdep.h" /* for IS_LITTLE_ENDIAN / IS_BIG_ENDIAN */
#else
#include "prtypes.h" /* for IS_LITTLE_ENDIAN / IS_BIG_ENDIAN */
#endif
/* The imagelib labels bits in a 32-bit word from 31 on the left to 0 on the right.
This macro performs the necessary conversion to make that definition work on

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

@ -31,7 +31,6 @@
* --------------------------------------------------------------------
*/
#include <fcntl.h>
#include <errno.h>
#if defined(XP_WIN)
#include <io.h>
@ -39,7 +38,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "reg.h"
@ -354,7 +352,9 @@ static REGERR vr_GetCheck(char *path, int32 *check)
return REGERR_NOFILE;
case EACCES: /* file in use */
#ifdef EMFILE /* Mac doesn't have EMFILE. */
case EMFILE: /* too many files open */
#endif
default:
return REGERR_FAIL;
}

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

@ -41,9 +41,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
#ifdef SUNOS4
#include <unistd.h> /* for SEEK_SET */
@ -56,6 +54,10 @@
#ifndef MAX_PATH
#define MAX_PATH 1024
#endif
#elif defined(WIN32)
#include <windef.h> /* for MAX_PATH */
#elif defined(XP_MAC)
#define MAX_PATH 512
#endif
@ -206,7 +208,9 @@ static REGERR nr_OpenFile(char *path, FILEHANDLE *fh)
else
return REGERR_FAIL;
#ifdef EMFILE /* Mac doesn't have EMFILE. */
case EMFILE: /* too many files open */
#endif
default:
return REGERR_FAIL;
}

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

@ -21,7 +21,6 @@
*/
#include <stdio.h>
#include <string.h>
#ifndef STANDALONE_REGISTRY
#include "prtypes.h"

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

@ -25,6 +25,10 @@
#define _VR_STUBS_H_
#include <errno.h>
#include <string.h>
#ifdef XP_MAC
#include "macstdlibextras.h" /* For strcasecmp and strncasecmp */
#endif
#ifdef XP_MAC
#include <stat.h>

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

@ -31,11 +31,7 @@
#include <stdio.h>
#ifndef NSPR20
#include "prosdep.h" /* for IS_LITTLE_ENDIAN / IS_BIG_ENDIAN */
#else
#include "prtypes.h"
#endif
#include "prtypes.h" /* for IS_LITTLE_ENDIAN / IS_BIG_ENDIAN */

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

@ -37,11 +37,6 @@
#define MAX_PATH _MAX_PATH
#endif
#ifdef XP_UNIX
#ifdef NSPR20
#include "md/prosdep.h"
#else
#include "prosdep.h"
#endif
#if defined(HPUX) || defined(SCO)
/*
** HPUX: PATH_MAX is defined in <limits.h> to be 1023, but they

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

@ -35,11 +35,6 @@
#define MAX_PATH _MAX_PATH
#endif
#ifdef XP_UNIX
#ifdef NSPR20
#include "md/prosdep.h"
#else
#include "prosdep.h"
#endif
#if defined(HPUX) || defined(SCO)
/*
** HPUX: PATH_MAX is defined in <limits.h> to be 1023, but they

6
network/cache/extcache.h поставляемый
Просмотреть файл

@ -50,11 +50,7 @@
#ifndef EXT_DB_ROUTINES
#ifndef NSPR20
#include "prosdep.h" /* for IS_LITTLE_ENDIAN / IS_BIG_ENDIAN */
#else
#include "prtypes.h"
#endif
#include "prtypes.h" /* for IS_LITTLE_ENDIAN / IS_BIG_ENDIAN */
#endif /* EXT_DB_ROUTINES */

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

@ -19,6 +19,7 @@
*/
#include "xp.h"
#include "prmem.h"
#include "plstr.h"
#include "netutils.h"
#include "mkselect.h"

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

@ -18,6 +18,7 @@
/* Please leave outside of ifdef for windows precompiled headers */
#include "xp.h"
#include "prmem.h"
#include "plstr.h"
#include "netutils.h"
#include "mkselect.h"
@ -34,6 +35,19 @@
#include "libmime.h"
/* for select(), fd_set, struct timeval */
#if defined(XP_UNIX)
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#if defined(AIX)
#include <sys/select.h>
#endif
#elif defined(XP_WIN)
#include <windows.h>
#elif defined(XP_MAC)
#include "macsocket.h"
#endif
/* for XP_GetString() */
#include <xpgetstr.h>

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

@ -87,6 +87,8 @@ MacBinary header creation and CRC calculation based on Erny Tontlinger's free 'T
#include "MoreFilesExtras.h"
#include <Errors.h>
enum
{
kMB_SendingHeader, /* Data from read is MB header */

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

@ -494,7 +494,7 @@ net_open_file (ActiveEntry * cur_entry)
/* if errno is equal to "Too many open files"
* return a special error
*/
#ifndef XP_MAC
#ifdef EMFILE /* Mac doesn't have EMFILE. */
if(errno == EMFILE)
return(MK_TOO_MANY_OPEN_FILES);
else

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

@ -462,13 +462,11 @@ typedef short PROSFD;
// Errors not found in the Mac StdCLib
#define EACCES 13 // Permission denied
#define ENOENT -43 // No such file or directory
#define EMFILE 24 // Too many open files
#define _OS_INVALID_FD_VALUE -1
#define STDERR_FILENO 2
#if !defined(MAC_NSPR_STANDALONE)
#define MAC_PATH_SEPARATOR ':'
#define PATH_SEPARATOR ':'
#define PATH_SEPARATOR_STR ":"
#define DIRECTORY_SEPARATOR '/'
@ -478,10 +476,6 @@ typedef short PROSFD;
#define UNIX_THIS_DIRECTORY_STR "./"
#define UNIX_PARENT_DIRECTORY_STR "../"
#define MAX_PATH 512
#define MAX_MAC_FILENAME 31
#define MAXPATHLEN MAX_PATH
// Alias a few names
#define getenv PR_GetEnv
@ -533,10 +527,6 @@ extern void dprintf(const char *format, ...);
extern PRUint8 CallCacheFlushers(size_t blockSize);
#endif
enum {
kPrivateNSPREventType = 13
};
#if defined(MAC_NSPR_STANDALONE)
extern void* reallocSmaller(void* block, size_t newSize);
#endif