Landing modular netlib on UNIX

This commit is contained in:
scullin 1998-06-02 00:23:17 +00:00
Родитель f1f2f7205b
Коммит f122c938a6
15 изменённых файлов: 114 добавлений и 127 удалений

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

@ -480,6 +480,10 @@ ifdef STANDALONE_IMAGE_LIB
DEFINES += -DSTANDALONE_IMAGE_LIB
endif
ifdef MODULAR_NETLIB
DEFINES += -DMODULAR_NETLIB
endif
######################################################################
GARBAGE = $(DEPENDENCIES) core $(wildcard core.[0-9]*)

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

@ -22,13 +22,14 @@ DEPTH = ../..
MODULE = xp
LIBRARY_NAME = xp
CSRCS = xp_alloc.c \
ifndef MODULAR_NETLIB
CSRCS = \
xp_alloc.c \
xp_cntxt.c \
xp_core.c \
xp_error.c \
xp_file.c \
xp_hash.c \
xp_list.c \
xp_intl.c \
xp_ncent.c \
xp_reg.c \
xp_rgb.c \
@ -41,11 +42,18 @@ CSRCS = xp_alloc.c \
xpassert.c \
xplocale.c \
$(NULL)
else
CSRCS = xp_stub.c
endif
CSRCS += \
xp_file.c \
xp_list.c \
allxpstr.c \
$(NULL)
REQUIRES = js nspr dbm security img util jtools layer java lay style pref rdf
CSRCS += allxpstr.c xp_intl.c
ifeq ($(STAND_ALONE_JAVA),1)
CSRCS = xp_qsort.c
endif

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

@ -24,8 +24,13 @@ DIRS = \
cache \
client \
cnvts \
mimetype \
main \
protocol \
protocol
ifdef MODULAR_NETLIB
DIRS += module
endif
include $(DEPTH)/config/rules.mk

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

@ -27,14 +27,19 @@ CSRCS = \
cvdisk.c \
cvextcon.c \
cvjscfg.c \
cvmime.c \
cvpics.c \
cvsimple.c \
cvunzip.c \
cvview.c \
txview.c \
$(NULL)
ifndef MODULAR_NETLIB
CSRCS += \
cvmime.c \
cvpics.c \
$(NULL)
endif
EXPORTS= \
cvactive.h \
cvview.h \
@ -44,13 +49,18 @@ EXPORTS= \
cvchunk.h \
cvcolor.h \
cvdisk.h \
cvmime.h \
cvpics.h \
cvsimple.h \
cvunzip.h \
cvjscfg.h
ifndef MODULAR_NETLIB
EXPORTS += \
cvmime.h \
cvpics.h \
$(NULL)
endif
REQUIRES = network img lay layer util parse pref js \
security marimurl style zlib softupdt
security marimurl style zlib softupdt mimetype
include $(DEPTH)/config/rules.mk

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

@ -28,31 +28,36 @@ CSRCS = \
jscookie.c \
mkautocf.c \
mkconect.c \
mkformat.c \
mkfsort.c \
mkgeturl.c \
mkhelp.c \
mkinit.c \
mkmessag.c \
mkpadpac.c \
mkparse.c \
mkselect.c \
mksockrw.c \
mksort.c \
mkstream.c \
mktrace.c \
mkutils.c \
prefetch.c \
unix-dns.c \
$(NULL)
EXPORTS= mkstream.h mkformat.h mkparse.h mkfsort.h mksort.h mkgeturl.h \
ifndef MODULAR_NETLIB
CSRCS += \
mkinit.c \
mkstream.c \
$(NULL)
endif
EXPORTS= mkstream.h mkparse.h mkfsort.h mksort.h mkgeturl.h \
mkselect.h mktcp.h netutils.h mkpadpac.h mkautocf.h mkhelp.h \
mkutils.h mktrace.h
REQUIRES = jtools nspr2 dbm util js parse lay style pref htmldlgs java \
libfont netcache httpurl cnetinit security img layer netcnvts network
libfont netcache httpurl cnetinit security img layer netcnvts network \
mimetype
include $(DEPTH)/config/rules.mk

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

