From 5fc1abd8ef1e6a0224fabda6f7c546fb7bc952b6 Mon Sep 17 00:00:00 2001 From: "mkaply%us.ibm.com" Date: Tue, 29 Feb 2000 15:50:48 +0000 Subject: [PATCH] # 25555 r= dp@netscape.com OS/2 changes for Mozilla - add #ifdef, change #ifdef --- xpcom/base/nsCom.h | 6 +++--- xpcom/base/nsError.h | 2 +- xpcom/base/nsISupportsUtils.h | 2 +- xpcom/base/nscore.h | 6 +++++- xpcom/glue/nsISupportsUtils.h | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/xpcom/base/nsCom.h b/xpcom/base/nsCom.h index 2c6271ff382b..3a28baa76d05 100644 --- a/xpcom/base/nsCom.h +++ b/xpcom/base/nsCom.h @@ -28,7 +28,7 @@ */ #ifdef _IMPL_NS_COM -#ifdef XP_PC +#if defined(XP_PC) && !defined(XP_OS2) #define NS_COM _declspec(dllexport) #elif defined(XP_MAC) #define NS_COM __declspec(export) @@ -36,7 +36,7 @@ #define NS_COM #endif /* !XP_PC */ #else /* !_IMPL_NS_COM */ -#ifdef XP_PC +#if defined(XP_PC) && !defined(XP_OS2) #define NS_COM _declspec(dllimport) #else /* !XP_PC */ #define NS_COM @@ -47,7 +47,7 @@ * DLL Export macro */ -#if defined(XP_PC) +#if defined(XP_PC) && !defined(XP_OS2) #define NS_EXPORT _declspec(dllexport) #define NS_EXPORT_(type) type _declspec(dllexport) __stdcall diff --git a/xpcom/base/nsError.h b/xpcom/base/nsError.h index 25b933541ef6..9eba60c43ab2 100644 --- a/xpcom/base/nsError.h +++ b/xpcom/base/nsError.h @@ -262,7 +262,7 @@ NS_ErrorAccordingToNSPR(); //////////////////////////////////////////////////////////////////////////////// -#ifdef XP_PC +#if defined(XP_PC) && !defined(XP_OS2) #pragma warning(disable: 4251) // 'nsCOMPtr' needs to have dll-interface to be used by clients of class 'nsInputStream' #pragma warning(disable: 4275) // non dll-interface class 'nsISupports' used as base for dll-interface class 'nsIRDFNode' #endif diff --git a/xpcom/base/nsISupportsUtils.h b/xpcom/base/nsISupportsUtils.h index eff62c28a58f..efabb2d4535b 100644 --- a/xpcom/base/nsISupportsUtils.h +++ b/xpcom/base/nsISupportsUtils.h @@ -64,7 +64,7 @@ * To maintain binary compatibility of nsISupports with nsIUnknown, we are * doing this ifdeffing. */ -#if defined(XP_PC) && PR_BYTES_PER_LONG == 4 +#if defined(XP_PC) && !defined(XP_OS2) && PR_BYTES_PER_LONG == 4 typedef unsigned long nsrefcnt; #else typedef PRUint32 nsrefcnt; diff --git a/xpcom/base/nscore.h b/xpcom/base/nscore.h index d52b94ae5ec1..152e2f79e08b 100644 --- a/xpcom/base/nscore.h +++ b/xpcom/base/nscore.h @@ -30,6 +30,10 @@ #define NS_UNIX 1 #endif +#if defined(XP_OS2) +#define NS_OS2 1 +#endif + #include "prtypes.h" #ifdef __cplusplus @@ -175,7 +179,7 @@ typedef PRUint16 PRUnichar; #endif /* unix and beos now determine this automatically */ -#if ! defined XP_UNIX && ! defined XP_BEOS +#if ! defined XP_UNIX && ! defined XP_BEOS && !defined(XP_OS2) #define HAVE_CPP_NEW_CASTS /* we'll be optimistic. */ #endif diff --git a/xpcom/glue/nsISupportsUtils.h b/xpcom/glue/nsISupportsUtils.h index eff62c28a58f..efabb2d4535b 100644 --- a/xpcom/glue/nsISupportsUtils.h +++ b/xpcom/glue/nsISupportsUtils.h @@ -64,7 +64,7 @@ * To maintain binary compatibility of nsISupports with nsIUnknown, we are * doing this ifdeffing. */ -#if defined(XP_PC) && PR_BYTES_PER_LONG == 4 +#if defined(XP_PC) && !defined(XP_OS2) && PR_BYTES_PER_LONG == 4 typedef unsigned long nsrefcnt; #else typedef PRUint32 nsrefcnt;