From 003d4826200904297157e3d2e664b3733f30bc0c Mon Sep 17 00:00:00 2001 From: "beard%netscape.com" Date: Tue, 22 Sep 1998 22:46:18 +0000 Subject: [PATCH] Defining NS_EXPORT, et. al. for XP_MAC. --- base/src/nscore.h | 8 +++++ xpcom/src/nsCom.h | 74 ----------------------------------------------- 2 files changed, 8 insertions(+), 74 deletions(-) diff --git a/base/src/nscore.h b/base/src/nscore.h index 8407d267c70..bd7859b8410 100644 --- a/base/src/nscore.h +++ b/base/src/nscore.h @@ -64,6 +64,14 @@ typedef PRUcs2 PRUnichar; // is placed. It needs to be done this way to make the 4.x compiler happy... #undef NS_EXPORT_ #define NS_EXPORT_(type) type _declspec(dllexport) __stdcall +#elif defined(XP_MAC) + +#define NS_IMPORT __declspec(import) +#define NS_IMPORT_(type) __declspec(import) type + +#define NS_EXPORT __declspec(export) +#define NS_EXPORT_(type) __declspec(export) type + #else /* XXX do something useful? */ #define NS_IMPORT diff --git a/xpcom/src/nsCom.h b/xpcom/src/nsCom.h index 75272385c35..e69de29bb2d 100644 --- a/xpcom/src/nsCom.h +++ b/xpcom/src/nsCom.h @@ -1,74 +0,0 @@ -/* -*- 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. - */ - -#ifndef nsCom_h__ -#define nsCom_h__ - -/* - * API Import/Export macros - */ - -#ifdef _IMPL_NS_COM -#ifdef XP_PC -#define NS_COM _declspec(dllexport) -#else /* !XP_PC */ -#define NS_COM -#endif /* !XP_PC */ -#else /* !_IMPL_NS_COM */ -#ifdef XP_PC -#define NS_COM _declspec(dllimport) -#else /* !XP_PC */ -#define NS_COM -#endif /* !XP_PC */ -#endif /* !_IMPL_NS_COM */ - -/* - * DLL Export macro - */ - -#ifdef XP_PC - -#define NS_EXPORT _declspec(dllexport) -#define NS_EXPORT_(type) _declspec(dllexport) type __stdcall - -#define NS_IMETHOD_(type) virtual type __stdcall -#define NS_IMETHOD virtual nsresult __stdcall -#define NS_IMETHODIMP_(type) type __stdcall -#define NS_IMETHODIMP nsresult __stdcall - -#define NS_METHOD_(type) type __stdcall -#define NS_METHOD nsresult __stdcall - -#else /* !XP_PC */ - -#define NS_EXPORT -#define NS_EXPORT_(type) type - -#define NS_IMETHOD_(type) virtual type -#define NS_IMETHOD virtual nsresult -#define NS_IMETHODIMP_(type) type -#define NS_IMETHODIMP nsresult - -#define NS_METHOD_(type) type -#define NS_METHOD nsresult - -#endif /* !XP_PC */ - -#endif - -