Export functions on Mac (only) because it builds Netwerk Util as a shared library, not as static as on the other platforms.

This commit is contained in:
gordon%netscape.com 1999-07-23 01:50:58 +00:00
Родитель 7d1593ba6c
Коммит 264c3db8b2
3 изменённых файлов: 16 добавлений и 10 удалений

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

@ -27,6 +27,12 @@
#include "nsIEventSinkGetter.h"
#include "nsString.h"
#ifdef XP_MAC
#define NECKO_EXPORT(returnType) PR_PUBLIC_API(returnType)
#else
#define NECKO_EXPORT(returnType) returnType
#endif
// Warning: These functions should NOT be defined with NS_NET because
// the intention is that they'll be linked with the library/DLL that
// uses them. NS_NET is for DLL imports.

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

@ -26,7 +26,7 @@
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
nsresult
NECKO_EXPORT(nsresult)
NS_NewURI(nsIURI* *result, const char* spec, nsIURI* baseURI)
{
nsresult rv;
@ -37,7 +37,7 @@ NS_NewURI(nsIURI* *result, const char* spec, nsIURI* baseURI)
return rv;
}
nsresult
NECKO_EXPORT(nsresult)
NS_NewURI(nsIURI* *result, const nsString& spec, nsIURI* baseURI)
{
// XXX if the string is unicode, GetBuffer() returns null.
@ -51,7 +51,7 @@ NS_NewURI(nsIURI* *result, const nsString& spec, nsIURI* baseURI)
return rv;
}
nsresult
NECKO_EXPORT(nsresult)
NS_OpenURI(nsIChannel* *result, nsIURI* uri)
{
nsresult rv;
@ -66,7 +66,7 @@ NS_OpenURI(nsIChannel* *result, nsIURI* uri)
return rv;
}
nsresult
NECKO_EXPORT(nsresult)
NS_OpenURI(nsIInputStream* *result, nsIURI* uri)
{
nsresult rv;
@ -84,7 +84,7 @@ NS_OpenURI(nsIInputStream* *result, nsIURI* uri)
return rv;
}
nsresult
NECKO_EXPORT(nsresult)
NS_OpenURI(nsIStreamListener* aConsumer, nsISupports* context, nsIURI* uri)
{
nsresult rv;
@ -98,7 +98,7 @@ NS_OpenURI(nsIStreamListener* aConsumer, nsISupports* context, nsIURI* uri)
return rv;
}
nsresult
NECKO_EXPORT(nsresult)
NS_MakeAbsoluteURI(const char* spec, nsIURI* baseURI, char* *result)
{
nsresult rv;
@ -108,7 +108,7 @@ NS_MakeAbsoluteURI(const char* spec, nsIURI* baseURI, char* *result)
return serv->MakeAbsolute(spec, baseURI, result);
}
nsresult
NECKO_EXPORT(nsresult)
NS_MakeAbsoluteURI(const nsString& spec, nsIURI* baseURI, nsString& result)
{
char* resultStr;
@ -124,7 +124,7 @@ NS_MakeAbsoluteURI(const nsString& spec, nsIURI* baseURI, nsString& result)
return rv;
}
nsresult
NECKO_EXPORT(nsresult)
NS_NewLoadGroup(nsISupports* outer, nsIStreamObserver* observer,
nsILoadGroup* parent, nsILoadGroup* *result)
{
@ -135,7 +135,7 @@ NS_NewLoadGroup(nsISupports* outer, nsIStreamObserver* observer,
return serv->NewLoadGroup(outer, observer, parent, result);
}
nsresult
NECKO_EXPORT(nsresult)
NS_NewPostDataStream(PRBool isFile, const char *data, PRUint32 encodeFlags,
nsIInputStream **result)
{

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

@ -195,7 +195,7 @@ nsUnicharStreamLoader::OnDataAvailable(nsIChannel* channel, nsISupports *ctxt,
return rv;
}
extern nsresult
extern NECKO_EXPORT(nsresult)
NS_NewUnicharStreamLoader(nsIUnicharStreamLoader** aInstancePtrResult,
nsIURI* aURL,
nsILoadGroup* aLoadGroup,