@ -1,69 +0,0 @@
#!gmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH = ../..
MODULE = network
LIBRARY_NAME = network
ifdef MOZ_MAIL_NEWS
CPPSRCS= mkabook.cpp
endif
CSRCS = \
jscookie.c \
mkautocf.c \
mkconect.c \
mkformat.c \
mkfsort.c \
mkgeturl.c \
mkhelp.c \
mkinit.c \
mkmessag.c \
mkpadpac.c \
mkparse.c \
mkselect.c \
mksockrw.c \
mksort.c \
mkstream.c \
mktrace.c \
mkutils.c \
prefetch.c \
unix-dns.c \
$(NULL)
EXPORTS= mkstream.h mkformat.h mkparse.h mkfsort.h mksort.h mkgeturl.h \
mkselect.h mktcp.h netutils.h mkpadpac.h mkautocf.h mkhelp.h \
mkutils.h mktrace.h
REQUIRES = jtools nspr2 dbm util js parse lay style pref htmldlgs java \
libfont netcache httpurl cnetinit security img layer netcnvts network
include $(DEPTH)/config/rules.mk
TEST_LIBS = $(LIBRARY) \
$(DIST)/lib/liburl.$(LIB_SUFFIX) \
$(DIST)/lib/libsec-us.$(LIB_SUFFIX) \
$(DIST)/lib/libdbm.$(LIB_SUFFIX) \
$(DIST)/lib/libxp.$(LIB_SUFFIX) \
$(DIST)/lib/nspr.$(LIB_SUFFIX)
test:
$(CC) -g -o $(OBJDIR)/style_test $(CFLAGS) -DSS_TEST stystruc.c $(TEST_LIBS)
$(CC) -g -o $(OBJDIR)/stack_test $(CFLAGS) -DTEST_STYLESTACK stystack.c $(TEST_LIBS)

49
network/module/Makefile Normal file
Просмотреть файл

@ -0,0 +1,49 @@
#!gmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH = ../..
MODULE = netlib
LIBRARY_NAME = netlib
CPPSRCS = \
nsNetService.cpp \
nsNetStream.cpp \
nsURL.cpp \
nsHttpUrl.cpp \
nsStubContext.cpp \
nsNetStubs.cpp \
$(NULL)
REQUIRES = raptor js dbm nspr security pref xpcom util img \
layer network netcache fileurl ftpurl abouturl \
httpurl gophurl remoturl
EXPORTS = nsIStreamListener.h \
nsINetService.h \
nsIURL.h \
nsIPostToServer.h \
nsIHttpUrl.h \
$(NULL)
include $(DEPTH)/config/config.mk
include $(DEPTH)/config/rules.mk
$(LIBRARY): \
$(OBJS)

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

@ -38,8 +38,13 @@ extern "C" {
#include "remoturl.h"
#include "netcache.h"
#if defined(XP_WIN) || defined(XP_OS2)
extern char *XP_AppCodeName;
extern char *XP_AppVersion;
#else
extern const char *XP_AppCodeName;
extern const char *XP_AppVersion;
#endif
};
/*
@ -70,11 +75,9 @@ nsNetlibService::nsNetlibService()
/* Initialize netlib with 32 sockets... */
NET_InitNetLib(0, 32);
/* XXX: How should the User Agent get initialized? */
XP_AppCodeName = strdup("Mozilla");
XP_AppVersion = strdup("5.0 Netscape/5.0 (Windows;I;x86;en)");
}

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

@ -23,7 +23,7 @@
/* XXX: Declare NET_PollSockets(...) for the blocking stream hack... */
extern "C" {
PRBool NET_PollSockets(void);
XP_Bool NET_PollSockets(void);
};

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

@ -20,14 +20,19 @@
DEPTH = ../..
DIRS = about \
dataurl \
file \
ftp \
gopher \
http \
remote
ifndef MODULAR_NETLIB
DIRS += \
dataurl \
js \
marimba \
remote
$(NULL)
endif
include $(DEPTH)/config/rules.mk

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

@ -27,7 +27,7 @@ CSRCS = \
EXPORTS= fileurl.h
REQUIRES = network nspr2 dbm util pref js java fileurl \
security layer img httpurl jtools
security layer img httpurl jtools mimetype
include $(DEPTH)/config/rules.mk

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

@ -27,7 +27,7 @@ CSRCS = \
EXPORTS= ftpurl.h
REQUIRES = network nspr2 dbm util pref js java fileurl \
security layer img httpurl
security layer img httpurl mimetype
include $(DEPTH)/config/rules.mk

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

@ -1,33 +0,0 @@
#!gmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
DEPTH = ../../..
MODULE = gophurl
LIBRARY_NAME = gophurl
CSRCS = \
mkgopher.c \
$(NULL)
EXPORTS= gophurl.h
REQUIRES = network nspr2 dbm util pref js java fileurl \
security layer img httpurl remoturl
include $(DEPTH)/config/rules.mk

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

@ -28,7 +28,7 @@ CSRCS = \
EXPORTS= httpurl.h httpauth.h cookies.h jscookie.h
REQUIRES = netcache network nspr2 dbm util pref js java fileurl \
security layer img httpurl
security layer img httpurl mimetype
include $(DEPTH)/config/rules.mk

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

@ -20,7 +20,7 @@
#define MKHTTP_H
#ifndef MKGETURL_H
#include "MKGetURL.h"
#include "mkgeturl.h"
#endif /* MKGETURL_H */
#define DEF_HTTP_PORT 80