зеркало из https://github.com/mozilla/gecko-dev.git
changes to get the nntpTest building again on Linux
This commit is contained in:
Родитель
f973c46a0f
Коммит
e62445398f
|
@ -25,8 +25,7 @@ include $(DEPTH)/config/autoconf.mk
|
||||||
MODULE=nntp
|
MODULE=nntp
|
||||||
LIBRARY_NAME=nntpTest
|
LIBRARY_NAME=nntpTest
|
||||||
|
|
||||||
# DIRS = nntp
|
DIRS = nntp newsParser
|
||||||
DIRS = newsParser
|
|
||||||
|
|
||||||
EXPORTS = \
|
EXPORTS = \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
|
@ -122,11 +122,11 @@ nsresult newsTestDriver::RunDriver()
|
||||||
nsresult newsTestDriver::GetPath(nsFileSpec& aPathName)
|
nsresult newsTestDriver::GetPath(nsFileSpec& aPathName)
|
||||||
{
|
{
|
||||||
/* eventually turn news://news.mozilla.org/netscape.public.mozilla.unix
|
/* eventually turn news://news.mozilla.org/netscape.public.mozilla.unix
|
||||||
into /tmp/mozillanews/news.mozilla.org/netscape.public.mozilla.unix
|
into /u/sspitzer/mozillanews/news.mozilla.org/netscape.public.mozilla.unix
|
||||||
getting /tmp/mozillanews from the account manager (which gets it
|
getting /u/sspitzer/mozillanews from the account manager (which gets it
|
||||||
from the prefs
|
from the prefs
|
||||||
*/
|
*/
|
||||||
aPathName = "/tmp/mozillanews/news.mozilla.org/netscape.public.mozilla.unix";
|
aPathName = "/u/sspitzer/mozillanews/news.mcom.com.sbd/mcom.linux";
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,19 +53,22 @@ LIBS = \
|
||||||
-lmozdbm \
|
-lmozdbm \
|
||||||
-lxp \
|
-lxp \
|
||||||
-lpref \
|
-lpref \
|
||||||
-ljs \
|
-lmozjs \
|
||||||
-lraptorbase \
|
-lraptorbase \
|
||||||
-lgmbase$(MOZ_TOOLKIT) \
|
-lgmbase$(MOZ_TOOLKIT) \
|
||||||
-lsecfree \
|
-lsecfree \
|
||||||
-lraptorhtml \
|
-lraptorhtml \
|
||||||
-lraptorhtmlpars \
|
-lraptorhtmlpars \
|
||||||
-lraptorgfx \
|
-lexpat \
|
||||||
|
-lxmltok \
|
||||||
|
-lraptorgfx \
|
||||||
-ljsdom \
|
-ljsdom \
|
||||||
-ljsurl \
|
-ljsurl \
|
||||||
-limg \
|
-limg \
|
||||||
-lpng \
|
-lpng \
|
||||||
-ljpeg \
|
-ljpeg \
|
||||||
-lmozutil \
|
-lmozutil \
|
||||||
|
-lmsgbaseutil \
|
||||||
$(ZLIB_LIBS) \
|
$(ZLIB_LIBS) \
|
||||||
$(DIST)/lib/librdfbase_s.a \
|
$(DIST)/lib/librdfbase_s.a \
|
||||||
$(NSPR_LIBS) \
|
$(NSPR_LIBS) \
|
||||||
|
|
|
@ -62,12 +62,14 @@
|
||||||
#ifdef XP_PC
|
#ifdef XP_PC
|
||||||
#define NETLIB_DLL "netlib.dll"
|
#define NETLIB_DLL "netlib.dll"
|
||||||
#define XPCOM_DLL "xpcom32.dll"
|
#define XPCOM_DLL "xpcom32.dll"
|
||||||
|
#define NEWS_DLL "msgnews.dll"
|
||||||
#else
|
#else
|
||||||
#ifdef XP_MAC
|
#ifdef XP_MAC
|
||||||
#include "nsMacRepository.h"
|
#include "nsMacRepository.h"
|
||||||
#else
|
#else
|
||||||
#define NETLIB_DLL "libnetlib.so"
|
#define NETLIB_DLL "libnetlib.so"
|
||||||
#define XPCOM_DLL "libxpcom.so"
|
#define XPCOM_DLL "libxpcom.so"
|
||||||
|
#define NEWS_DLL "libmsgnews.so"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -77,6 +79,7 @@
|
||||||
|
|
||||||
static NS_DEFINE_CID(kNetServiceCID, NS_NETSERVICE_CID);
|
static NS_DEFINE_CID(kNetServiceCID, NS_NETSERVICE_CID);
|
||||||
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
|
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
|
||||||
|
static NS_DEFINE_CID(kNntpUrlCID, NS_NNTPURL_CID);
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
// Define default values to be used to drive the test
|
// Define default values to be used to drive the test
|
||||||
|
@ -218,8 +221,14 @@ nsNntpTestDriver::nsNntpTestDriver(nsINetService * pNetService,
|
||||||
|
|
||||||
void nsNntpTestDriver::InitializeProtocol(const char * urlString)
|
void nsNntpTestDriver::InitializeProtocol(const char * urlString)
|
||||||
{
|
{
|
||||||
|
nsresult rv = NS_OK;
|
||||||
|
|
||||||
// this is called when we don't have a url nor a protocol instance yet...
|
// this is called when we don't have a url nor a protocol instance yet...
|
||||||
NS_NewNntpUrl(&m_url, urlString);
|
rv = nsServiceManager::GetService(kNntpUrlCID,
|
||||||
|
nsINntpUrl::GetIID(),
|
||||||
|
(nsISupports**)&m_url);
|
||||||
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
// now create a protocl instance...
|
// now create a protocl instance...
|
||||||
m_nntpProtocol = new nsNNTPProtocol(m_url, m_transport);
|
m_nntpProtocol = new nsNNTPProtocol(m_url, m_transport);
|
||||||
m_protocolInitialized = PR_TRUE;
|
m_protocolInitialized = PR_TRUE;
|
||||||
|
@ -655,6 +664,7 @@ int main()
|
||||||
|
|
||||||
nsComponentManager::RegisterComponent(kNetServiceCID, NULL, NULL, NETLIB_DLL, PR_FALSE, PR_FALSE);
|
nsComponentManager::RegisterComponent(kNetServiceCID, NULL, NULL, NETLIB_DLL, PR_FALSE, PR_FALSE);
|
||||||
nsComponentManager::RegisterComponent(kEventQueueServiceCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE);
|
nsComponentManager::RegisterComponent(kEventQueueServiceCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE);
|
||||||
|
nsComponentManager::RegisterComponent(kNntpUrlCID, NULL, NULL, NEWS_DLL, PR_FALSE, PR_FALSE);
|
||||||
|
|
||||||
// Create the Event Queue for this thread...
|
// Create the Event Queue for this thread...
|
||||||
nsIEventQueueService* pEventQService;
|
nsIEventQueueService* pEventQService;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче