diff --git a/network/cache/mkcache.c b/network/cache/mkcache.c index 4ba1c471fb0..98eb8e2c7ef 100644 --- a/network/cache/mkcache.c +++ b/network/cache/mkcache.c @@ -491,7 +491,7 @@ net_CacheStore(net_CacheObject * obj, /* URL_s is now updated from META tags etc. so re-read this information */ } - + return TRUE; } #else { @@ -855,7 +855,7 @@ net_CacheStore(net_CacheObject * obj, #endif /* NU_CACHE */ /* Public accesor function for Netcaster */ -PUBLIC PRBool +static PRBool NET_CacheStore(net_CacheObject * obj, URL_Struct * URL_s, PRBool accept_partial_files) diff --git a/network/cache/mkextcac.c b/network/cache/mkextcac.c index 5689501593c..da3544f2d95 100644 --- a/network/cache/mkextcac.c +++ b/network/cache/mkextcac.c @@ -1068,7 +1068,7 @@ CACHE_FindURLInCache(URL_Struct *URL_s, MWContext *ctxt) XP_List *list_ptr; /* larubbio */ - XP_FileType fileType = 0; + XP_FileType fileType = (XP_FileType)0; TRACEMSG(("Checking for URL in external cache")); diff --git a/network/cache/mkmemcac.c b/network/cache/mkmemcac.c index 6efd44b499a..46d2079d6f7 100644 --- a/network/cache/mkmemcac.c +++ b/network/cache/mkmemcac.c @@ -1182,7 +1182,7 @@ MODULE_PRIVATE int NET_FindURLInMemCache(URL_Struct * URL_s, MWContext *ctxt) #ifdef NU_CACHE { - PR_ASSERT(0); /* Should not be getting called */ + PR_ASSERT(0); /* Should not be getting called. Also, compiler will warn of missing prototype */ return 0; } #else @@ -2039,7 +2039,7 @@ net_CleanupMemoryCacheProtocol(void) } void -NET_InitMemCacProtocol(void) +NET_InitMemCacProtocol(void) /* no prototype when NU_CACHE */ { static NET_ProtoImpl mem_cac_proto_impl; #ifdef NU_CACHE diff --git a/network/cache/mkmemcac.h b/network/cache/mkmemcac.h index 30b1dbfac10..f9fe9c7b4ec 100644 --- a/network/cache/mkmemcac.h +++ b/network/cache/mkmemcac.h @@ -61,8 +61,13 @@ NET_NextMemCacheObject(XP_List* list_ptr); #ifndef NU_CACHE MODULE_PRIVATE int NET_FindURLInMemCache(URL_Struct * URL_s, MWContext *ctxt); MODULE_PRIVATE void NET_DisplayMemCacheInfoAsHTML(ActiveEntry * cur_entry); -void NET_InitMemCacProtocol(void); +#endif + +#ifdef NU_CACHE +extern void NET_InitNuCacheProtocol(void); +#else +extern void NET_InitMemCacProtocol(void); #endif #endif /* MK_MEMORY_CACHE_H */ diff --git a/network/module/nsNetStream.cpp b/network/module/nsNetStream.cpp index c3c7dc24805..99af99e39b8 100644 --- a/network/module/nsNetStream.cpp +++ b/network/module/nsNetStream.cpp @@ -27,7 +27,7 @@ /* XXX: Declare NET_PollSockets(...) for the blocking stream hack... */ extern "C" { XP_Bool NET_PollSockets(void); -}; +} NS_DEFINE_IID(kIInputStreamIID, NS_IINPUTSTREAM_IID); diff --git a/network/module/nsNetStubs.cpp b/network/module/nsNetStubs.cpp index eee63d44a00..cd33a46288a 100644 --- a/network/module/nsNetStubs.cpp +++ b/network/module/nsNetStubs.cpp @@ -59,7 +59,7 @@ static nsVoidArray switchBack; extern "C" { #include "secnav.h" #include "preenc.h" -}; +} /* From libimg */ #define OPAQUE_CONTEXT void @@ -301,14 +301,14 @@ PUBLIC void INTL_CCCReportMetaCharsetTag(MWContext *context, char *charset_tag) * From ns/cmd/winfe/authdll.cpp *--------------------------------------------------------------------------- */ -char * WFE_BuildCompuserveAuthString(URL_Struct *URL_s) +static char * WFE_BuildCompuserveAuthString(URL_Struct *URL_s) { MOZ_FUNCTION_STUB; return NULL; } -int +static int WFE_DoCompuserveAuthenticate(MWContext *context, URL_Struct *URL_s, char *authenticate_header_value) @@ -514,7 +514,6 @@ Bool XP_IsContextInList(MWContext *context) return FALSE; } - /* *--------------------------------------------------------------------------- * From ns/lib/xp/xplocale.c @@ -528,13 +527,14 @@ size_t XP_StrfTime(MWContext* context, char *result, size_t maxsize, int format, return 0; } + /* *--------------------------------------------------------------------------- * From ns/lib/layout/edtutil.cpp *--------------------------------------------------------------------------- */ -void EDT_SavePublishUsername(MWContext *pContext, char *pAddress, char *pUsername) +static void EDT_SavePublishUsername(MWContext *pContext, char *pAddress, char *pUsername) { MOZ_FUNCTION_STUB; } @@ -614,7 +614,7 @@ IL_Type(const char *buf, int32 len) * Create an HTML stream and generate HTML describing * the image cache. Use "about:memory-cache" URL to acess. */ -int +static int IL_DisplayMemCacheInfoAsHTML(FO_Present_Types format_out, URL_Struct *urls, OPAQUE_CONTEXT *cx) { @@ -650,7 +650,7 @@ IL_SetCacheSize(uint32 new_size) * From ns/modules/libimg/src/external.c *--------------------------------------------------------------------------- */ -NET_StreamClass * +static NET_StreamClass * IL_ViewStream(FO_Present_Types format_out, void *newshack, URL_Struct *urls, OPAQUE_CONTEXT *cx) { @@ -2178,4 +2178,4 @@ void RDF_AddCookieResource(char* name, char* path, char* host, char* expires) } -}; /* end of extern "C" */ +} /* end of extern "C" */ diff --git a/network/module/nsNetThread.cpp b/network/module/nsNetThread.cpp index 7cbc4d5132c..e320e9cdf00 100644 --- a/network/module/nsNetThread.cpp +++ b/network/module/nsNetThread.cpp @@ -29,6 +29,7 @@ #include "nsIInputStream.h" #include "nsIURL.h" #include "nsString.h" +#include "nsIRelatedLinks.h" extern "C" { #include "mkutils.h" @@ -50,8 +51,6 @@ extern "C" { #include "cvactive.h" #include "nsCRT.h" -void RL_Init(); - PUBLIC NET_StreamClass * NET_NGLayoutConverter(FO_Present_Types format_out, void *converter_obj, @@ -60,7 +59,7 @@ NET_NGLayoutConverter(FO_Present_Types format_out, void net_AddrefContext(MWContext *context); void net_ReleaseContext(MWContext *context); -}; /* end of extern "C" */ +} /* end of extern "C" */ #if defined(XP_PC) void net_InitAsyncDNS(); @@ -807,7 +806,7 @@ nsStreamListenerProxy::~nsStreamListenerProxy() NS_RELEASE(mRealListener); } -nsIStreamListener* ns_NewStreamListenerProxy(nsIStreamListener* aListener, +static nsIStreamListener* ns_NewStreamListenerProxy(nsIStreamListener* aListener, PLEventQueue* aEventQ) { return new nsStreamListenerProxy(aListener, aEventQ); diff --git a/network/module/nsStubContext.cpp b/network/module/nsStubContext.cpp index 70a633d571e..a45b154f03d 100644 --- a/network/module/nsStubContext.cpp +++ b/network/module/nsStubContext.cpp @@ -15,7 +15,7 @@ * Copyright (C) 1998 Netscape Communications Corporation. All Rights * Reserved. */ - +#include "nsStubContext.h" #include "net.h" #include "mktrace.h" @@ -23,6 +23,8 @@ #include "ctxtfunc.h" #include "xp_list.h" #include "plstr.h" +#include "fe_proto.h" // Needed for prototype of FE_Alert(). +#include "proto.h" // Needed for prototype of XP_FindContextOfType(). #include "nsString.h" #include "nsIStreamListener.h" @@ -678,6 +680,12 @@ unsigned int stub_is_write_ready(NET_StreamClass *stream) extern "C" { +PUBLIC NET_StreamClass * +NET_NGLayoutConverter(FO_Present_Types format_out, + void *converter_obj, + URL_Struct *URL_s, + MWContext *context); + /* *Find a converter routine to create a stream and return the stream struct */ @@ -774,4 +782,4 @@ NET_NGLayoutConverter(FO_Present_Types format_out, return stream; } -}; /* extern "C" */ +} /* extern "C" */