diff --git a/mozilla/content/html/style/src/nsCSSStyleRule.cpp b/mozilla/content/html/style/src/nsCSSStyleRule.cpp
index d9bbf5d2d5d..75e4a94ffae 100644
--- a/mozilla/content/html/style/src/nsCSSStyleRule.cpp
+++ b/mozilla/content/html/style/src/nsCSSStyleRule.cpp
@@ -68,7 +68,6 @@
#include "nsINameSpaceManager.h"
#include "nsINameSpace.h"
#include "nsILookAndFeel.h"
-#include "xp_core.h"
#include "nsRuleNode.h"
#include "nsIStyleSet.h"
diff --git a/mozilla/dbm/include/mcom_db.h b/mozilla/dbm/include/mcom_db.h
index 395f9d2ca6b..252a9b26821 100644
--- a/mozilla/dbm/include/mcom_db.h
+++ b/mozilla/dbm/include/mcom_db.h
@@ -240,9 +240,9 @@
#include "xp_mcom.h"
#define O_ACCMODE 3 /* Mask for file access modes */
#define EFTYPE 2000
-XP_BEGIN_PROTOS
+PR_BEGIN_EXTERN_C
int mkstemp(const char *path);
-XP_END_PROTOS
+PR_END_EXTERN_C
#endif /* MACINTOSH */
#if !defined(_WINDOWS) && !defined(macintosh) && !defined(XP_OS2)
diff --git a/mozilla/embedding/browser/activex/src/control/StdAfx.h b/mozilla/embedding/browser/activex/src/control/StdAfx.h
index b7946ff5450..36086c270a2 100644
--- a/mozilla/embedding/browser/activex/src/control/StdAfx.h
+++ b/mozilla/embedding/browser/activex/src/control/StdAfx.h
@@ -58,7 +58,6 @@
// Mozilla headers
-#include "xp_core.h"
#include "jscompat.h"
#include "prthread.h"
diff --git a/mozilla/extensions/cookie/nsCookies.cpp b/mozilla/extensions/cookie/nsCookies.cpp
index 1d857ffaf68..e2ab45d6c0a 100644
--- a/mozilla/extensions/cookie/nsCookies.cpp
+++ b/mozilla/extensions/cookie/nsCookies.cpp
@@ -44,7 +44,6 @@
#include "nsIFileSpec.h"
#include "nsVoidArray.h"
#include "prprf.h"
-#include "xp_core.h"
#include "prmem.h"
#include "nsXPIDLString.h"
#include "nsReadableUtils.h"
@@ -57,6 +56,8 @@
#include "nsIHttpChannel.h"
#include "prnetdb.h"
+#include
+
#define MAX_NUMBER_OF_COOKIES 300
#define MAX_COOKIES_PER_SERVER 20
#define MAX_BYTES_PER_COOKIE 4096 /* must be at least 1 */
diff --git a/mozilla/extensions/cookie/nsImages.cpp b/mozilla/extensions/cookie/nsImages.cpp
index 99763b0fdd3..2b8312bfbc2 100644
--- a/mozilla/extensions/cookie/nsImages.cpp
+++ b/mozilla/extensions/cookie/nsImages.cpp
@@ -40,7 +40,6 @@
#include "nsUtils.h"
#include "nsVoidArray.h"
-#include "xp_core.h"
#include "prmem.h"
#include "nsIPref.h"
#include "nsTextFormatter.h"
diff --git a/mozilla/extensions/cookie/nsPermissions.cpp b/mozilla/extensions/cookie/nsPermissions.cpp
index 5d8be135403..66e3c7a2529 100644
--- a/mozilla/extensions/cookie/nsPermissions.cpp
+++ b/mozilla/extensions/cookie/nsPermissions.cpp
@@ -48,7 +48,6 @@
#include "nsIPrompt.h"
#include "nsIWindowWatcher.h"
#include "nsVoidArray.h"
-#include "xp_core.h"
#include "prmem.h"
#include "nsAppDirectoryServiceDefs.h"
#include "nsIIOService.h"
diff --git a/mozilla/extensions/cookie/nsUtils.cpp b/mozilla/extensions/cookie/nsUtils.cpp
index 8cb349d1968..68a3b5c5e90 100644
--- a/mozilla/extensions/cookie/nsUtils.cpp
+++ b/mozilla/extensions/cookie/nsUtils.cpp
@@ -37,7 +37,6 @@
* ***** END LICENSE BLOCK ***** */
#include "nsUtils.h"
-#include "xp_core.h"
#include "nsXPIDLString.h"
#include "nsIStringBundle.h"
#include "nsIPref.h"
diff --git a/mozilla/extensions/layout-debug/src/nsDebugObject.cpp b/mozilla/extensions/layout-debug/src/nsDebugObject.cpp
index f68c1babc19..1ab24351f78 100644
--- a/mozilla/extensions/layout-debug/src/nsDebugObject.cpp
+++ b/mozilla/extensions/layout-debug/src/nsDebugObject.cpp
@@ -44,7 +44,6 @@
#include "nsIFileSpec.h"
#include "nsIWindowWatcher.h"
#include "nsVoidArray.h"
-#include "xp_core.h"
#include "prmem.h"
#include "nsDebugObject.h"
#include "nsIDocShellTreeItem.h"
diff --git a/mozilla/extensions/layout-debug/src/nsRegressionTester.cpp b/mozilla/extensions/layout-debug/src/nsRegressionTester.cpp
index f68c1babc19..1ab24351f78 100644
--- a/mozilla/extensions/layout-debug/src/nsRegressionTester.cpp
+++ b/mozilla/extensions/layout-debug/src/nsRegressionTester.cpp
@@ -44,7 +44,6 @@
#include "nsIFileSpec.h"
#include "nsIWindowWatcher.h"
#include "nsVoidArray.h"
-#include "xp_core.h"
#include "prmem.h"
#include "nsDebugObject.h"
#include "nsIDocShellTreeItem.h"
diff --git a/mozilla/extensions/python/xpcom/src/PyXPCOM_std.h b/mozilla/extensions/python/xpcom/src/PyXPCOM_std.h
index 5f4bbf23708..27afdea01fa 100644
--- a/mozilla/extensions/python/xpcom/src/PyXPCOM_std.h
+++ b/mozilla/extensions/python/xpcom/src/PyXPCOM_std.h
@@ -31,9 +31,6 @@
//
// (c) 2000, ActiveState corp.
-// Main Mozilla cross-platform declarations.
-#include "xp_core.h"
-
#include "nsIAllocator.h"
#include "nsIWeakReference.h"
#include "nsIInterfaceInfoManager.h"
diff --git a/mozilla/extensions/python/xpcom/src/loader/pyloader.cpp b/mozilla/extensions/python/xpcom/src/loader/pyloader.cpp
index c045ebdb68f..63092e60cb6 100644
--- a/mozilla/extensions/python/xpcom/src/loader/pyloader.cpp
+++ b/mozilla/extensions/python/xpcom/src/loader/pyloader.cpp
@@ -25,7 +25,6 @@
// the xpcom "components" directory. Simply locates and loads the standard
// _xpcom support module and transfers control to that.
-#include "xp_core.h"
#include "nsIComponentLoader.h"
#include "nsIRegistry.h"
#include "nsISupports.h"
diff --git a/mozilla/extensions/wallet/src/singsign.h b/mozilla/extensions/wallet/src/singsign.h
index fe6a7110980..a6e76fdf18e 100644
--- a/mozilla/extensions/wallet/src/singsign.h
+++ b/mozilla/extensions/wallet/src/singsign.h
@@ -45,7 +45,6 @@
#ifndef _SINGSIGN_H
#define _SINGSIGN_H
-#include "xp_core.h"
#include "nsString.h"
#include "nsVoidArray.h"
#include "nsIPref.h"
@@ -57,7 +56,7 @@
#define SINGSIGN_SAVE_PASSWORD_PERMANENTLY 2
class nsIPrompt;
-XP_BEGIN_PROTOS
+PR_BEGIN_EXTERN_C
extern PRInt32
SINGSIGN_HostCount();
@@ -159,6 +158,6 @@ extern void
SINGSIGN_RememberSignonData
(nsIPrompt* dialog, const char* URLName, nsVoidArray * signonData, nsIDOMWindowInternal* window);
-XP_END_PROTOS
+PR_END_EXTERN_C
#endif /* !_SINGSIGN_H */
diff --git a/mozilla/extensions/wallet/src/wallet.cpp b/mozilla/extensions/wallet/src/wallet.cpp
index 56e5c7b1be0..4dec3a77e18 100644
--- a/mozilla/extensions/wallet/src/wallet.cpp
+++ b/mozilla/extensions/wallet/src/wallet.cpp
@@ -75,6 +75,8 @@
#include "nsIWalletService.h"
+#include
+
#ifdef DEBUG_morse
#define morseAssert NS_ASSERTION
#else
diff --git a/mozilla/extensions/wallet/src/wallet.h b/mozilla/extensions/wallet/src/wallet.h
index f69ca28a687..6c4f24ecc75 100644
--- a/mozilla/extensions/wallet/src/wallet.h
+++ b/mozilla/extensions/wallet/src/wallet.h
@@ -45,7 +45,7 @@
#ifndef _WALLET_H
#define _WALLET_H
-#include "xp_core.h"
+#include "prtypes.h"
#include "nsIPresShell.h"
#include "nsString.h"
#include "nsFileSpec.h"
@@ -54,7 +54,7 @@
class nsIDOMWindowInternal;
class nsIDOMNode;
-XP_BEGIN_PROTOS
+PR_BEGIN_EXTERN_C
#define HEADER_VERSION "#2c"
@@ -153,6 +153,6 @@ Wallet_SignonViewerReturn(const nsString& results);
extern void
Wallet_ReleaseAllLists();
-XP_END_PROTOS
+PR_END_EXTERN_C
#endif /* !_WALLET_H */
diff --git a/mozilla/gfx/src/beos/nsFontMetricsBeOS.cpp b/mozilla/gfx/src/beos/nsFontMetricsBeOS.cpp
index 5668cdf8ea3..9c7eb11b4e5 100644
--- a/mozilla/gfx/src/beos/nsFontMetricsBeOS.cpp
+++ b/mozilla/gfx/src/beos/nsFontMetricsBeOS.cpp
@@ -40,7 +40,6 @@
*
* ***** END LICENSE BLOCK ***** */
-#include "xp_core.h"
#include "nsQuickSort.h"
#include "nsFontMetricsBeOS.h"
#include "nsIServiceManager.h"
diff --git a/mozilla/gfx/src/freetype/nsFT2FontCatalog.cpp b/mozilla/gfx/src/freetype/nsFT2FontCatalog.cpp
index 3c63689c850..4f8ac2ef8d5 100644
--- a/mozilla/gfx/src/freetype/nsFT2FontCatalog.cpp
+++ b/mozilla/gfx/src/freetype/nsFT2FontCatalog.cpp
@@ -38,7 +38,6 @@
*
* ***** END LICENSE BLOCK ***** */
-#include "xp_core.h"
#include "nspr.h"
#include "nsHashtable.h"
#include
diff --git a/mozilla/gfx/src/freetype/nsFreeType.cpp b/mozilla/gfx/src/freetype/nsFreeType.cpp
index e68116a2ce5..67797fa58c3 100644
--- a/mozilla/gfx/src/freetype/nsFreeType.cpp
+++ b/mozilla/gfx/src/freetype/nsFreeType.cpp
@@ -38,8 +38,6 @@
*
* ***** END LICENSE BLOCK ***** */
-#include "xp_core.h"
-#include "xp_str.h"
#include "nspr.h"
#include "nsCOMPtr.h"
#include "nsHashtable.h"
diff --git a/mozilla/gfx/src/photon/nsFontMetricsPh.cpp b/mozilla/gfx/src/photon/nsFontMetricsPh.cpp
index 1bd388ae13a..3874855b72f 100644
--- a/mozilla/gfx/src/photon/nsFontMetricsPh.cpp
+++ b/mozilla/gfx/src/photon/nsFontMetricsPh.cpp
@@ -36,7 +36,6 @@
*
* ***** END LICENSE BLOCK ***** */
-#include "xp_core.h"
#include "nsQuickSort.h"
#include "nsIServiceManager.h"
#include "nsFontMetricsPh.h"
diff --git a/mozilla/gfx/src/ps/nsPostScriptObj.cpp b/mozilla/gfx/src/ps/nsPostScriptObj.cpp
index 5d029b7116c..a37b1140af2 100644
--- a/mozilla/gfx/src/ps/nsPostScriptObj.cpp
+++ b/mozilla/gfx/src/ps/nsPostScriptObj.cpp
@@ -35,7 +35,6 @@
#include "nscore.h"
#include "nsPostScriptObj.h"
-#include "xp_mem.h"
#include "isotab.c"
#include "nsFont.h"
#include "nsIImage.h"
@@ -59,6 +58,8 @@
#include "prenv.h"
+#include
+
#ifdef VMS
#include
#include "prprf.h"
@@ -503,7 +504,7 @@ nsPostScriptObj::Init( nsIDeviceContextSpecPS *aSpec )
void
nsPostScriptObj::finalize_translation()
{
- XP_DELETE(mPrintContext->prSetup);
+ free(mPrintContext->prSetup);
mPrintContext->prSetup = nsnull;
}
@@ -514,7 +515,7 @@ nsPostScriptObj::finalize_translation()
void
nsPostScriptObj::initialize_translation(PrintSetup* pi)
{
- PrintSetup *dup = XP_NEW(PrintSetup);
+ PrintSetup *dup = (PrintSetup *)malloc(sizeof(PrintSetup));
*dup = *pi;
mPrintContext->prSetup = dup;
dup->width = POINT_TO_PAGE(dup->width);
diff --git a/mozilla/gfx/src/ps/nsPostScriptObj.h b/mozilla/gfx/src/ps/nsPostScriptObj.h
index a2ce41c0f41..b4c7eb474ad 100644
--- a/mozilla/gfx/src/ps/nsPostScriptObj.h
+++ b/mozilla/gfx/src/ps/nsPostScriptObj.h
@@ -41,8 +41,7 @@
#ifndef _PSOBJ_H_
#define _PSOBJ_H_
-
-#include "xp_core.h"
+#include "prtypes.h" /* for int32 & friends */
#ifdef __cplusplus
#include "nsColor.h"
#include "nsCoord.h"
@@ -59,12 +58,16 @@
class nsIImage;
#endif
+#include
+
#define N_FONTS 8
#define INCH_TO_PAGE(f) ((int) (.5 + (f)*720))
#define PAGE_TO_POINT_I(f) ((int) ((f) / 10.0))
#define PAGE_TO_POINT_F(f) ((f) / 10.0)
#define POINT_TO_PAGE(p) ((p)*10)
+typedef int XP_Bool;
+
typedef struct {
const char *name;
float left,
@@ -85,7 +88,7 @@ PSPaperSizeRec postscript_module_paper_sizes[] =
{ "Letter", 0.25f, 0.25f, 0.25f, 0.25f, 8.00f, 10.50f }, /* 8.50in X 11.0in */
{ "Legal", 0.25f, 0.25f, 0.25f, 0.25f, 8.00f, 13.50f }, /* 8.50in X 14.0in */
{ "Executive", 0.25f, 0.25f, 0.25f, 0.25f, 7.00f, 9.50f }, /* 7.50in X 10.0in */
- { NULL, 0.25f, 0.25f, 0.25f, 0.25f, 0.00f, 0.0f }
+ { 0, 0.25f, 0.25f, 0.25f, 0.25f, 0.00f, 0.0f }
};
#define PSPaperSizeRec_FullPaperWidth(rec) ((rec)->left + (rec)->right + (rec)->width)
diff --git a/mozilla/gfx/src/qt/nsFontMetricsQT.cpp b/mozilla/gfx/src/qt/nsFontMetricsQT.cpp
index 457df78f966..5d6020c4c55 100644
--- a/mozilla/gfx/src/qt/nsFontMetricsQT.cpp
+++ b/mozilla/gfx/src/qt/nsFontMetricsQT.cpp
@@ -38,7 +38,6 @@
*
* ***** END LICENSE BLOCK ***** */
-#include "xp_core.h"
#include "nsQuickSort.h"
#include "nsFontMetricsQT.h"
#include "nsFont.h"
diff --git a/mozilla/gfx/src/x11shared/nsFT2FontCatalog.cpp b/mozilla/gfx/src/x11shared/nsFT2FontCatalog.cpp
index 3c63689c850..4f8ac2ef8d5 100644
--- a/mozilla/gfx/src/x11shared/nsFT2FontCatalog.cpp
+++ b/mozilla/gfx/src/x11shared/nsFT2FontCatalog.cpp
@@ -38,7 +38,6 @@
*
* ***** END LICENSE BLOCK ***** */
-#include "xp_core.h"
#include "nspr.h"
#include "nsHashtable.h"
#include
diff --git a/mozilla/gfx/src/x11shared/nsFreeType.cpp b/mozilla/gfx/src/x11shared/nsFreeType.cpp
index e68116a2ce5..67797fa58c3 100644
--- a/mozilla/gfx/src/x11shared/nsFreeType.cpp
+++ b/mozilla/gfx/src/x11shared/nsFreeType.cpp
@@ -38,8 +38,6 @@
*
* ***** END LICENSE BLOCK ***** */
-#include "xp_core.h"
-#include "xp_str.h"
#include "nspr.h"
#include "nsCOMPtr.h"
#include "nsHashtable.h"
diff --git a/mozilla/gfx/src/xprint/nsGfxFactoryXP.cpp b/mozilla/gfx/src/xprint/nsGfxFactoryXP.cpp
index 6081a72aafa..0707b2ecf6f 100644
--- a/mozilla/gfx/src/xprint/nsGfxFactoryXP.cpp
+++ b/mozilla/gfx/src/xprint/nsGfxFactoryXP.cpp
@@ -37,7 +37,6 @@
* ***** END LICENSE BLOCK ***** */
#include
-#include "xp_core.h" //this is a hack to get it to build. MMP
#include "nscore.h"
#include "nsIFactory.h"
#include "nsIGenericFactory.h" // need this for ps code
diff --git a/mozilla/gfx/src/xprint/nsXPrintContext.h b/mozilla/gfx/src/xprint/nsXPrintContext.h
index 325092967bb..b46be4472fa 100644
--- a/mozilla/gfx/src/xprint/nsXPrintContext.h
+++ b/mozilla/gfx/src/xprint/nsXPrintContext.h
@@ -43,7 +43,6 @@
#include
#include
-#include "xp_core.h"
#include "nsColor.h"
#include "nsCoord.h"
#include "nsIImage.h"
diff --git a/mozilla/include/MANIFEST b/mozilla/include/MANIFEST
index 513472af61a..2b5cbc9e312 100644
--- a/mozilla/include/MANIFEST
+++ b/mozilla/include/MANIFEST
@@ -5,10 +5,8 @@
minicom.h
platform.h
xpassert.h
-xp_core.h
xp_debug.h
xp_mcom.h
-xp_mem.h
xp_path.h
xp_str.h
xp_trace.h
diff --git a/mozilla/include/Makefile.in b/mozilla/include/Makefile.in
index 81fb98efcdd..d42952202a7 100644
--- a/mozilla/include/Makefile.in
+++ b/mozilla/include/Makefile.in
@@ -26,8 +26,6 @@ VPATH = @srcdir@
EXPORTS = \
platform.h \
- xp_core.h \
- xp_mem.h \
xp_path.h \
xp_str.h \
$(NULL)
diff --git a/mozilla/include/makefile.win b/mozilla/include/makefile.win
index 7e69f4cbabb..0efe2ec7d9e 100644
--- a/mozilla/include/makefile.win
+++ b/mozilla/include/makefile.win
@@ -51,8 +51,6 @@ DEPTH = ..
EXPORTS = \
minicom.h \
platform.h \
- xp_core.h \
- xp_mem.h \
xp_path.h \
xp_str.h \
$(NULL)
diff --git a/mozilla/include/xp_core.h b/mozilla/include/xp_core.h
deleted file mode 100644
index 4413ca93e7d..00000000000
--- a/mozilla/include/xp_core.h
+++ /dev/null
@@ -1,313 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Netscape Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the NPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the NPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/*-----------------------------------------------------------------------------
- xp_core.h
- Cross-Platform Core Types
------------------------------------------------------------------------------*/
-
-/*-----------------------------------------------------------------------------
- Platform-specific defines
-
- XP_WIN XP_IS_WIN XP_WIN_ARG(X)
- XP_MAC XP_IS_MAC XP_MAC_ARG(X)
- XP_UNIX XP_IS_UNIX XP_UNIX_ARG(X)
- XP_CPLUSPLUS XP_IS_CPLUSPLUS
- XP_OS2 XP_IS_OS2 XP_OS2_ARG(X) IBM-LTB added these
- defined iff always defined defined to nothing
- on that platform as 0 or 1 or X
-
- Also Bool, Int32, Int16, Int, Uint32, Uint16, Uint, and nil
- And TRUE, FALSE, ON, OFF, YES, NO
------------------------------------------------------------------------------*/
-
-#include "prtypes.h" /* for intn, etc. */
-#include "prlog.h"
-
-#ifndef _XP_Core_
-#define _XP_Core_
-
-/* which system are we on, get the base macro defined */
-
-#if defined(macintosh) || defined(__MWERKS__) || defined(applec)
-#ifndef macintosh
-#define macintosh 1
-#endif
-#endif
-
-#if defined(__unix) || defined(unix) || defined(UNIX) || defined(XP_UNIX)
-#ifndef unix
-#define unix 1
-#endif
-#endif
-
-#if !defined(macintosh) && !defined(_WINDOWS) && !defined(unix)
- /* #error xp library can't determine system type */
-#endif
-
-/* flush out all the system macros */
-
-#ifdef macintosh
-# ifndef XP_MAC
-# define XP_MAC 1
-# endif
-# define XP_IS_MAC 1
-# define XP_MAC_ARG(x) x
-#else
-# define XP_IS_MAC 0
-# define XP_MAC_ARG(x)
-#endif
-
-#ifdef _WINDOWS
-# ifndef XP_WIN
-# define XP_WIN
-# endif
-# define XP_IS_WIN 1
-# define XP_WIN_ARG(x) x
-#if defined(_WIN32) || defined(WIN32)
-# ifndef XP_WIN32
-# define XP_WIN32
-# endif
-#else
-# ifndef XP_WIN16
-# define XP_WIN16
-# endif
-#endif
-#else
-# define XP_IS_WIN 0
-# define XP_WIN_ARG(x)
-#endif
-
-#ifdef unix
-# ifndef XP_UNIX
-# define XP_UNIX
-# endif
-# define XP_IS_UNIX 1
-# define XP_UNIX_ARG(x) x
-#else
-# define XP_IS_UNIX 0
-# define XP_UNIX_ARG(x)
-#endif
-
-/* IBM-LTB Setup system macros for OS/2 */
-#if defined (__OS2__)
-# ifndef XP_OS2
-# define XP_OS2
-# endif
-# define XP_IS_OS2 1
-# define XP_OS2_ARG(x) x
-#else
-# define XP_IS_OS2 0
-# define XP_OS2_ARG(x)
-#endif
-
-/* what language do we have? */
-
-#if defined(__cplusplus)
-# define XP_CPLUSPLUS
-# define XP_IS_CPLUSPLUS 1
-#else
-# define XP_IS_CPLUSPLUS 0
-#endif
-
-#if defined(DEBUG) || !defined(XP_CPLUSPLUS)
-#define XP_REQUIRES_FUNCTIONS
-#endif
-
-/*
- language macros
-
- If C++ code includes a prototype for a function *compiled* in C, it needs to be
- wrapped in extern "C" for the linking to work properly. On the Mac, all code is
- being compiled in C++ so this isn't necessary, and Unix compiles it all in C. So
- only Windows actually will make use of the defined macros.
-*/
-
-#if defined(XP_CPLUSPLUS)
-# define XP_BEGIN_PROTOS extern "C" {
-# define XP_END_PROTOS }
-#else
-# define XP_BEGIN_PROTOS
-# define XP_END_PROTOS
-#endif
-
-/* simple common types */
-
-#ifdef XP_MAC
-#include
-
- #if __option(bool)
- typedef bool BOOL;
- typedef bool Bool;
- typedef bool XP_Bool;
- #else
- typedef char BOOL;
- typedef char Bool;
- typedef char XP_Bool;
- #endif
-
-#elif defined(XP_WIN)
- typedef int Bool;
- typedef int XP_Bool;
-#elif defined(XP_OS2) && !defined(RC_INVOKED)
- typedef unsigned long Bool;
- typedef unsigned long XP_Bool;
-#else
- /* XP_UNIX: X11/Xlib.h "define"s Bool to be int. This is really lame
- * (that's what typedef is for losers). So.. in lieu of a #undef Bool
- * here (Xlib still needs ints for Bool-typed parameters) people have
- * been #undef-ing Bool before including this file.
- * Can we just #undef Bool here? (help from djw, converse)
- */
-#ifdef Bool
-#undef Bool
-#endif
- typedef char Bool;
- typedef char XP_Bool;
-#endif
-
-/* this should just go away, as nspr has it. */
-#if !defined(XP_WIN) && !defined(XP_UNIX) && !defined(XP_OS2) && !defined(XP_MAC)
-typedef int (*FARPROC)();
-#endif
-
-#if defined(XP_WIN)
-#ifndef BOOL
-#define BOOL Bool
-#endif
-#define MIN(a, b) min((a), (b))
-#endif
-
-#if defined(XP_OS2_VACPP)
-#ifndef MIN
-#define MIN(a, b) min((a), (b))
-#endif
-#endif
-
-#if (defined(XP_UNIX) || defined(XP_MAC)) && !defined(MIN)
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#define MAX(a,b) (((a)>(b))?(a):(b))
-#endif
-
-#ifndef nil
-#define nil 0
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-#ifndef TRACEMSG
-#ifdef DEBUG
-#define TRACEMSG(msg) do { if(MKLib_trace_flag) XP_Trace msg; } while (0)
-#else
-#define TRACEMSG(msg)
-#endif /* DEBUG */
-#endif /* TRACEMSG */
-
-/* removed #ifdef for hpux defined in /usr/include/model.h */
-#ifndef XP_MAC
-#ifndef _INT16
-#define _INT16
-#endif
-#ifndef _INT32
-#define _INT32
-#endif
-#ifndef _UINT16
-#define _UINT16
-#endif
-#ifndef _UINT32
-#define _UINT32
-#endif
-#endif
-
-/* function classifications */
-
-#define PUBLIC
-#define MODULE_PRIVATE
-
-#if defined(XP_UNIX) && defined(PRIVATE)
-#undef PRIVATE
-#endif
-#define PRIVATE static
-
-/* common typedefs */
-typedef struct _XP_List XP_List;
-
-/* standard system headers */
-
-#if !defined(RC_INVOKED)
-#include
-#include
-#ifdef __sgi
-# include
-# include
-#endif
-#ifdef XP_UNIX
-#include
-#endif
-#include
-#include
-#if defined(XP_WIN) && defined(XP_CPLUSPLUS) && defined(_MSC_VER) && _MSC_VER >= 1020
-/* math.h under MSVC 4.2 needs C++ linkage when C++. */
-extern "C++" {
-#include
-}
-#elif (defined(__hpux) || defined(SCO)) && defined(__cplusplus)
-extern "C++" {
-#include
-}
-#else
-#include
-#endif
-#ifdef XP_OS2
-/*DSR021097 - on OS/2 we have conflicts over jmp_buf & HW_THREADS */
-#ifdef SW_THREADS
-#include
-#endif
-#else /*!XP_OS2*/
-#include
-#endif
-#include
-#include
-#include
-#include
-#include
-#endif
-
-#endif /* _XP_Core_ */
diff --git a/mozilla/include/xp_debug.h b/mozilla/include/xp_debug.h
index c83cb75f141..acae94a1970 100644
--- a/mozilla/include/xp_debug.h
+++ b/mozilla/include/xp_debug.h
@@ -48,7 +48,6 @@
#ifndef _XPDebug_
#define _XPDebug_
-#include "xp_core.h"
#include "xpassert.h"
#include "xp_trace.h"
diff --git a/mozilla/include/xp_mcom.h b/mozilla/include/xp_mcom.h
index 9f025279499..0ba2f220b47 100644
--- a/mozilla/include/xp_mcom.h
+++ b/mozilla/include/xp_mcom.h
@@ -46,142 +46,13 @@
#ifndef _MCOM_H_
#define _MCOM_H_
-#include "platform.h"
-#include "xp_core.h"
-#include "xp_mem.h"
-#include "xp_debug.h"
-#include "xp_str.h"
-
-
-/* platform-specific types */
-
-XP_BEGIN_PROTOS
-
-/* XXX where should this kind of junk go? */
-unsigned char *XP_WordWrap(int charset, unsigned char *string, int maxColumn,
- int checkQuoting);
-
-XP_END_PROTOS
-
-/* --------------------------------------------------------------------- */
-/*
- Define the hooks for cross-platform string + memory functions
-
-*/
-
-#ifdef DEBUG
- XP_BEGIN_PROTOS
- extern char * NOT_NULL (const char *x);
- XP_END_PROTOS
-#else
-# define NOT_NULL(X) X
-#endif
-
-#include
-#define XP_STRLEN(s) strlen(NOT_NULL(s))
-#define XP_STRCMP(a, b) strcmp(NOT_NULL(a), NOT_NULL(b))
-#define XP_STRNCMP(a, b, n) strncmp(NOT_NULL(a), NOT_NULL(b), (n))
-#define XP_STRCPY(d, s) strcpy(NOT_NULL(d), NOT_NULL(s))
-#define XP_STRCHR strchr
-#define XP_STRRCHR strrchr
-#define XP_STRTOK strtok
-#define XP_STRCAT strcat
-#define XP_STRNCAT strncat
-#define XP_STRSTR strstr
-#define XP_STRTOUL strtoul
-
-
-/* XP_FILENAMECMP compares two filenames, treating case differences
- appropriately for this OS. */
-
-#if defined(XP_WIN) || defined(XP_OS2)
-#define XP_FILENAMECMP stricmp
-#else
-#define XP_FILENAMECMP XP_STRCMP
-#endif
-
-
-#if !defined(XP_WIN) && !defined(XP_OS2) && !(defined(__GLIBC__) && __GLIBC__ >= 2) && !defined(AIXV3)
-/* strdup is not an ANSI function */
-XP_BEGIN_PROTOS
-extern char * strdup (const char * s);
-XP_END_PROTOS
-#endif
-
-#ifndef __QNX__
-#include
-#else
-XP_BEGIN_PROTOS
-extern long random(void); /* QNX doesn't provide a prototype, so do this until they fix it. */
-XP_END_PROTOS
-#endif
-
-#define XP_STRDUP(s) strdup((s))
-#define XP_MEMCPY(d, s, n) memcpy((d), (s), (n))
-
-/* NOTE: XP_MEMMOVE gurantees that overlaps will be properly handled */
-#ifdef SUNOS4
-#define XP_MEMMOVE(Dest,Src,Len) bcopy((Src),(Dest),(Len))
-#else
-#define XP_MEMMOVE(Dest,Src,Len) memmove((Dest),(Src),(Len))
-#endif /* SUNOS4 */
-
-#define XP_MEMSET memset
-#define XP_SPRINTF sprintf
-
-/* should I really include this here or what? */
-#ifdef XP_MAC
-#include "prprf.h"
-#else
-#include "prprf.h"
-#endif
-#define XP_SAFE_SPRINTF PR_snprintf
-#define XP_MEMCMP memcmp
-
-#define XP_VSPRINTF vsprintf
-
-#define XP_IS_SPACE(VAL) \
- (((((intn)(VAL)) & 0x7f) == ((intn)(VAL))) && isspace((intn)(VAL)) )
-
-#define XP_IS_CNTRL(i) ((((unsigned int) (i)) > 0x7f) ? (int) 0 : iscntrl(i))
-#define XP_IS_DIGIT(i) ((((unsigned int) (i)) > 0x7f) ? (int) 0 : isdigit(i))
-
-#if defined(XP_WIN) || defined(XP_OS2)
-#define XP_IS_ALPHA(VAL) (isascii((int)(VAL)) && isalpha((int)(VAL)))
-#else
-#define XP_IS_ALPHA(VAL) ((((unsigned int) (VAL)) > 0x7f) ? FALSE : isalpha((int)(VAL)))
-#endif
-
-#define XP_ATOI(PTR) (atoi((PTR)))
-
-/* NOTE: XP_BCOPY gurantees that overlaps will be properly handled */
-#ifdef XP_WIN16
-
-XP_BEGIN_PROTOS
-extern void WIN16_bcopy(char *, char *, unsigned long);
-XP_END_PROTOS
-
-#define XP_BCOPY(PTR_FROM, PTR_TO, LEN) \
- (WIN16_bcopy((char *) (PTR_FROM), (char *)(PTR_TO), (LEN)))
-#else
-#define XP_BCOPY(Src,Dest,Len) XP_MEMMOVE((Dest),(Src),(Len))
-#endif
-
-#define XP_BZERO(a,b) memset(a,0,b)
-
-#if !defined(XP_RANDOM) || !defined(XP_SRANDOM) /* defined in both xp_mcom.h and xp_str.h */
-#ifdef HAVE_RANDOM
-#define XP_RANDOM random
-#define XP_SRANDOM(seed) srandom((seed))
-#else
-#define XP_RANDOM rand
-#define XP_SRANDOM(seed) srand((seed))
-#endif
-#endif
+#include "prtypes.h"
+#include
#ifdef XP_MAC
-XP_BEGIN_PROTOS
+PR_BEGIN_EXTERN_C
+extern char * strdup(const char *);
extern time_t GetTimeMac();
extern time_t Mactime(time_t *timer);
extern struct tm *Macgmtime(const time_t *timer);
@@ -189,7 +60,7 @@ extern time_t Macmktime (struct tm *timeptr);
extern char * Macctime(const time_t *);
extern struct tm *Maclocaltime(const time_t *);
-XP_END_PROTOS
+PR_END_EXTERN_C
#define XP_TIME() GetTimeMac()
#define time(t) Mactime(t)
@@ -201,4 +72,5 @@ XP_END_PROTOS
#else
#define XP_TIME() time(0)
#endif
+
#endif /* _MCOM_H_ */
diff --git a/mozilla/include/xp_mem.h b/mozilla/include/xp_mem.h
deleted file mode 100644
index 87c946bf394..00000000000
--- a/mozilla/include/xp_mem.h
+++ /dev/null
@@ -1,291 +0,0 @@
-/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Netscape Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the NPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the NPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-/*-----------------------------------------------------------------------------
- XPMem.h
- Cross-Platform Memory API
------------------------------------------------------------------------------*/
-#ifndef _XP_MEM_
-#define _XP_MEM_
-
-#include "xp_core.h"
-
-#ifdef XP_WIN16
-#include
-#endif
-
-/* global free routine */
-#define XP_FREEIF(obj) do { if(obj) { XP_FREE(obj); obj = 0; }} while(0)
-
-/*-----------------------------------------------------------------------------
-Allocating Structures
------------------------------------------------------------------------------*/
-
-#define XP_NEW( x ) (x*)malloc( sizeof( x ) )
-#define XP_DELETE( p ) free( p )
-
-/*-----------------------------------------------------------------------------
-Mallocs
-NOTE: this uses the same malloc as the structure allocator so it is
-ok and safe to use XP_DELETE or XP_FREE interchangeably!
------------------------------------------------------------------------------*/
-
-#ifdef XP_MAC
-
-#define XP_ALLOC( s ) malloc( s )
-#define XP_FREE( p ) free( p )
-#define XP_REALLOC( p , s ) realloc( p, s )
-#define XP_CALLOC( n, s ) calloc( (n), (s) )
-#define XP_NEW_ZAP( t ) ((t*)calloc( 1, sizeof(t) ) )
-
-#else /* !XP_MAC */
-/* normal win and unix */
-
-#ifdef XP_WIN16
-
-XP_BEGIN_PROTOS
-extern void * WIN16_realloc(void * ptr, unsigned long size);
-extern void * WIN16_malloc(unsigned long size);
-XP_END_PROTOS
-
-#define XP_REALLOC(ptr, size) WIN16_realloc(ptr, size)
-#define XP_ALLOC(size) WIN16_malloc(size)
-#else
-
-/* this used to check for < 64K for win16, but we don't need it anymore!
- I'll leave the define in case someone else has another check they want to try.
-*/
-#define XP_CHECK_ALLOC_SIZE(size) size
-
-#define XP_REALLOC(ptr, size) realloc(ptr, XP_CHECK_ALLOC_SIZE(size))
-#define XP_ALLOC(size) malloc(XP_CHECK_ALLOC_SIZE(size))
-#endif
-
-
-#ifdef DEBUG
-#define XP_CALLOC(num, sz) (((num)*(sz))<64000 ? calloc((num),(sz)) : (XP_ASSERT(FALSE), calloc((num),(sz))))
-#else
-#define XP_CALLOC(num, sz) calloc((num), (sz))
-#endif
-
-#define XP_FREE(ptr) free(ptr)
-#define XP_NEW_ZAP(TYPE) ( (TYPE*) calloc (1, sizeof (TYPE) ) )
-#endif /* !XP_MAC */
-
-
-/* --------------------------------------------------------------------------
- 16-bit windows requires space allocated bigger than 32K to be of
- type huge. For example:
-
- int HUGE * foo = halloc(100000);
------------------------------------------------------------------------------*/
-
-/* There's no huge realloc because win16 doesn't have a hrealloc,
- * and there's no API to discover the original buffer's size.
- */
-#ifdef XP_WIN16
-#define XP_HUGE __huge
-#define XP_HUGE_ALLOC(SIZE) halloc(SIZE,1)
-#define XP_HUGE_FREE(SIZE) hfree(SIZE)
-#define XP_HUGE_MEMCPY(DEST, SOURCE, LEN) hmemcpy(DEST, SOURCE, LEN)
-#else
-#define XP_HUGE
-#define XP_HUGE_ALLOC(SIZE) malloc(SIZE)
-#define XP_HUGE_FREE(SIZE) free(SIZE)
-#define XP_HUGE_MEMCPY(DEST, SOURCE, LEN) memcpy(DEST, SOURCE, LEN)
-#endif
-
-#define XP_HUGE_CHAR_PTR char XP_HUGE *
-
-/*-----------------------------------------------------------------------------
-Allocating Large Buffers
-NOTE: this does not interchange with XP_ALLOC/XP_NEW/XP_FREE/XP_DELETE
------------------------------------------------------------------------------*/
-
-#if defined(XP_UNIX) || defined(XP_WIN32) || defined(XP_BEOS)
-
-/* don't typedef this to void* unless you want obscure bugs... */
-typedef unsigned long * XP_Block;
-
-#define XP_ALLOC_BLOCK(SIZE) malloc ((SIZE))
-#define XP_FREE_BLOCK(BLOCK) free ((BLOCK))
-#ifdef XP_UNIXu
- /* On SunOS, realloc(0,n) ==> 0 */
-# define XP_REALLOC_BLOCK(BLOCK,SIZE) ((BLOCK) \
- ? realloc ((BLOCK), (SIZE)) \
- : malloc ((SIZE)))
-#else /* !XP_UNIX */
-# define XP_REALLOC_BLOCK(BLOCK,SIZE) realloc ((BLOCK), (SIZE))
-#endif /* !XP_UNIX */
-#define XP_LOCK_BLOCK(PTR,TYPE,BLOCK) PTR = ((TYPE) (BLOCK))
-#ifdef DEBUG
-#define XP_UNLOCK_BLOCK(BLOCK) (void)BLOCK
-#else
-#define XP_UNLOCK_BLOCK(BLOCK)
-#endif
-#endif /* XP_UNIX || XP_WIN32 */
-
-#if defined(XP_OS2)
-
-/* don't typedef this to void* unless you want obscure bugs... */
-typedef unsigned long * XP_Block;
-
-#define XP_ALLOC_BLOCK(SIZE) malloc ((SIZE))
-#define XP_FREE_BLOCK(BLOCK) free ((BLOCK))
-# define XP_REALLOC_BLOCK(BLOCK,SIZE) realloc ((BLOCK), (SIZE))
-#define XP_LOCK_BLOCK(PTR,TYPE,BLOCK) PTR = ((TYPE) (BLOCK))
-#ifdef DEBUG
-#define XP_UNLOCK_BLOCK(BLOCK) (void)BLOCK
-#else
-#define XP_UNLOCK_BLOCK(BLOCK)
-#endif
-
-#ifdef MCW_DEBUG
-#include
-#include
-#endif
-#endif /* XP_OS2 */
-
-#ifdef XP_WIN16
-typedef unsigned char * XP_Block;
-#define XP_ALLOC_BLOCK(SIZE) WIN16_malloc((SIZE))
-#define XP_FREE_BLOCK(BLOCK) free ((BLOCK))
-#define XP_REALLOC_BLOCK(BLOCK,SIZE) ((BLOCK) \
- ? WIN16_realloc ((BLOCK), (SIZE)) \
- : WIN16_malloc ((SIZE)))
-#define XP_LOCK_BLOCK(PTR,TYPE,BLOCK) PTR = ((TYPE) (BLOCK))
-#ifdef DEBUG
-#define XP_UNLOCK_BLOCK(BLOCK) (void)BLOCK
-#else
-#define XP_UNLOCK_BLOCK(BLOCK)
-#endif
-
-#endif /* XP_WIN16 */
-
-
-#ifdef XP_MAC
-
-typedef float* XP_Block;
-#define XP_ALLOC_BLOCK( s ) ((XP_Block)malloc( s ) )
-#define XP_FREE_BLOCK( b ) free( b )
-#define XP_REALLOC_BLOCK( b, s ) ((XP_Block)realloc( b, s ) )
-#define XP_LOCK_BLOCK( p, t, b ) (p = ( t )( b ))
-#define XP_UNLOCK_BLOCK( b )
-
-#endif /* XP_MAC */
-
-#define PA_Block XP_Block
-#define PA_ALLOC(S) XP_ALLOC_BLOCK(S)
-#define PA_FREE(B) XP_FREE_BLOCK(B)
-#define PA_REALLOC(B,S) XP_REALLOC_BLOCK(B,S)
-#define PA_LOCK(P,T,B) XP_LOCK_BLOCK(P,T,B)
-#define PA_UNLOCK(B) XP_UNLOCK_BLOCK(B)
-
-/*-----------------------------------------------------------------------------
-Allocating many small structures.
-
-If allocating many small structures, it is often more efficient to allocate
-an array of a bunch of them, and maintain a free list of them. These
-utilities do that for you.
-
-You must provide a XP_AllocStructInfo structure which describes what
-it is you are trying to allocate it. If statically defined, use the
-XP_INITIALIZE_ALLOCSTRUCTINFO macro to initialize it; if you prefer to
-initialize it at runtime, use the XP_InitAllocStructInfo() routine.
-
-If you free everything you've ever allocated for a given
-XP_AllocStructInfo, all the memory used will be freed. Or, if you're
-*really sure* you're done with everything you've allocated for a given
-XP_AllocStructInfo, you can just call the scary XP_FreeAllStructs() routine.
-
-Don't mix calls to XP_AllocStruct/XP_FreeStruct and XP_ALLOC/XP_FREE !!!
-
-XP_AllocStructZero is the same as XP_AllocStruct, but it also zeros out
-the allocated memory.
-
-An example:
-
-struct foo {
- int a;
- int b;
-};
-
-static XP_AllocStructInfo FooAlloc =
- { XP_INITIALIZE_ALLOCSTRUCTINFO(sizeof(struct foo)) };
-
- .
- .
- .
-
-
- struct foo* ptr = (struct foo*) XP_AllocStruct(&FooAlloc);
- .
- .
- .
- XP_FreeStruct(FooAlloc, ptr);
------------------------------------------------------------------------------*/
-
-typedef struct XP_AllocStructInfo {
- int size;
- void* curchunk;
- int leftinchunk;
- void* firstfree;
- void* firstchunk;
- int numalloced;
-} XP_AllocStructInfo;
-
-
-#define XP_INITIALIZE_ALLOCSTRUCTINFO(size) ((size + sizeof(void*) - 1) / sizeof(void*)) * sizeof(void*)
-
-
-XP_BEGIN_PROTOS
-
-void XP_InitAllocStructInfo(XP_AllocStructInfo* info, int size);
-void* XP_AllocStruct(XP_AllocStructInfo* info);
-void* XP_AllocStructZero(XP_AllocStructInfo* info);
-void XP_FreeStruct(XP_AllocStructInfo* info, void* ptr);
-void XP_FreeAllStructs(XP_AllocStructInfo* info); /* Danger! Use with care! */
-
-XP_END_PROTOS
-
-
-
-
-#endif /* _XP_MEM_ */
-
-
diff --git a/mozilla/include/xp_str.h b/mozilla/include/xp_str.h
index 4c26385e43f..6f00911173e 100644
--- a/mozilla/include/xp_str.h
+++ b/mozilla/include/xp_str.h
@@ -39,22 +39,23 @@
#ifndef XPSTRING_H
#define XPSTRING_H
-#include
-#include "platform.h"
-#include "xp_core.h"
+#include "prtypes.h"
-#define XP_STRCASECMP strcasecomp
-#define XP_STRNCASECMP strncasecomp
-#define XP_STRCASESTR strcasestr
-#define XP_STRNCHR strnchr
+#define XP_IS_SPACE(VAL) \
+ (((((intn)(VAL)) & 0x7f) == ((intn)(VAL))) && isspace((intn)(VAL)) )
-#define XP_TO_UPPER(i) xp_toupper(i)
-#define XP_TO_LOWER(i) xp_tolower(i)
+#define XP_IS_CNTRL(i) ((((unsigned int) (i)) > 0x7f) ? (int) 0 : iscntrl(i))
+#define XP_IS_DIGIT(i) ((((unsigned int) (i)) > 0x7f) ? (int) 0 : isdigit(i))
+#ifdef XP_WIN
+#define XP_IS_ALPHA(VAL) (isascii((int)(VAL)) && isalpha((int)(VAL)))
+#else
+#define XP_IS_ALPHA(VAL) ((((unsigned int) (VAL)) > 0x7f) ? FALSE : isalpha((int)(VAL)))
+#endif
#ifdef DEBUG
- XP_BEGIN_PROTOS
+ PR_BEGIN_EXTERN_C
extern char * NOT_NULL (const char *x);
- XP_END_PROTOS
+ PR_END_EXTERN_C
#else
# define NOT_NULL(X) X
#endif
@@ -63,184 +64,6 @@
#define XP_STRCMP(a, b) strcmp(NOT_NULL(a), NOT_NULL(b))
#define XP_STRNCMP(a, b, n) strncmp(NOT_NULL(a), NOT_NULL(b), (n))
#define XP_STRCPY(d, s) strcpy(NOT_NULL(d), NOT_NULL(s))
-#define XP_STRCHR strchr
-#define XP_STRRCHR strrchr
-#define XP_STRTOK strtok
-#define XP_STRCAT strcat
-#define XP_STRNCAT strncat
-#define XP_STRSTR strstr
-#define XP_STRTOUL strtoul
-
-/*
- XP_FILENAMECMP compares two filenames, treating case differences
- appropriately for this OS.
- */
-
-#ifdef XP_WIN
-#define XP_FILENAMECMP stricmp
-#else
-#define XP_FILENAMECMP XP_STRCMP
-#endif
-
-
-#if !defined(XP_WIN) && !defined(XP_OS2) && !(defined(__GLIBC__) && __GLIBC__ >= 2) && !defined(AIXV3)
- /* strdup is not an ANSI function */
- XP_BEGIN_PROTOS
- extern char * strdup (const char * s);
- XP_END_PROTOS
-#endif
-
-
-#define XP_STRDUP(s) strdup((s))
-#define XP_MEMCPY(d, s, n) memcpy((d), (s), (n))
-
-/* NOTE: XP_MEMMOVE gurantees that overlaps will be properly handled */
-#ifdef SUNOS4
-#define XP_MEMMOVE(Dest,Src,Len) bcopy((Src),(Dest),(Len))
-#else
-#define XP_MEMMOVE(Dest,Src,Len) memmove((Dest),(Src),(Len))
-#endif /* SUNOS4 */
-
-#define XP_MEMSET memset
-#define XP_SPRINTF sprintf
-#define XP_SAFE_SPRINTF PR_snprintf
-#define XP_MEMCMP memcmp
-#define XP_VSPRINTF vsprintf
-
-#define XP_IS_SPACE(VAL) \
- (((((intn)(VAL)) & 0x7f) == ((intn)(VAL))) && isspace((intn)(VAL)) )
-
-#define XP_IS_CNTRL(i) ((((unsigned int) (i)) > 0x7f) ? (int) 0 : iscntrl(i))
-#define XP_IS_DIGIT(i) ((((unsigned int) (i)) > 0x7f) ? (int) 0 : isdigit(i))
-
-#ifdef XP_WIN
-#define XP_IS_ALPHA(VAL) (isascii((int)(VAL)) && isalpha((int)(VAL)))
-#else
-#define XP_IS_ALPHA(VAL) ((((unsigned int) (VAL)) > 0x7f) ? FALSE : isalpha((int)(VAL)))
-#endif
-
-#define XP_ATOI(PTR) (atoi((PTR)))
-#define XP_BZERO(a,b) memset(a,0,b)
-
-/* NOTE: XP_BCOPY gurantees that overlaps will be properly handled */
-#ifdef XP_WIN16
-
- XP_BEGIN_PROTOS
- extern void WIN16_bcopy(char *, char *, unsigned long);
- XP_END_PROTOS
-
- #define XP_BCOPY(PTR_FROM, PTR_TO, LEN) \
- (WIN16_bcopy((char *) (PTR_FROM), (char *)(PTR_TO), (LEN)))
-
-#else
-
- #define XP_BCOPY(Src,Dest,Len) XP_MEMMOVE((Dest),(Src),(Len))
-
-#endif /* XP_WIN16 */
-
-
-/*
- Random stuff in a random place
-*/
-#if !defined(XP_RANDOM) || !defined(XP_SRANDOM) /* defined in both xp_mcom.h and xp_str.h */
-#ifdef HAVE_RANDOM
-#define XP_RANDOM random
-#define XP_SRANDOM(seed) srandom((seed))
-#else
-#define XP_RANDOM rand
-#define XP_SRANDOM(seed) srand((seed))
-#endif
-#endif
-
-XP_BEGIN_PROTOS
-
-/*
-** Some basic string things
-*/
-
-/*
-** Concatenate s1 to s2. If s1 is NULL then a copy of s2 is
-** returned. Otherwise, s1 is realloc'd and s2 is concatenated, with the
-** new value of s1 being returned.
-*/
-extern char *XP_AppendStr(char *s1, const char *s2);
-
-
-/*
-** Concatenate a bunch of strings. The variable length argument list must
-** be terminated with a NULL. This result is a DS_Alloc'd string.
-*/
-extern char *XP_Cat(char *s1, ...);
-
-/* Fast table driven tolower and toupper functions.
- **
- ** Only works on first 128 ascii
- */
-int xp_tolower(int c);
-int xp_toupper(int c);
-
-/*
- * Case-insensitive string comparison
- */
-extern int strcasecomp (const char *a, const char *b);
-extern int strncasecomp (const char *a, const char *b, int n);
-
-/* find a char within a specified length string
- */
-extern char * strnchr (const char * str, const char single, int32 len);
-
-/* find a substring within a string with a case insensitive search
- */
-extern char * strcasestr (const char * str, const char * substr);
-
-/* find a substring within a specified length string with a case
- * insensitive search
- */
-extern char * strncasestr (const char * str, const char * substr, int32 len);
-
-/* thread safe version of strtok. placeHolder contains the remainder of the
- string being tokenized and is used as the starting point of the next search */
-
-/* example: (1st call) token = XP_STRTOK_R(tokenString, "", &placeHolder);
- (2nd call) token = XP_STRTOK_R(nil, "", &placeHolder);*/
-extern char * XP_STRTOK_R(char *s1, const char *s2, char **placeHolder);
-
-/*
- * Malloc'd string manipulation
- *
- * notice that they are dereferenced by the define!
- */
-#define StrAllocCopy(dest, src) NET_SACopy (&(dest), src)
-#define StrAllocCat(dest, src) NET_SACat (&(dest), src)
-extern char * NET_SACopy (char **dest, const char *src);
-extern char * NET_SACat (char **dest, const char *src);
-
-/*
- * Malloc'd block manipulation
- *
- * Lengths are necessary here :(
- *
- * notice that they are dereferenced by the define!
- */
-#define BlockAllocCopy(dest, src, src_length) NET_BACopy((char**)&(dest), src, src_length)
-#define BlockAllocCat(dest, dest_length, src, src_length) NET_BACat(&(dest), dest_length, src, src_length)
-extern char * NET_BACopy (char **dest, const char *src, size_t src_length);
-extern char * NET_BACat (char **dest, size_t dest_length, const char *src, size_t src_length);
-
-extern char * XP_StripLine (char *s);
-
-/* Match = 0, NoMatch = 1, Abort = -1 */
-/* Based loosely on sections of wildmat.c by Rich Salz */
-extern int xp_RegExpSearch(char *str, char *regexp);
-
-/*
- * These are "safe" versions of the runtime library routines. The RTL
- * versions do not null-terminate dest IFF strlen(src) >= destLength.
- * These versions always null-terminate, which is why they're safe.
- */
-extern char *XP_STRNCAT_SAFE (char *dest, const char *src, size_t len);
-extern char *XP_STRNCPY_SAFE (char *dest, const char *src, size_t len);
-
-XP_END_PROTOS
#endif /* XPSTRING_H */
+
diff --git a/mozilla/jpeg/jconfig.h b/mozilla/jpeg/jconfig.h
index e307ad2ca61..bfd2af0c79f 100644
--- a/mozilla/jpeg/jconfig.h
+++ b/mozilla/jpeg/jconfig.h
@@ -40,9 +40,6 @@
* environment. Note that there are also Mozilla mods in jmorecfg.h.
*/
-#include "xp_core.h" /* get XP_ symbols */
-
-
/* We assume an ANSI C or C++ compilation environment */
#define HAVE_PROTOTYPES
#define HAVE_UNSIGNED_CHAR
diff --git a/mozilla/jpeg/jdapimin.c b/mozilla/jpeg/jdapimin.c
index 6ff1d2dbff3..ab57dc688fe 100644
--- a/mozilla/jpeg/jdapimin.c
+++ b/mozilla/jpeg/jdapimin.c
@@ -20,8 +20,6 @@
#include "jinclude.h"
#include "jpeglib.h"
-#include "xp_core.h"
-
#ifdef HAVE_MMX_INTEL_MNEMONICS
int MMXAvailable;
int mmxsupport();
diff --git a/mozilla/jpeg/jdmerge.c b/mozilla/jpeg/jdmerge.c
index 5c83654af9d..3239ddbde82 100644
--- a/mozilla/jpeg/jdmerge.c
+++ b/mozilla/jpeg/jdmerge.c
@@ -35,7 +35,6 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
-#include "xp_core.h"
#ifdef UPSAMPLE_MERGING_SUPPORTED
diff --git a/mozilla/jpeg/jidctfst.c b/mozilla/jpeg/jidctfst.c
index 325514c9d3d..a94455a0e50 100644
--- a/mozilla/jpeg/jidctfst.c
+++ b/mozilla/jpeg/jidctfst.c
@@ -36,7 +36,6 @@
#include "jinclude.h"
#include "jpeglib.h"
#include "jdct.h" /* Private declarations for DCT subsystem */
-#include "xp_core.h"
#ifdef DCT_IFAST_SUPPORTED
diff --git a/mozilla/jpeg/jmorecfg.h b/mozilla/jpeg/jmorecfg.h
index 3d0fe1e7efc..9a9b3bc7e02 100644
--- a/mozilla/jpeg/jmorecfg.h
+++ b/mozilla/jpeg/jmorecfg.h
@@ -197,6 +197,7 @@ typedef unsigned int JDIMENSION;
/* Mozilla mod: make external functions be DLL-able via JRI_PUBLIC_API(),
* and supply extern "C" for C++ users of the C-compiled IJG library.
*/
+#include "prtypes.h"
/* a function called through method pointers: */
#define METHODDEF(type) static type
diff --git a/mozilla/jpeg/jpeglib.h b/mozilla/jpeg/jpeglib.h
index a3fd46ea699..0d7123c6bc0 100644
--- a/mozilla/jpeg/jpeglib.h
+++ b/mozilla/jpeg/jpeglib.h
@@ -13,8 +13,6 @@
#ifndef JPEGLIB_H
#define JPEGLIB_H
-#include "xp_core.h"
-
#ifdef XP_OS2
/*
* On OS/2, the system will have defined RGB_* so we #undef 'em to avoid warnings
diff --git a/mozilla/layout/style/nsCSSStyleRule.cpp b/mozilla/layout/style/nsCSSStyleRule.cpp
index d9bbf5d2d5d..75e4a94ffae 100644
--- a/mozilla/layout/style/nsCSSStyleRule.cpp
+++ b/mozilla/layout/style/nsCSSStyleRule.cpp
@@ -68,7 +68,6 @@
#include "nsINameSpaceManager.h"
#include "nsINameSpace.h"
#include "nsILookAndFeel.h"
-#include "xp_core.h"
#include "nsRuleNode.h"
#include "nsIStyleSet.h"
diff --git a/mozilla/lib/mac/Misc/macmem.h b/mozilla/lib/mac/Misc/macmem.h
index efd5928104d..b3097e68b82 100644
--- a/mozilla/lib/mac/Misc/macmem.h
+++ b/mozilla/lib/mac/Misc/macmem.h
@@ -36,17 +36,17 @@
* ***** END LICENSE BLOCK ***** */
#pragma once
#include
-#include "xp_core.h"
+#include "prtypes.h"
typedef enum MemoryPriority { fcNone, fcLow, fcMedium, fcHigh, fcTop } MemoryPriority;
#define NEW( CLASS ) ( new CLASS )
#define DELETE( OBJECT ) delete OBJECT
-XP_BEGIN_PROTOS
+PR_BEGIN_EXTERN_C
extern void* Flush_Allocate( size_t size, int zero );
extern void* Flush_Reallocate( void* item, size_t size );
extern void Flush_Free( void* item );
-XP_END_PROTOS
+PR_END_EXTERN_C
diff --git a/mozilla/mailnews/addrbook/src/nsDirPrefs.cpp b/mozilla/mailnews/addrbook/src/nsDirPrefs.cpp
index c6aa5381f67..1b26354e88d 100644
--- a/mozilla/mailnews/addrbook/src/nsDirPrefs.cpp
+++ b/mozilla/mailnews/addrbook/src/nsDirPrefs.cpp
@@ -51,6 +51,7 @@
#include "nsXPIDLString.h"
#include "nsReadableUtils.h"
+#include "prlog.h"
#include "plstr.h"
#include "prmem.h"
#include "xp_str.h"
@@ -505,7 +506,7 @@ nsresult DIR_InitServer (DIR_Server *server)
NS_ASSERTION((server != nsnull), "server is null");
if (server)
{
- XP_BZERO(server, sizeof(DIR_Server));
+ memset(server, 0, sizeof(DIR_Server));
server->saveResults = PR_TRUE;
server->efficientWildcards = kDefaultEfficientWildcards;
server->port = LDAP_PORT;
@@ -629,7 +630,7 @@ nsresult DIR_CopyServer (DIR_Server *in, DIR_Server **out)
*out = (DIR_Server*)PR_Malloc(sizeof(DIR_Server));
if (*out)
{
- XP_BZERO (*out, sizeof(DIR_Server));
+ memset(*out, 0, sizeof(DIR_Server));
if (in->prefName)
{
@@ -776,7 +777,7 @@ nsresult DIR_CopyServer (DIR_Server *in, DIR_Server **out)
(*out)->basicSearchAttributes = (DIR_AttributeId*) PR_Malloc(bsaLength);
if ((*out)->basicSearchAttributes)
{
- XP_MEMCPY ((*out)->basicSearchAttributes, in->basicSearchAttributes, bsaLength);
+ memcpy((*out)->basicSearchAttributes, in->basicSearchAttributes, bsaLength);
(*out)->basicSearchAttributesCount = in->basicSearchAttributesCount;
}
}
@@ -2393,24 +2394,24 @@ static nsresult DIR_AddCustomAttribute(DIR_Server *server, const char *attrName,
char *attrToken = nsnull;
PRUint32 attrCount = 0;
- XP_BZERO(attrStruct, sizeof(DIR_Attribute));
+ memset(attrStruct, 0, sizeof(DIR_Attribute));
/* Try to pull out the pretty name into the struct */
attrStruct->id = id;
- attrStruct->prettyName = nsCRT::strdup(XP_STRTOK(scratchAttr, ":"));
+ attrStruct->prettyName = nsCRT::strdup(strtok(scratchAttr, ":"));
/* Count up the attribute names */
- while ((attrToken = XP_STRTOK(nsnull, ", ")) != nsnull)
+ while ((attrToken = strtok(nsnull, ", ")) != nsnull)
attrCount++;
/* Pull the attribute names into the struct */
PL_strcpy(scratchAttr, jsAttrForTokenizing);
- XP_STRTOK(scratchAttr, ":");
+ strtok(scratchAttr, ":");
attrStruct->attrNames = (char**) PR_Malloc((attrCount + 1) * sizeof(char*));
if (attrStruct->attrNames)
{
PRInt32 i = 0;
- while ((attrToken = XP_STRTOK(nsnull, ", ")) != nsnull)
+ while ((attrToken = strtok(nsnull, ", ")) != nsnull)
attrStruct->attrNames[i++] = nsCRT::strdup(attrToken);
attrStruct->attrNames[i] = nsnull; /* null-terminate the array */
}
@@ -2443,7 +2444,7 @@ PRInt32 DIR_GetNumAttributeIDsForColumns(DIR_Server * server)
if (buffer)
{
marker = buffer;
- while (AB_pstrtok_r(nil, ", ", &buffer))
+ while (AB_pstrtok_r(0, ", ", &buffer))
count++;
PR_FREEIF(marker);
}
@@ -2480,7 +2481,7 @@ nsresult DIR_GetAttributeIDsForColumns(DIR_Server *server, DIR_AttributeId ** id
{
for (indx = 0; indx < numItems; indx++)
{
- idName = AB_pstrtok_r(nil,", ",&marker);
+ idName = AB_pstrtok_r(0,", ",&marker);
if (idName)
{
status = DIR_AttributeNameToId(server, idName, &idArray[numAdded]);
@@ -2528,11 +2529,11 @@ static nsresult dir_CreateTokenListFromWholePref(const char *pref, char ***outLi
if (*outList)
{
PRInt32 i;
- char *token = XP_STRTOK(commaSeparatedList, ", ");
+ char *token = strtok(commaSeparatedList, ", ");
for (i = 0; i < *outCount; i++)
{
(*outList)[i] = nsCRT::strdup(token);
- token = XP_STRTOK(nsnull, ", ");
+ token = strtok(nsnull, ", ");
}
}
else
@@ -2705,7 +2706,7 @@ static nsresult DIR_GetCustomFilterPrefs(const char *prefstring, DIR_Server *ser
if (filter)
{
PRBool tempBool;
- XP_BZERO(filter, sizeof(DIR_Filter));
+ memset(filter, 0, sizeof(DIR_Filter));
/* Pull per-filter preferences out of JS values */
filter->string = DIR_GetStringPref (scratch, "string", localScratch,
@@ -2756,7 +2757,7 @@ static void DIR_ConvertServerFileName(DIR_Server* pServer)
newLeafName = XP_STRRCHR (leafName, '\\');
#endif /* XP_FileIsFullPath */
#else
- newLeafName = XP_STRRCHR (leafName, '/');
+ newLeafName = strrchr(leafName, '/');
#endif
pServer->fileName = newLeafName ? nsCRT::strdup(newLeafName + 1) : nsCRT::strdup(leafName);
if (leafName) PR_Free(leafName);
diff --git a/mozilla/mailnews/base/util/nsMsgDBFolder.cpp b/mozilla/mailnews/base/util/nsMsgDBFolder.cpp
index 249ab518997..73c018329ae 100644
--- a/mozilla/mailnews/base/util/nsMsgDBFolder.cpp
+++ b/mozilla/mailnews/base/util/nsMsgDBFolder.cpp
@@ -37,7 +37,6 @@
* ***** END LICENSE BLOCK ***** */
#include "msgCore.h"
-#include "xp_core.h"
#include "nsReadableUtils.h"
#include "nsMsgDBFolder.h"
#include "nsMsgFolderFlags.h"
@@ -61,6 +60,7 @@
#include "nsIInterfaceRequestor.h"
#include "nsIInterfaceRequestorUtils.h"
+#include
#define oneHour 3600000000
#include "nsMsgUtils.h"
diff --git a/mozilla/mailnews/compose/src/nsMsgSendPart.h b/mozilla/mailnews/compose/src/nsMsgSendPart.h
index 3ec2cc1c34e..a70a2d53b29 100644
--- a/mozilla/mailnews/compose/src/nsMsgSendPart.h
+++ b/mozilla/mailnews/compose/src/nsMsgSendPart.h
@@ -40,7 +40,6 @@
#include "msgCore.h"
#include "prprf.h" /* should be defined into msgCore.h? */
-#include "xp_core.h"
#include "nsMsgSend.h"
typedef int (*MSG_SendPartWriteFunc)(const char* line, PRInt32 size,
diff --git a/mozilla/mailnews/imap/src/nsImapMailFolder.cpp b/mozilla/mailnews/imap/src/nsImapMailFolder.cpp
index 3038a33dfa6..07b13956140 100644
--- a/mozilla/mailnews/imap/src/nsImapMailFolder.cpp
+++ b/mozilla/mailnews/imap/src/nsImapMailFolder.cpp
@@ -38,7 +38,6 @@
#include "msgCore.h"
-#include "xp_core.h"
#include "nsMsgImapCID.h"
#include "nsImapMailFolder.h"
#include "nsIEnumerator.h"
@@ -98,6 +97,7 @@
#include "nsIMAPNamespace.h"
#include "nsHashtable.h"
#include "nsMsgMessageFlags.h"
+#include
static NS_DEFINE_CID(kMsgAccountManagerCID, NS_MSGACCOUNTMANAGER_CID);
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
diff --git a/mozilla/mailnews/imap/src/nsImapService.cpp b/mozilla/mailnews/imap/src/nsImapService.cpp
index dc9af782608..462911fc25e 100644
--- a/mozilla/mailnews/imap/src/nsImapService.cpp
+++ b/mozilla/mailnews/imap/src/nsImapService.cpp
@@ -91,11 +91,11 @@
#include "nsIDOMWindowInternal.h"
#include "nsIMessengerWindowService.h"
#include "nsIWindowMediator.h"
-#include "xp_core.h"
#include "nsIPrompt.h"
#include "nsIWindowWatcher.h"
#include "nsImapProtocol.h"
#include "nsIMsgMailSession.h"
+#include
#define PREF_MAIL_ROOT_IMAP "mail.root.imap"
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
diff --git a/mozilla/mailnews/import/text/src/nsTextAddress.cpp b/mozilla/mailnews/import/text/src/nsTextAddress.cpp
index 88b1e7060ba..266cc120c68 100644
--- a/mozilla/mailnews/import/text/src/nsTextAddress.cpp
+++ b/mozilla/mailnews/import/text/src/nsTextAddress.cpp
@@ -37,7 +37,6 @@ static NS_DEFINE_CID(kAbCardPropertyCID, NS_ABCARDPROPERTY_CID);
// ONLY included for the ldif code that was copied over from nsAddressBook.cpp
// Maybe re-write that code and get rid of this? (isspace is what is needed)
-#include "xp_core.h"
#include "plstr.h"
#include "prmem.h"
#include "prprf.h"
diff --git a/mozilla/mailnews/mime/cthandlers/calendar/mimecal.cpp b/mozilla/mailnews/mime/cthandlers/calendar/mimecal.cpp
index 238ae096ac9..a5054c473c0 100644
--- a/mozilla/mailnews/mime/cthandlers/calendar/mimecal.cpp
+++ b/mozilla/mailnews/mime/cthandlers/calendar/mimecal.cpp
@@ -35,8 +35,6 @@
*
* ***** END LICENSE BLOCK ***** */
#include "mimecal.h"
-#include "xp_core.h"
-#include "xp_mem.h"
#include "prmem.h"
#include "plstr.h"
#include "mimexpcom.h"
diff --git a/mozilla/mailnews/mime/cthandlers/vcard/nsVCard.h b/mozilla/mailnews/mime/cthandlers/vcard/nsVCard.h
index 0c8f788465a..5cac205eba7 100644
--- a/mozilla/mailnews/mime/cthandlers/vcard/nsVCard.h
+++ b/mozilla/mailnews/mime/cthandlers/vcard/nsVCard.h
@@ -77,12 +77,12 @@ DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
#ifndef __VCC_H__
#define __VCC_H__ 1
-#include "xp_core.h"
+#include "prtypes.h"
#include "nsFileStream.h"
#include "nsFileSpec.h"
#include "nsVCardObj.h"
-XP_BEGIN_PROTOS
+PR_BEGIN_EXTERN_C
VObject* Parse_MIME(const char *input, unsigned long len);
@@ -94,6 +94,6 @@ typedef void (*MimeErrorHandler)(char *);
void registerMimeErrorHandler(MimeErrorHandler);
-XP_END_PROTOS
+PR_END_EXTERN_C
#endif /* __VCC_H__ */
diff --git a/mozilla/mailnews/mime/cthandlers/vcard/nsVCardObj.cpp b/mozilla/mailnews/mime/cthandlers/vcard/nsVCardObj.cpp
index 879f71800a6..453eade892f 100644
--- a/mozilla/mailnews/mime/cthandlers/vcard/nsVCardObj.cpp
+++ b/mozilla/mailnews/mime/cthandlers/vcard/nsVCardObj.cpp
@@ -78,6 +78,7 @@ DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
* vobject, and convert a vobject into its textual representation.
*/
+#include "prlog.h"
#include "nsVCard.h"
#include "nsVCardObj.h"
#include "prmem.h"
diff --git a/mozilla/mailnews/mime/cthandlers/vcard/nsVCardObj.h b/mozilla/mailnews/mime/cthandlers/vcard/nsVCardObj.h
index 6c716514898..9dab7d499b3 100644
--- a/mozilla/mailnews/mime/cthandlers/vcard/nsVCardObj.h
+++ b/mozilla/mailnews/mime/cthandlers/vcard/nsVCardObj.h
@@ -130,12 +130,12 @@ they will use an appropriately defined local type |vwchar_t|.
typedef wchar_t vwchar_t;
#endif
+#include "prtypes.h"
#include "nsFileSpec.h"
-#include "xp_core.h"
class nsOutputFileStream;
-XP_BEGIN_PROTOS
+PR_BEGIN_EXTERN_C
#define VC7bitProp "7bit"
#define VC8bitProp "8bit"
@@ -436,7 +436,7 @@ void writeVObjectsToFile(nsFileSpec *fname, VObject *list);
#define MAXPROPNAMESIZE 256
#define MAXMOZPROPNAMESIZE 16
-XP_END_PROTOS
+PR_END_EXTERN_C
#endif /* __VOBJECT_H__ */
diff --git a/mozilla/mailnews/mime/src/mimemoz2.cpp b/mozilla/mailnews/mime/src/mimemoz2.cpp
index f54b953ae56..dfdecda73e6 100644
--- a/mozilla/mailnews/mime/src/mimemoz2.cpp
+++ b/mozilla/mailnews/mime/src/mimemoz2.cpp
@@ -35,9 +35,9 @@
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
+#include "prlog.h"
#include "nsCOMPtr.h"
#include "modlmime.h"
-#include "xp_core.h"
#include "nsCRT.h"
#include "mimeobj.h"
#include "mimemsg.h"
diff --git a/mozilla/mailnews/news/src/nsNNTPProtocol.cpp b/mozilla/mailnews/news/src/nsNNTPProtocol.cpp
index 02773c90b49..53096b36392 100644
--- a/mozilla/mailnews/news/src/nsNNTPProtocol.cpp
+++ b/mozilla/mailnews/news/src/nsNNTPProtocol.cpp
@@ -72,7 +72,6 @@
#include "prlog.h"
#include "prerror.h"
#include "nsEscape.h"
-#include "xp_core.h"
#include "prprf.h"
@@ -115,6 +114,8 @@
#include "nntpCore.h"
#include "nsIStreamConverterService.h"
+#include
+
#undef GetPort // XXX Windows!
#undef SetPort // XXX Windows!
diff --git a/mozilla/modules/libpref/src/prefapi.cpp b/mozilla/modules/libpref/src/prefapi.cpp
index 8cc64c9aca5..114c5e25495 100644
--- a/mozilla/modules/libpref/src/prefapi.cpp
+++ b/mozilla/modules/libpref/src/prefapi.cpp
@@ -37,7 +37,6 @@
#include "prefapi.h"
#include "jsapi.h"
-#include "xp_core.h" /* Needed for XP_ defines */
#if defined(XP_MAC)
#include
diff --git a/mozilla/modules/libpref/src/prefapi.h b/mozilla/modules/libpref/src/prefapi.h
index 9632ba312d7..b2b5d98c98c 100644
--- a/mozilla/modules/libpref/src/prefapi.h
+++ b/mozilla/modules/libpref/src/prefapi.h
@@ -41,7 +41,6 @@
#ifndef PREFAPI_H
#define PREFAPI_H
-#include "xp_core.h"
#include "prtypes.h"
#include "jsapi.h"
#include "pldhash.h"
diff --git a/mozilla/modules/libutil/public/stopwatch.h b/mozilla/modules/libutil/public/stopwatch.h
index 69c0c227c53..5aad0b8e226 100644
--- a/mozilla/modules/libutil/public/stopwatch.h
+++ b/mozilla/modules/libutil/public/stopwatch.h
@@ -1,6 +1,5 @@
#ifndef __STOPWATCH_H
#define __STOPWATCH_H
-#include "xp_core.h"
#include "nscore.h"
#include "prlog.h"
#include "nsDeque.h"
diff --git a/mozilla/modules/oji/src/jvmmgr.cpp b/mozilla/modules/oji/src/jvmmgr.cpp
index c42e7bb69d8..99d9652995c 100644
--- a/mozilla/modules/oji/src/jvmmgr.cpp
+++ b/mozilla/modules/oji/src/jvmmgr.cpp
@@ -35,6 +35,7 @@
*
* ***** END LICENSE BLOCK ***** */
+#include "prlog.h"
#include "nsJVMManager.h"
#include "nsIServiceManager.h"
#include "nsIJVMPrefsWindow.h"
diff --git a/mozilla/modules/oji/src/nsJVMManager.h b/mozilla/modules/oji/src/nsJVMManager.h
index f3bc47c10b9..b30b82d1856 100644
--- a/mozilla/modules/oji/src/nsJVMManager.h
+++ b/mozilla/modules/oji/src/nsJVMManager.h
@@ -39,7 +39,6 @@
#define nsJVMManager_h___
#include "jvmmgr.h"
-#include "xp_core.h" /* include first because of Bool problem */
#include "prtypes.h"
#include "nsCom.h"
#include "jni.h"
diff --git a/mozilla/modules/oji/src/nsJVMPluginTagInfo.cpp b/mozilla/modules/oji/src/nsJVMPluginTagInfo.cpp
index 3b355ecdf27..b833e5fda26 100644
--- a/mozilla/modules/oji/src/nsJVMPluginTagInfo.cpp
+++ b/mozilla/modules/oji/src/nsJVMPluginTagInfo.cpp
@@ -42,7 +42,6 @@
#ifdef XP_UNIX
#undef Bool
#endif
-#include "xp_mem.h"
static NS_DEFINE_IID(kIJVMPluginTagInfoIID, NS_IJVMPLUGINTAGINFO_IID);
static NS_DEFINE_IID(kIPluginTagInfo2IID, NS_IPLUGINTAGINFO2_IID);
@@ -158,7 +157,7 @@ nsJVMPluginTagInfo::GetCodeBase(const char* *result)
const char* docBase;
err = fPluginTagInfo->GetDocumentBase(&docBase);
if (err != NS_OK) return err;
- PA_LOCK(codebase, const char*, docBase);
+ codebase = (const char*) docBase;
if ((fSimulatedCodebase = PL_strdup(codebase)) != NULL) {
char* lastSlash = PL_strrchr(fSimulatedCodebase, '/');
@@ -169,7 +168,6 @@ nsJVMPluginTagInfo::GetCodeBase(const char* *result)
*(lastSlash + 1) = '\0';
}
- PA_UNLOCK(docBase);
*result = fSimulatedCodebase;
return NS_OK;
}
diff --git a/mozilla/modules/plugin/base/public/npapi.h b/mozilla/modules/plugin/base/public/npapi.h
index f7b0955c8c7..05179551407 100644
--- a/mozilla/modules/plugin/base/public/npapi.h
+++ b/mozilla/modules/plugin/base/public/npapi.h
@@ -38,7 +38,7 @@
/*
- * npapi.h $Revision: 3.22 $
+ * npapi.h $Revision: 3.23 $
* Netscape client plug-in API spec
*/
@@ -49,6 +49,24 @@
#pragma pack(1)
#endif
+#include "prtypes.h"
+/* Copied from xp_core.h */
+/* removed #ifdef for hpux defined in /usr/include/model.h */
+#ifndef XP_MAC
+#ifndef _INT16
+#define _INT16
+#endif
+#ifndef _INT32
+#define _INT32
+#endif
+#ifndef _UINT16
+#define _UINT16
+#endif
+#ifndef _UINT32
+#define _UINT32
+#endif
+#endif
+
/*
* NO_NSPR_10_SUPPORT disables the inclusion
* of obsolete/protypes.h, whose int16, uint16,
@@ -97,7 +115,6 @@
#include
#endif
-
/*----------------------------------------------------------------------*/
/* Plugin Version Constants */
/*----------------------------------------------------------------------*/
diff --git a/mozilla/modules/plugin/base/src/ns4xPlugin.cpp b/mozilla/modules/plugin/base/src/ns4xPlugin.cpp
index 920beaade89..b4571634cec 100644
--- a/mozilla/modules/plugin/base/src/ns4xPlugin.cpp
+++ b/mozilla/modules/plugin/base/src/ns4xPlugin.cpp
@@ -37,7 +37,7 @@
// TODO: Implement Java callbacks
-#include "xp_core.h"
+#include "prtypes.h"
#include "nsplugin.h"
#include "ns4xPlugin.h"
#include "ns4xPluginInstance.h"
@@ -85,7 +85,7 @@ static NS_DEFINE_IID(kMemoryCID, NS_MEMORY_CID);
static NS_DEFINE_IID(kIMemoryIID, NS_IMEMORY_IID);
static NS_DEFINE_IID(kIPluginStreamListenerIID, NS_IPLUGINSTREAMLISTENER_IID);
-XP_BEGIN_PROTOS
+PR_BEGIN_EXTERN_C
////////////////////////////////////////////////////////////////////////
// Static stub functions that are exported to the 4.x plugin as entry
@@ -189,7 +189,7 @@ XP_BEGIN_PROTOS
#pragma pointers_in_A0
#endif
-XP_END_PROTOS
+PR_END_EXTERN_C
////////////////////////////////////////////////////////////////////////
diff --git a/mozilla/modules/plugin/base/src/nsIPluginHost.h b/mozilla/modules/plugin/base/src/nsIPluginHost.h
index 139a26acee5..39430761543 100644
--- a/mozilla/modules/plugin/base/src/nsIPluginHost.h
+++ b/mozilla/modules/plugin/base/src/nsIPluginHost.h
@@ -38,7 +38,6 @@
#ifndef nsIPluginHost_h___
#define nsIPluginHost_h___
-#include "xp_core.h"
#include "nsplugindefs.h"
#include "nsIFactory.h"
#include "nsString.h"
diff --git a/mozilla/modules/plugin/base/src/nsPluginHostImpl.h b/mozilla/modules/plugin/base/src/nsPluginHostImpl.h
index b54ca478689..3b25b782203 100644
--- a/mozilla/modules/plugin/base/src/nsPluginHostImpl.h
+++ b/mozilla/modules/plugin/base/src/nsPluginHostImpl.h
@@ -38,7 +38,6 @@
#ifndef nsPluginHostImpl_h__
#define nsPluginHostImpl_h__
-#include "xp_core.h"
#include "nsIPluginManager.h"
#include "nsIPluginManager2.h"
#include "nsIPluginHost.h"
diff --git a/mozilla/modules/plugin/base/src/nsPluginsDirUnix.cpp b/mozilla/modules/plugin/base/src/nsPluginsDirUnix.cpp
index fc1741756d9..3819e81d3b7 100644
--- a/mozilla/modules/plugin/base/src/nsPluginsDirUnix.cpp
+++ b/mozilla/modules/plugin/base/src/nsPluginsDirUnix.cpp
@@ -43,7 +43,6 @@
by Alex Musil
*/
-#include "xp_core.h"
#include "nsplugin.h"
#include "ns4xPlugin.h"
#include "ns4xPluginInstance.h"
diff --git a/mozilla/rdf/datasource/src/nsFileSystemDataSource.cpp b/mozilla/rdf/datasource/src/nsFileSystemDataSource.cpp
index 8466a275b97..64eb1fdf07f 100644
--- a/mozilla/rdf/datasource/src/nsFileSystemDataSource.cpp
+++ b/mozilla/rdf/datasource/src/nsFileSystemDataSource.cpp
@@ -52,10 +52,10 @@
#include "nsRDFCID.h"
#include "rdfutil.h"
#include "nsIRDFService.h"
-#include "xp_core.h"
#include "plhash.h"
#include "plstr.h"
#include "prlong.h"
+#include "prlog.h"
#include "prmem.h"
#include "prprf.h"
#include "prio.h"
diff --git a/mozilla/xpcom/base/nsComObsolete.h b/mozilla/xpcom/base/nsComObsolete.h
index 66b051e6682..71af641b680 100644
--- a/mozilla/xpcom/base/nsComObsolete.h
+++ b/mozilla/xpcom/base/nsComObsolete.h
@@ -120,7 +120,13 @@
#define NS_END_EXTERN_C
#endif
+#define PUBLIC
+#define MODULE_PRIVATE
+#ifdef PRIVATE
+#undef PRIVATE
+#endif
+#define PRIVATE static
#ifdef __cplusplus
#include "nsDebug.h"
diff --git a/mozilla/xpcom/ds/nsQuickSort.cpp b/mozilla/xpcom/ds/nsQuickSort.cpp
index ad429ea3b2a..f243258f085 100644
--- a/mozilla/xpcom/ds/nsQuickSort.cpp
+++ b/mozilla/xpcom/ds/nsQuickSort.cpp
@@ -39,6 +39,7 @@
#include
#include "prtypes.h"
+#include "nsComObsolete.h"
#include "nsQuickSort.h"
NS_BEGIN_EXTERN_C
diff --git a/mozilla/xpcom/ds/nsQuickSort.h b/mozilla/xpcom/ds/nsQuickSort.h
index c8062b87a8c..76746560a05 100644
--- a/mozilla/xpcom/ds/nsQuickSort.h
+++ b/mozilla/xpcom/ds/nsQuickSort.h
@@ -43,12 +43,8 @@
#ifndef nsQuickSort_h___
#define nsQuickSort_h___
-#include "nscore.h"
#include "prtypes.h"
-/* Had to pull the following define out of xp_core.h
- * to avoid including xp_core.h.
- * That brought in too many header file dependencies.
- */
+#include "nsComObsolete.h"
NS_BEGIN_EXTERN_C
/**
diff --git a/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.cpp b/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.cpp
index 8b9336a37ee..1d765ce4354 100644
--- a/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.cpp
+++ b/mozilla/xpfe/components/bookmarks/src/nsBookmarksService.cpp
@@ -62,7 +62,6 @@
#include "prio.h"
#include "prlog.h"
#include "rdf.h"
-#include "xp_core.h"
#include "prlong.h"
#include "prtime.h"
#include "nsEnumeratorUtils.h"
diff --git a/mozilla/xpfe/components/related/src/nsRelatedLinksHandler.cpp b/mozilla/xpfe/components/related/src/nsRelatedLinksHandler.cpp
index 8ee62965506..e8ee4d147d7 100644
--- a/mozilla/xpfe/components/related/src/nsRelatedLinksHandler.cpp
+++ b/mozilla/xpfe/components/related/src/nsRelatedLinksHandler.cpp
@@ -67,7 +67,6 @@
#include "prmem.h"
#include "prprf.h"
#include "rdf.h"
-#include "xp_core.h"
#include "nsICharsetConverterManager.h"
#include "nsICharsetAlias.h"
diff --git a/mozilla/xpfe/components/search/src/nsInternetSearchService.cpp b/mozilla/xpfe/components/search/src/nsInternetSearchService.cpp
index 8e634eb82c4..0bd1f98f906 100755
--- a/mozilla/xpfe/components/search/src/nsInternetSearchService.cpp
+++ b/mozilla/xpfe/components/search/src/nsInternetSearchService.cpp
@@ -50,12 +50,12 @@
#include "nsVoidArray.h" // XXX introduces dependency on raptorbase
#include "nsXPIDLString.h"
#include "nsRDFCID.h"
-#include "xp_core.h"
#include "plhash.h"
#include "plstr.h"
#include "prmem.h"
#include "prprf.h"
#include "prio.h"
+#include "prlog.h"
#include "rdf.h"
#include "nsIDirectoryService.h"
#include "nsDirectoryServiceDefs.h"
diff --git a/mozilla/xpfe/components/search/src/nsLocalSearchService.cpp b/mozilla/xpfe/components/search/src/nsLocalSearchService.cpp
index 926eb89f274..e975f4eddb4 100755
--- a/mozilla/xpfe/components/search/src/nsLocalSearchService.cpp
+++ b/mozilla/xpfe/components/search/src/nsLocalSearchService.cpp
@@ -49,12 +49,12 @@
#include "nsXPIDLString.h"
#include "nsReadableUtils.h"
#include "nsUnicharUtils.h"
-#include "xp_core.h"
#include "plhash.h"
#include "plstr.h"
#include "prmem.h"
#include "prprf.h"
#include "prio.h"
+#include "prlog.h"
#include "nsITextToSubURI.h"
#include "nsIRDFObserver.h"
#include "nsRDFCID.h"