From ef069eb5f5f8acffba3174027c5143d10da25852 Mon Sep 17 00:00:00 2001 From: "law%netscape.com" Date: Sat, 12 Dec 1998 01:25:32 +0000 Subject: [PATCH] Add NS_BASE to cause export from dll on Windows --- base/public/nsFileSpec.h | 13 +++++++------ base/public/nsFileStream.h | 3 ++- xpcom/io/nsFileSpec.h | 13 +++++++------ xpcom/io/nsFileStream.h | 3 ++- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/base/public/nsFileSpec.h b/base/public/nsFileSpec.h index 1a2544c0ccd..823d2eeb962 100644 --- a/base/public/nsFileSpec.h +++ b/base/public/nsFileSpec.h @@ -103,6 +103,8 @@ #ifndef _FILESPEC_H_ #define _FILESPEC_H_ +#include "nscore.h" + //======================================================================================== // Compiler-specific macros, as needed //======================================================================================== @@ -117,7 +119,6 @@ #define NS_NAMESPACE_END #include using std::ostream; - #else #define NS_NAMESPACE_PROTOTYPE static @@ -144,7 +145,7 @@ class nsNativeFileSpec; #define kFileURLPrefixLength (7) //======================================================================================== -class nsNativeFileSpec +class NS_BASE nsNativeFileSpec // This is whatever each platform really prefers to describe files as. Declared first // because the other two types have an embeded nsNativeFileSpec object. //======================================================================================== @@ -195,7 +196,7 @@ class nsNativeFileSpec bool Valid() const { return true; } // Fixme. #endif // XP_MAC - friend ostream& operator << (ostream& s, const nsNativeFileSpec& spec); + friend NS_BASE ostream& operator << (ostream& s, const nsNativeFileSpec& spec); char* GetLeafName() const; // Allocated. Use delete []. void SetLeafName(const char* inLeafName); @@ -214,7 +215,7 @@ class nsNativeFileSpec }; // class nsNativeFileSpec //======================================================================================== -class nsFileURL +class NS_BASE nsFileURL // This is an escaped string that looks like "file:///foo/bar/mumble%20fish". Since URLs // are the standard way of doing things in mozilla, this allows a string constructor, // which just stashes the string with no conversion. @@ -236,7 +237,7 @@ class nsFileURL void operator = (const nsFilePath& inOther); void operator = (const nsNativeFileSpec& inOther); - friend ostream& operator << (ostream& s, const nsFileURL& spec); + friend NS_BASE ostream& operator << (ostream& s, const nsFileURL& spec); #ifdef XP_MAC // Accessor to allow quick assignment to a mNativeFileSpec @@ -257,7 +258,7 @@ class nsFileURL }; // class nsFileURL //======================================================================================== -class nsFilePath +class NS_BASE nsFilePath // This is a string that looks like "/foo/bar/mumble%20fish". Same as nsFileURL, but // without the "file:// prefix". //======================================================================================== diff --git a/base/public/nsFileStream.h b/base/public/nsFileStream.h index 20bceedf0f9..582f1275fd7 100644 --- a/base/public/nsFileStream.h +++ b/base/public/nsFileStream.h @@ -72,6 +72,7 @@ #ifndef _FILESTREAM_H_ #define _FILESTREAM_H_ +#include "nscore.h" #ifdef XP_MAC #include "pprio.h" // To get PR_ImportFile @@ -144,7 +145,7 @@ NS_NAMESPACE nsFileStreamHelpers // need the template args (charT, traits). //======================================================================================== { - NS_NAMESPACE_PROTOTYPE PRFileDesc* open( + NS_NAMESPACE_PROTOTYPE NS_BASE PRFileDesc* open( const nsFilePath& inFile, IOS_BASE::openmode mode, PRIntn accessMode); diff --git a/xpcom/io/nsFileSpec.h b/xpcom/io/nsFileSpec.h index 1a2544c0ccd..823d2eeb962 100644 --- a/xpcom/io/nsFileSpec.h +++ b/xpcom/io/nsFileSpec.h @@ -103,6 +103,8 @@ #ifndef _FILESPEC_H_ #define _FILESPEC_H_ +#include "nscore.h" + //======================================================================================== // Compiler-specific macros, as needed //======================================================================================== @@ -117,7 +119,6 @@ #define NS_NAMESPACE_END #include using std::ostream; - #else #define NS_NAMESPACE_PROTOTYPE static @@ -144,7 +145,7 @@ class nsNativeFileSpec; #define kFileURLPrefixLength (7) //======================================================================================== -class nsNativeFileSpec +class NS_BASE nsNativeFileSpec // This is whatever each platform really prefers to describe files as. Declared first // because the other two types have an embeded nsNativeFileSpec object. //======================================================================================== @@ -195,7 +196,7 @@ class nsNativeFileSpec bool Valid() const { return true; } // Fixme. #endif // XP_MAC - friend ostream& operator << (ostream& s, const nsNativeFileSpec& spec); + friend NS_BASE ostream& operator << (ostream& s, const nsNativeFileSpec& spec); char* GetLeafName() const; // Allocated. Use delete []. void SetLeafName(const char* inLeafName); @@ -214,7 +215,7 @@ class nsNativeFileSpec }; // class nsNativeFileSpec //======================================================================================== -class nsFileURL +class NS_BASE nsFileURL // This is an escaped string that looks like "file:///foo/bar/mumble%20fish". Since URLs // are the standard way of doing things in mozilla, this allows a string constructor, // which just stashes the string with no conversion. @@ -236,7 +237,7 @@ class nsFileURL void operator = (const nsFilePath& inOther); void operator = (const nsNativeFileSpec& inOther); - friend ostream& operator << (ostream& s, const nsFileURL& spec); + friend NS_BASE ostream& operator << (ostream& s, const nsFileURL& spec); #ifdef XP_MAC // Accessor to allow quick assignment to a mNativeFileSpec @@ -257,7 +258,7 @@ class nsFileURL }; // class nsFileURL //======================================================================================== -class nsFilePath +class NS_BASE nsFilePath // This is a string that looks like "/foo/bar/mumble%20fish". Same as nsFileURL, but // without the "file:// prefix". //======================================================================================== diff --git a/xpcom/io/nsFileStream.h b/xpcom/io/nsFileStream.h index 20bceedf0f9..582f1275fd7 100644 --- a/xpcom/io/nsFileStream.h +++ b/xpcom/io/nsFileStream.h @@ -72,6 +72,7 @@ #ifndef _FILESTREAM_H_ #define _FILESTREAM_H_ +#include "nscore.h" #ifdef XP_MAC #include "pprio.h" // To get PR_ImportFile @@ -144,7 +145,7 @@ NS_NAMESPACE nsFileStreamHelpers // need the template args (charT, traits). //======================================================================================== { - NS_NAMESPACE_PROTOTYPE PRFileDesc* open( + NS_NAMESPACE_PROTOTYPE NS_BASE PRFileDesc* open( const nsFilePath& inFile, IOS_BASE::openmode mode, PRIntn accessMode);