Added all the nucache files to the memory module project (as a group) so that NU_CACHE can be turned on with a flick of the wrist, made the modular memory library build with the NU_CACHE flag turned on, fixed build warnings and errors. The NU_CACHE flag is still OFF, because the database code doesn't exist for Macintosh or Unix :-(

This commit is contained in:
mcmullen%netscape.com 1999-01-14 23:27:36 +00:00
Родитель 24b4daf09f
Коммит a1febb5a7a
8 изменённых файлов: 33 добавлений и 21 удалений

4
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)

2
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"));

4
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

7
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 */

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

@ -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);

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

@ -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" */

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

@ -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);

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

@ -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" */