diff options
author | hongbotian <hongbo.tianhongbo@huawei.com> | 2015-11-30 01:45:08 -0500 |
---|---|---|
committer | hongbotian <hongbo.tianhongbo@huawei.com> | 2015-11-30 01:45:08 -0500 |
commit | e8ec7aa8e38a93f5b034ac74cebce5de23710317 (patch) | |
tree | aa031937bf856c1f8d6ad7877b8d2cb0224da5ef /rubbos/app/httpd-2.0.64/srclib/apr-util/test | |
parent | cc40af334e619bb549038238507407866f774f8f (diff) |
upload http
JIRA: BOTTLENECK-10
Change-Id: I7598427ff904df438ce77c2819ee48ac75ffa8da
Signed-off-by: hongbotian <hongbo.tianhongbo@huawei.com>
Diffstat (limited to 'rubbos/app/httpd-2.0.64/srclib/apr-util/test')
33 files changed, 6865 insertions, 0 deletions
diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/Makefile b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/Makefile new file mode 100644 index 00000000..bdd2e0fe --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/Makefile @@ -0,0 +1,110 @@ +srcdir = . + + +INCLUDES = -I/bottlenecks/rubbos/app/httpd-2.0.64/srclib/apr-util/include -I/bottlenecks/rubbos/app/httpd-2.0.64/srclib/apr-util/include/private -I/bottlenecks/rubbos/app/httpd-2.0.64/srclib/apr/include -I/bottlenecks/rubbos/app/httpd-2.0.64/srclib/apr-util/xml/expat/lib + +PROGRAMS = testdbm testdate testmd4 testmd5 testxml testrmm teststrmatch \ + testuuid testreslist testqueue testuri testpass +TARGETS = $(PROGRAMS) + +APRUTIL_DOTTED_VERSION=0.9.19 +APRUTIL_MAJOR_VERSION=0 +TARGET_LIB_PATH = ../libaprutil-${APRUTIL_MAJOR_VERSION}.la + +# bring in rules.mk for standard functionality +include /bottlenecks/rubbos/app/httpd-2.0.64/srclib/apr-util/build/rules.mk +PROGRAM_DEPENDENCIES = /bottlenecks/rubbos/app/httpd-2.0.64/srclib/apr-util/xml/expat/libexpat.la /bottlenecks/rubbos/app/httpd-2.0.64/srclib/apr/libapr-0.la -lrt -lm -lcrypt -lnsl -lpthread -ldl +APRUTIL_LDFLAGS = -L/bottlenecks/rubbos/app/httpd-2.0.64/srclib/apr-util/xml/expat/lib -no-install + +all: $(PROGRAMS) + +check: $(PROGRAMS) +# For VPATH builds; where we have no ./data, copy us some data + if test ! -d "./data"; then cp -r $(srcdir)/data data; fi + for prog in $(PROGRAMS); do \ + if test "$$prog" = 'testmd4'; then \ + ./$$prog -ssomestringtohash; \ + if test $$? = 255; then \ + echo "$$prog failed"; \ + break; \ + fi; \ + elif test "$$prog" = 'testdbm'; then \ + ./$$prog auto SDBM; \ + if test $$? = 255; then \ + echo "$$prog failed"; \ + break; \ + fi; \ + else \ + ./$$prog ;\ + if test $$? = 255; then \ + echo "$$prog failed"; \ + break; \ + fi; \ + fi; \ + done + +testdbm_OBJECTS = testdbm.lo +testdbm_LDADD = $(TARGET_LIB_PATH) +testdbm: $(testdbm_OBJECTS) $(testdbm_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(testdbm_OBJECTS) $(testdbm_LDADD) $(PROGRAM_DEPENDENCIES) + +testdate_OBJECTS = testdate.lo +testdate_LDADD = $(TARGET_LIB_PATH) +testdate: $(testdate_OBJECTS) $(testdate_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(testdate_OBJECTS) $(testdate_LDADD) $(PROGRAM_DEPENDENCIES) + +testxml_OBJECTS = testxml.lo +testxml_LDADD = $(TARGET_LIB_PATH) +testxml: $(testxml_OBJECTS) $(testxml_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(testxml_OBJECTS) $(testxml_LDADD) $(PROGRAM_DEPENDENCIES) + +testmd4_OBJECTS = testmd4.lo +testmd4_LDADD = $(TARGET_LIB_PATH) +testmd4: $(testmd4_OBJECTS) $(testmd4_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(testmd4_OBJECTS) $(testmd4_LDADD) $(PROGRAM_DEPENDENCIES) + +testmd5_OBJECTS = testmd5.lo +testmd5_LDADD = $(TARGET_LIB_PATH) +testmd5: $(testmd5_OBJECTS) $(testmd5_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(testmd5_OBJECTS) $(testmd5_LDADD) $(PROGRAM_DEPENDENCIES) + +testrmm_OBJECTS = testrmm.lo +testrmm_LDADD = $(TARGET_LIB_PATH) +testrmm: $(testrmm_OBJECTS) $(testrmm_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(testrmm_OBJECTS) $(testrmm_LDADD) $(PROGRAM_DEPENDENCIES) + +teststrmatch_OBJECTS = teststrmatch.lo +teststrmatch_LDADD = $(TARGET_LIB_PATH) +teststrmatch: $(teststrmatch_OBJECTS) $(teststrmatch_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(teststrmatch_OBJECTS) $(teststrmatch_LDADD) $(PROGRAM_DEPENDENCIES) + +testuuid_OBJECTS = testuuid.lo +testuuid_LDADD = $(TARGET_LIB_PATH) +testuuid: $(testuuid_OBJECTS) $(testuuid_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(testuuid_OBJECTS) $(testuuid_LDADD) $(PROGRAM_DEPENDENCIES) + +testreslist_OBJECTS = testreslist.lo +testreslist_LDADD = $(TARGET_LIB_PATH) +testreslist: $(testreslist_OBJECTS) $(testreslist_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(testreslist_OBJECTS) $(testreslist_LDADD) $(PROGRAM_DEPENDENCIES) + +testqueue_OBJECTS = testqueue.lo +testqueue_LDADD = $(TARGET_LIB_PATH) +testqueue: $(testqueue_OBJECTS) $(testqueue_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(testqueue_OBJECTS) $(testqueue_LDADD) $(PROGRAM_DEPENDENCIES) + +testuri_OBJECTS = testuri.lo +testuri_LDADD = $(TARGET_LIB_PATH) +testuri: $(testuri_OBJECTS) $(testuri_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(testuri_OBJECTS) $(testuri_LDADD) $(PROGRAM_DEPENDENCIES) + +testpass_OBJECTS = testpass.lo +testpass_LDADD = $(TARGET_LIB_PATH) +testpass: $(testpass_OBJECTS) $(testpass_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(testpass_OBJECTS) $(testpass_LDADD) $(PROGRAM_DEPENDENCIES) + +testxlate_OBJECTS = testxlate.lo +testxlate_LDADD = $(TARGET_LIB_PATH) +testxlate: $(testxlate_OBJECTS) $(testxlate_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(testxlate_OBJECTS) $(testxlate_LDADD) $(PROGRAM_DEPENDENCIES) + diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/Makefile.in b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/Makefile.in new file mode 100644 index 00000000..e241c443 --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/Makefile.in @@ -0,0 +1,110 @@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +INCLUDES = @APRUTIL_PRIV_INCLUDES@ @APR_INCLUDES@ @APRUTIL_INCLUDES@ + +PROGRAMS = testdbm testdate testmd4 testmd5 testxml testrmm teststrmatch \ + testuuid testreslist testqueue testuri testpass +TARGETS = $(PROGRAMS) + +APRUTIL_DOTTED_VERSION=@APRUTIL_DOTTED_VERSION@ +APRUTIL_MAJOR_VERSION=@APRUTIL_MAJOR_VERSION@ +TARGET_LIB_PATH = ../lib@APRUTIL_LIBNAME@.la + +# bring in rules.mk for standard functionality +@INCLUDE_RULES@ +PROGRAM_DEPENDENCIES = @APRUTIL_LIBS@ +APRUTIL_LDFLAGS = @APRUTIL_LDFLAGS@ @LT_NO_INSTALL@ + +all: $(PROGRAMS) + +check: $(PROGRAMS) +# For VPATH builds; where we have no ./data, copy us some data + if test ! -d "./data"; then cp -r $(srcdir)/data data; fi + for prog in $(PROGRAMS); do \ + if test "$$prog" = 'testmd4'; then \ + ./$$prog -ssomestringtohash; \ + if test $$? = 255; then \ + echo "$$prog failed"; \ + break; \ + fi; \ + elif test "$$prog" = 'testdbm'; then \ + ./$$prog auto SDBM; \ + if test $$? = 255; then \ + echo "$$prog failed"; \ + break; \ + fi; \ + else \ + ./$$prog ;\ + if test $$? = 255; then \ + echo "$$prog failed"; \ + break; \ + fi; \ + fi; \ + done + +testdbm_OBJECTS = testdbm.lo +testdbm_LDADD = $(TARGET_LIB_PATH) +testdbm: $(testdbm_OBJECTS) $(testdbm_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(testdbm_OBJECTS) $(testdbm_LDADD) $(PROGRAM_DEPENDENCIES) + +testdate_OBJECTS = testdate.lo +testdate_LDADD = $(TARGET_LIB_PATH) +testdate: $(testdate_OBJECTS) $(testdate_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(testdate_OBJECTS) $(testdate_LDADD) $(PROGRAM_DEPENDENCIES) + +testxml_OBJECTS = testxml.lo +testxml_LDADD = $(TARGET_LIB_PATH) +testxml: $(testxml_OBJECTS) $(testxml_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(testxml_OBJECTS) $(testxml_LDADD) $(PROGRAM_DEPENDENCIES) + +testmd4_OBJECTS = testmd4.lo +testmd4_LDADD = $(TARGET_LIB_PATH) +testmd4: $(testmd4_OBJECTS) $(testmd4_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(testmd4_OBJECTS) $(testmd4_LDADD) $(PROGRAM_DEPENDENCIES) + +testmd5_OBJECTS = testmd5.lo +testmd5_LDADD = $(TARGET_LIB_PATH) +testmd5: $(testmd5_OBJECTS) $(testmd5_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(testmd5_OBJECTS) $(testmd5_LDADD) $(PROGRAM_DEPENDENCIES) + +testrmm_OBJECTS = testrmm.lo +testrmm_LDADD = $(TARGET_LIB_PATH) +testrmm: $(testrmm_OBJECTS) $(testrmm_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(testrmm_OBJECTS) $(testrmm_LDADD) $(PROGRAM_DEPENDENCIES) + +teststrmatch_OBJECTS = teststrmatch.lo +teststrmatch_LDADD = $(TARGET_LIB_PATH) +teststrmatch: $(teststrmatch_OBJECTS) $(teststrmatch_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(teststrmatch_OBJECTS) $(teststrmatch_LDADD) $(PROGRAM_DEPENDENCIES) + +testuuid_OBJECTS = testuuid.lo +testuuid_LDADD = $(TARGET_LIB_PATH) +testuuid: $(testuuid_OBJECTS) $(testuuid_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(testuuid_OBJECTS) $(testuuid_LDADD) $(PROGRAM_DEPENDENCIES) + +testreslist_OBJECTS = testreslist.lo +testreslist_LDADD = $(TARGET_LIB_PATH) +testreslist: $(testreslist_OBJECTS) $(testreslist_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(testreslist_OBJECTS) $(testreslist_LDADD) $(PROGRAM_DEPENDENCIES) + +testqueue_OBJECTS = testqueue.lo +testqueue_LDADD = $(TARGET_LIB_PATH) +testqueue: $(testqueue_OBJECTS) $(testqueue_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(testqueue_OBJECTS) $(testqueue_LDADD) $(PROGRAM_DEPENDENCIES) + +testuri_OBJECTS = testuri.lo +testuri_LDADD = $(TARGET_LIB_PATH) +testuri: $(testuri_OBJECTS) $(testuri_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(testuri_OBJECTS) $(testuri_LDADD) $(PROGRAM_DEPENDENCIES) + +testpass_OBJECTS = testpass.lo +testpass_LDADD = $(TARGET_LIB_PATH) +testpass: $(testpass_OBJECTS) $(testpass_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(testpass_OBJECTS) $(testpass_LDADD) $(PROGRAM_DEPENDENCIES) + +testxlate_OBJECTS = testxlate.lo +testxlate_LDADD = $(TARGET_LIB_PATH) +testxlate: $(testxlate_OBJECTS) $(testxlate_LDADD) + $(LINK) $(APRUTIL_LDFLAGS) $(testxlate_OBJECTS) $(testxlate_LDADD) $(PROGRAM_DEPENDENCIES) + diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/Makefile.win b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/Makefile.win new file mode 100644 index 00000000..96ea2602 --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/Makefile.win @@ -0,0 +1,125 @@ +# -*- Makefile -*- +!IF "$(OS)" == "Windows_NT" +NULL= +rmdir=rd /s /q +!ELSE +NULL=nul +rmdir=deltree /y +!ENDIF + +SILENT=@ + +# Default build and bind modes +BUILD_MODE = release +BIND_MODE = shared + +!IF "$(BUILD_MODE)" == "release" || "$(BUILD_MODE)" == "Release" +!IF "$(BIND_MODE)" == "shared" +# release shared +APR_LIB_PFX = $(APR_SOURCE)\Release\lib +APU_LIB_PFX = $(APU_SOURCE)\Release\lib +API_LIB_PFX = $(API_SOURCE)\Release\lib +CFG_CFLAGS = /MD /O2 +CFG_DEFINES = /D "NDEBUG" +CFG_OUTPUT = Release + +!ELSE +!IF "$(BIND_MODE)" == "static" +# release static +APR_LIB_PFX = $(APR_SOURCE)\LibR\ # no line continuation +APU_LIB_PFX = $(APU_SOURCE)\LibR\ # no line continuation +API_LIB_PFX = $(API_SOURCE)\LibR\ # no line continuation +CFG_CFLAGS = /MD /O2 +CFG_DEFINES = /D "NDEBUG" /D "APR_DECLARE_STATIC" \ + /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC" +CFG_API_LIB = $(API_LIB_PFX)apriconv.lib +CFG_OUTPUT = LibR + +!ELSE +!ERROR Unknown bind mode "$(BIND_MODE)" +!ENDIF +!ENDIF + +!ELSE +!IF "$(BUILD_MODE)" == "debug" || "$(BUILD_MODE)" == "Debug" +!IF "$(BIND_MODE)" == "shared" +# debug shared +APR_LIB_PFX = $(APR_SOURCE)\Debug\lib +APU_LIB_PFX = $(APU_SOURCE)\Debug\lib +API_LIB_PFX = $(API_SOURCE)\Debug\lib +CFG_CFLAGS = /MDd /Zi /Od +CFG_DEFINES = /D "_DEBUG" +CFG_LDFLAGS = /DEBUG +CFG_OUTPUT = Debug + +!ELSE +!IF "$(BIND_MODE)" == "static" +# debug static +APR_LIB_PFX = $(APR_SOURCE)\LibD\ # no line continuation +APU_LIB_PFX = $(APU_SOURCE)\LibD\ # no line continuation +API_LIB_PFX = $(API_SOURCE)\LibD\ # no line continuation +CFG_CFLAGS = /MDd /Zi /Od +CFG_DEFINES = /D "_DEBUG" /D "APR_DECLARE_STATIC" \ + /D "APU_DECLARE_STATIC" /D "API_DECLARE_STATIC" +CFG_LDFLAGS = /DEBUG +CFG_API_LIB = $(API_LIB_PFX)apriconv.lib +CFG_OUTPUT = LibD + +!ELSE +!ERROR Unknown bind mode "$(BIND_MODE)" +!ENDIF +!ENDIF + +!ELSE +!ERROR Unknown build mode "$(BUILD_MODE)" +!ENDIF +!ENDIF + + +APR_SOURCE = ..\..\apr +APU_SOURCE = .. +API_SOURCE = ..\..\apr-iconv +OUTPUT_DIR = .\$(CFG_OUTPUT) + +INT_CFLAGS = /nologo $(CFG_CFLAGS) /Fp"$(OUTPUT_DIR)\iconv.pch" /YX"iconv.h" +INT_INCLUDES = /I "$(APU_SOURCE)\include" /I "$(APR_SOURCE)\include" +# /I "$(API_SOURCE)\include" +INT_DEFINES = /D "WIN32" /D "_CONSOLE" /D "_MBCS" $(CFG_DEFINES) +INT_LDFLAGS = /nologo /incremental:no /subsystem:console $(CFG_LDFLAGS) + +CFLAGS = /W3 +ALL_CFLAGS = $(INT_CFLAGS) $(INT_INCLUDES) $(INT_DEFINES) $(CFLAGS) + +LDFLAGS = /WARN:0 +ALL_LDFLAGS = $(INT_LDFLAGS) $(LDFLAGS) + +.c{$(OUTPUT_DIR)}.exe: + -$(SILENT)if not exist "$(OUTPUT_DIR)\$(NULL)" mkdir "$(OUTPUT_DIR)" + $(SILENT)echo Compiling and linking $@... + $(SILENT)cl $(ALL_CFLAGS) /Fo"$*.obj" /Fd"$*" $< \ + /link $(ALL_LDFLAGS) /out:$@ \ + "$(APU_LIB_PFX)aprutil.lib" \ + "$(APR_LIB_PFX)apr.lib" \ + "$(CFG_API)" \ + kernel32.lib advapi32.lib ws2_32.lib mswsock.lib + + +##!ALL_TARGETS = $(OUTPUT_DIR)\testdate.exe \ +##! $(OUTPUT_DIR)\testdbm.exe \ +##! $(OUTPUT_DIR)\testmd4.exe \ +##! $(OUTPUT_DIR)\testmd5.exe \ +##! $(OUTPUT_DIR)\testqueue.exe \ +##! $(OUTPUT_DIR)\testreslist.exe \ +##! $(OUTPUT_DIR)\testrmm.exe \ +##! $(OUTPUT_DIR)\teststrmatch.exe \ +##! $(OUTPUT_DIR)\testuri.exe \ +##! $(OUTPUT_DIR)\testuuid.exe \ +##! $(OUTPUT_DIR)\testxlate.exe \ +##! $(OUTPUT_DIR)\testxml.exe + +ALL_TARGETS = $(OUTPUT_DIR)\testxlate.exe + +all: $(ALL_TARGETS) + +clean: + -$(SILENT)if exist "$(OUTPUT_DIR)/$(NULL)" $(rmdir) $(OUTPUT_DIR) diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUmakefile b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUmakefile new file mode 100644 index 00000000..a73af650 --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUmakefile @@ -0,0 +1,265 @@ +#
+# Declare the sub-directories to be built here
+#
+
+SUBDIRS = \
+ $(EOLIST)
+
+#
+# Get the 'head' of the build environment. This includes default targets and
+# paths to tools
+#
+
+include $(APR_WORK)\build\NWGNUhead.inc
+
+#
+# build this level's files
+
+#
+# Make sure all needed macro's are defined
+#
+
+
+#
+# These directories will be at the beginning of the include list, followed by
+# INCDIRS
+#
+XINCDIRS += \
+ $(EOLIST)
+
+#
+# These flags will come after CFLAGS
+#
+XCFLAGS += \
+ $(EOLIST)
+
+#
+# These defines will come after DEFINES
+#
+XDEFINES += \
+ $(EOLIST)
+
+#
+# These flags will be added to the link.opt file
+#
+XLFLAGS += \
+ $(EOLIST)
+
+#
+# These values will be appended to the correct variables based on the value of
+# RELEASE
+#
+ifeq "$(RELEASE)" "debug"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "noopt"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "release"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+#
+# These are used by the link target if an NLM is being generated
+# This is used by the link 'name' directive to name the nlm. If left blank
+# TARGET_nlm (see below) will be used.
+#
+NLM_NAME =
+
+#
+# This is used by the link '-desc ' directive.
+# If left blank, NLM_NAME will be used.
+#
+NLM_DESCRIPTION = NLM is to test the apr layer
+
+#
+# This is used by the '-threadname' directive. If left blank,
+# NLM_NAME Thread will be used.
+#
+NLM_THREAD_NAME =
+
+#
+# This is used by the '-screenname' directive. If left blank,
+# 'Apache for NetWare' Thread will be used.
+#
+NLM_SCREEN_NAME =
+
+#
+# If this is specified, it will override VERSION value in
+# $(APR_WORK)\build\NWGNUenvironment.inc
+#
+NLM_VERSION =
+
+#
+# If this is specified, it will override the default of 64K
+#
+NLM_STACK_SIZE =
+
+#
+# If this is specified it will be used by the link '-entry' directive
+#
+NLM_ENTRY_SYM =
+
+#
+# If this is specified it will be used by the link '-exit' directive
+#
+NLM_EXIT_SYM =
+
+#
+# If this is specified it will be used by the link '-check' directive
+#
+NLM_CHECK_SYM =
+
+#
+# If this is specified it will be used by the link '-flags' directive
+#
+NLM_FLAGS =
+
+#
+# If this is specified it will be linked in with the XDCData option in the def
+# file instead of the default of $(APR)/misc/netware/apache.xdc. XDCData can
+# be disabled by setting APACHE_UNIPROC in the environment
+#
+XDCDATA =
+
+#
+# Declare all target files (you must add your files here)
+#
+
+#
+# If there is an NLM target, put it here
+#
+TARGET_nlm = \
+ $(OBJDIR)/testdate.nlm \
+ $(OBJDIR)/testdbm.nlm \
+ $(OBJDIR)/testmd4.nlm \
+ $(OBJDIR)/testmd5.nlm \
+ $(OBJDIR)/testpass.nlm \
+ $(OBJDIR)/testqueue.nlm \
+ $(OBJDIR)/testreslist.nlm \
+ $(OBJDIR)/teststrmatch.nlm \
+ $(OBJDIR)/testuri.nlm \
+ $(OBJDIR)/testuuid.nlm \
+ $(OBJDIR)/testxlate.nlm \
+ $(OBJDIR)/testxml.nlm \
+ $(EOLIST)
+#
+# If there is an LIB target, put it here
+#
+TARGET_lib = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the NLM target above.
+# Paths must all use the '/' character
+#
+FILES_nlm_objs = \
+ $(EOLIST)
+
+#
+# These are the LIB files needed to create the NLM target above.
+# These will be added as a library command in the link.opt file.
+#
+FILES_nlm_libs = \
+ $(EOLIST)
+
+#
+# These are the modules that the above NLM target depends on to load.
+# These will be added as a module command in the link.opt file.
+#
+FILES_nlm_modules = \
+ aprlib \
+ $(EOLIST)
+
+#
+# If the nlm has a msg file, put it's path here
+#
+FILE_nlm_msg =
+
+#
+# If the nlm has a hlp file put it's path here
+#
+FILE_nlm_hlp =
+
+#
+# If this is specified, it will override the default copyright.
+#
+FILE_nlm_copyright =
+
+#
+# Any additional imports go here
+#
+FILES_nlm_Ximports = \
+ $(EOLIST)
+
+#
+# Any symbols exported to here
+#
+FILES_nlm_exports = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the LIB target above.
+# Paths must all use the '/' character
+#
+FILES_lib_objs = \
+ $(EOLIST)
+
+#
+# implement targets and dependancies (leave this section alone)
+#
+
+libs :: $(OBJDIR) $(TARGET_lib)
+
+nlms :: libs $(TARGET_nlm)
+
+#
+# Updated this target to create necessary directories and copy files to the
+# correct place. (See $(APR_WORK)\build\NWGNUhead.inc for examples)
+#
+install :: nlms FORCE
+ copy $(OBJDIR)\*.nlm $(INSTALL)\Apache2
+
+#
+# Any specialized rules here
+#
+
+#
+# Include the 'tail' makefile that has targets that depend on variables defined
+# in this makefile
+#
+
+include $(APR_WORK)\build\NWGNUtail.inc
+
diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestdate b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestdate new file mode 100644 index 00000000..e468260a --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestdate @@ -0,0 +1,254 @@ +#
+# Make sure all needed macro's are defined
+#
+
+#
+# Get the 'head' of the build environment if necessary. This includes default
+# targets and paths to tools
+#
+
+include $(APR_WORK)\build\NWGNUhead.inc
+
+#
+# These directories will be at the beginning of the include list, followed by
+# INCDIRS
+#
+XINCDIRS += \
+ $(APR_WORK)/include \
+ $(APU_WORK)/include \
+ $(APR_WORK)/include/arch/NetWare \
+ $(EOLIST)
+
+#
+# These flags will come after CFLAGS
+#
+XCFLAGS += \
+ $(EOLIST)
+
+#
+# These defines will come after DEFINES
+#
+XDEFINES += \
+ $(EOLIST)
+
+#
+# These flags will be added to the link.opt file
+#
+XLFLAGS += \
+ $(EOLIST)
+
+#
+# These values will be appended to the correct variables based on the value of
+# RELEASE
+#
+ifeq "$(RELEASE)" "debug"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "noopt"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "release"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+#
+# These are used by the link target if an NLM is being generated
+# This is used by the link 'name' directive to name the nlm. If left blank
+# TARGET_nlm (see below) will be used.
+#
+NLM_NAME = testdate
+
+#
+# This is used by the link '-desc ' directive.
+# If left blank, NLM_NAME will be used.
+#
+NLM_DESCRIPTION = NLM is to test the APR-UTIL functions
+
+#
+# This is used by the '-threadname' directive. If left blank,
+# NLM_NAME Thread will be used.
+#
+NLM_THREAD_NAME = $(NLM_NAME)
+
+#
+# This is used by the '-screenname' directive. If left blank,
+# 'Apache for NetWare' Thread will be used.
+#
+NLM_SCREEN_NAME = $(NLM_NAME)
+
+#
+# If this is specified, it will override VERSION value in
+# $(APR_WORK)\build\NWGNUenvironment.inc
+#
+NLM_VERSION =
+
+#
+# If this is specified, it will override the default of 64K
+#
+NLM_STACK_SIZE =
+
+#
+# If this is specified it will be used by the link '-entry' directive
+#
+NLM_ENTRY_SYM = _LibCPrelude
+
+#
+# If this is specified it will be used by the link '-exit' directive
+#
+NLM_EXIT_SYM = _LibCPostlude
+
+#
+# If this is specified it will be used by the link '-check' directive
+#
+NLM_CHECK_SYM =
+
+#
+# If this is specified it will be used by the link '-flags' directive
+#
+NLM_FLAGS = AUTOUNLOAD, PSEUDOPREEMPTION
+
+#
+# If this is specified it will be linked in with the XDCData option in the def
+# file instead of the default of $(APR)/misc/netware/apache.xdc. XDCData can
+# be disabled by setting APACHE_UNIPROC in the environment
+#
+XDCDATA =
+
+#
+# Declare all target files (you must add your files here)
+#
+
+#
+# If there is an NLM target, put it here
+#
+TARGET_nlm = \
+ $(OBJDIR)/$(NLM_NAME).nlm \
+ $(EOLIST)
+
+#
+# If there is an LIB target, put it here
+#
+TARGET_lib = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the NLM target above.
+# Paths must all use the '/' character
+#
+FILES_nlm_objs = \
+ $(OBJDIR)/$(NLM_NAME).o \
+ $(OBJDIR)/nw_misc.o \
+ $(EOLIST)
+
+# Pending tests
+
+#
+# These are the LIB files needed to create the NLM target above.
+# These will be added as a library command in the link.opt file.
+#
+FILES_nlm_libs = \
+ libcpre.o \
+ $(EOLIST)
+
+#
+# These are the modules that the above NLM target depends on to load.
+# These will be added as a module command in the link.opt file.
+#
+FILES_nlm_modules = \
+ Libc \
+ APRLIB \
+ $(EOLIST)
+
+#
+# If the nlm has a msg file, put it's path here
+#
+FILE_nlm_msg =
+
+#
+# If the nlm has a hlp file put it's path here
+#
+FILE_nlm_hlp =
+
+#
+# If this is specified, it will override the default copyright.
+#
+FILE_nlm_copyright =
+
+#
+# Any additional imports go here
+#
+FILES_nlm_Ximports = \
+ @libc.imp \
+ @$(APR)/aprlib.imp \
+ $(EOLIST)
+
+#
+# Any symbols exported to here
+#
+FILES_nlm_exports = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the LIB target above.
+# Paths must all use the '/' character
+#
+FILES_lib_objs = \
+ $(EOLIST)
+
+#
+# implement targets and dependancies (leave this section alone)
+#
+
+libs :: $(OBJDIR) $(TARGET_lib)
+
+nlms :: libs $(TARGET_nlm)
+
+#
+# Updated this target to create necessary directories and copy files to the
+# correct place. (See $(APR_WORK)\build\NWGNUhead.inc for examples)
+#
+install :: nlms FORCE
+
+#
+# Any specialized rules here
+#
+
+#
+# Include the 'tail' makefile that has targets that depend on variables defined
+# in this makefile
+#
+
+include $(APR_WORK)\build\NWGNUtail.inc
+
diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestdbm b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestdbm new file mode 100644 index 00000000..8c188a6a --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestdbm @@ -0,0 +1,254 @@ +#
+# Make sure all needed macro's are defined
+#
+
+#
+# Get the 'head' of the build environment if necessary. This includes default
+# targets and paths to tools
+#
+
+include $(APR_WORK)\build\NWGNUhead.inc
+
+#
+# These directories will be at the beginning of the include list, followed by
+# INCDIRS
+#
+XINCDIRS += \
+ $(APR_WORK)/include \
+ $(APU_WORK)/include \
+ $(APR_WORK)/include/arch/NetWare \
+ $(EOLIST)
+
+#
+# These flags will come after CFLAGS
+#
+XCFLAGS += \
+ $(EOLIST)
+
+#
+# These defines will come after DEFINES
+#
+XDEFINES += \
+ $(EOLIST)
+
+#
+# These flags will be added to the link.opt file
+#
+XLFLAGS += \
+ $(EOLIST)
+
+#
+# These values will be appended to the correct variables based on the value of
+# RELEASE
+#
+ifeq "$(RELEASE)" "debug"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "noopt"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "release"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+#
+# These are used by the link target if an NLM is being generated
+# This is used by the link 'name' directive to name the nlm. If left blank
+# TARGET_nlm (see below) will be used.
+#
+NLM_NAME = testdbm
+
+#
+# This is used by the link '-desc ' directive.
+# If left blank, NLM_NAME will be used.
+#
+NLM_DESCRIPTION = NLM is to test the APR-UTIL functions
+
+#
+# This is used by the '-threadname' directive. If left blank,
+# NLM_NAME Thread will be used.
+#
+NLM_THREAD_NAME = $(NLM_NAME)
+
+#
+# This is used by the '-screenname' directive. If left blank,
+# 'Apache for NetWare' Thread will be used.
+#
+NLM_SCREEN_NAME = $(NLM_NAME)
+
+#
+# If this is specified, it will override VERSION value in
+# $(APR_WORK)\build\NWGNUenvironment.inc
+#
+NLM_VERSION =
+
+#
+# If this is specified, it will override the default of 64K
+#
+NLM_STACK_SIZE =
+
+#
+# If this is specified it will be used by the link '-entry' directive
+#
+NLM_ENTRY_SYM = _LibCPrelude
+
+#
+# If this is specified it will be used by the link '-exit' directive
+#
+NLM_EXIT_SYM = _LibCPostlude
+
+#
+# If this is specified it will be used by the link '-check' directive
+#
+NLM_CHECK_SYM =
+
+#
+# If this is specified it will be used by the link '-flags' directive
+#
+NLM_FLAGS = AUTOUNLOAD, PSEUDOPREEMPTION
+
+#
+# If this is specified it will be linked in with the XDCData option in the def
+# file instead of the default of $(APR)/misc/netware/apache.xdc. XDCData can
+# be disabled by setting APACHE_UNIPROC in the environment
+#
+XDCDATA =
+
+#
+# Declare all target files (you must add your files here)
+#
+
+#
+# If there is an NLM target, put it here
+#
+TARGET_nlm = \
+ $(OBJDIR)/$(NLM_NAME).nlm \
+ $(EOLIST)
+
+#
+# If there is an LIB target, put it here
+#
+TARGET_lib = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the NLM target above.
+# Paths must all use the '/' character
+#
+FILES_nlm_objs = \
+ $(OBJDIR)/$(NLM_NAME).o \
+ $(OBJDIR)/nw_misc.o \
+ $(EOLIST)
+
+# Pending tests
+
+#
+# These are the LIB files needed to create the NLM target above.
+# These will be added as a library command in the link.opt file.
+#
+FILES_nlm_libs = \
+ libcpre.o \
+ $(EOLIST)
+
+#
+# These are the modules that the above NLM target depends on to load.
+# These will be added as a module command in the link.opt file.
+#
+FILES_nlm_modules = \
+ Libc \
+ APRLIB \
+ $(EOLIST)
+
+#
+# If the nlm has a msg file, put it's path here
+#
+FILE_nlm_msg =
+
+#
+# If the nlm has a hlp file put it's path here
+#
+FILE_nlm_hlp =
+
+#
+# If this is specified, it will override the default copyright.
+#
+FILE_nlm_copyright =
+
+#
+# Any additional imports go here
+#
+FILES_nlm_Ximports = \
+ @libc.imp \
+ @$(APR)/aprlib.imp \
+ $(EOLIST)
+
+#
+# Any symbols exported to here
+#
+FILES_nlm_exports = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the LIB target above.
+# Paths must all use the '/' character
+#
+FILES_lib_objs = \
+ $(EOLIST)
+
+#
+# implement targets and dependancies (leave this section alone)
+#
+
+libs :: $(OBJDIR) $(TARGET_lib)
+
+nlms :: libs $(TARGET_nlm)
+
+#
+# Updated this target to create necessary directories and copy files to the
+# correct place. (See $(APR_WORK)\build\NWGNUhead.inc for examples)
+#
+install :: nlms FORCE
+
+#
+# Any specialized rules here
+#
+
+#
+# Include the 'tail' makefile that has targets that depend on variables defined
+# in this makefile
+#
+
+include $(APR_WORK)\build\NWGNUtail.inc
+
diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestmd4 b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestmd4 new file mode 100644 index 00000000..15f2e612 --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestmd4 @@ -0,0 +1,254 @@ +#
+# Make sure all needed macro's are defined
+#
+
+#
+# Get the 'head' of the build environment if necessary. This includes default
+# targets and paths to tools
+#
+
+include $(APR_WORK)\build\NWGNUhead.inc
+
+#
+# These directories will be at the beginning of the include list, followed by
+# INCDIRS
+#
+XINCDIRS += \
+ $(APR_WORK)/include \
+ $(APU_WORK)/include \
+ $(APR_WORK)/include/arch/NetWare \
+ $(EOLIST)
+
+#
+# These flags will come after CFLAGS
+#
+XCFLAGS += \
+ $(EOLIST)
+
+#
+# These defines will come after DEFINES
+#
+XDEFINES += \
+ $(EOLIST)
+
+#
+# These flags will be added to the link.opt file
+#
+XLFLAGS += \
+ $(EOLIST)
+
+#
+# These values will be appended to the correct variables based on the value of
+# RELEASE
+#
+ifeq "$(RELEASE)" "debug"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "noopt"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "release"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+#
+# These are used by the link target if an NLM is being generated
+# This is used by the link 'name' directive to name the nlm. If left blank
+# TARGET_nlm (see below) will be used.
+#
+NLM_NAME = testmd4
+
+#
+# This is used by the link '-desc ' directive.
+# If left blank, NLM_NAME will be used.
+#
+NLM_DESCRIPTION = NLM is to test the APR-UTIL functions
+
+#
+# This is used by the '-threadname' directive. If left blank,
+# NLM_NAME Thread will be used.
+#
+NLM_THREAD_NAME = $(NLM_NAME)
+
+#
+# This is used by the '-screenname' directive. If left blank,
+# 'Apache for NetWare' Thread will be used.
+#
+NLM_SCREEN_NAME = $(NLM_NAME)
+
+#
+# If this is specified, it will override VERSION value in
+# $(APR_WORK)\build\NWGNUenvironment.inc
+#
+NLM_VERSION =
+
+#
+# If this is specified, it will override the default of 64K
+#
+NLM_STACK_SIZE =
+
+#
+# If this is specified it will be used by the link '-entry' directive
+#
+NLM_ENTRY_SYM = _LibCPrelude
+
+#
+# If this is specified it will be used by the link '-exit' directive
+#
+NLM_EXIT_SYM = _LibCPostlude
+
+#
+# If this is specified it will be used by the link '-check' directive
+#
+NLM_CHECK_SYM =
+
+#
+# If this is specified it will be used by the link '-flags' directive
+#
+NLM_FLAGS = AUTOUNLOAD, PSEUDOPREEMPTION
+
+#
+# If this is specified it will be linked in with the XDCData option in the def
+# file instead of the default of $(APR)/misc/netware/apache.xdc. XDCData can
+# be disabled by setting APACHE_UNIPROC in the environment
+#
+XDCDATA =
+
+#
+# Declare all target files (you must add your files here)
+#
+
+#
+# If there is an NLM target, put it here
+#
+TARGET_nlm = \
+ $(OBJDIR)/$(NLM_NAME).nlm \
+ $(EOLIST)
+
+#
+# If there is an LIB target, put it here
+#
+TARGET_lib = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the NLM target above.
+# Paths must all use the '/' character
+#
+FILES_nlm_objs = \
+ $(OBJDIR)/$(NLM_NAME).o \
+ $(OBJDIR)/nw_misc.o \
+ $(EOLIST)
+
+# Pending tests
+
+#
+# These are the LIB files needed to create the NLM target above.
+# These will be added as a library command in the link.opt file.
+#
+FILES_nlm_libs = \
+ libcpre.o \
+ $(EOLIST)
+
+#
+# These are the modules that the above NLM target depends on to load.
+# These will be added as a module command in the link.opt file.
+#
+FILES_nlm_modules = \
+ Libc \
+ APRLIB \
+ $(EOLIST)
+
+#
+# If the nlm has a msg file, put it's path here
+#
+FILE_nlm_msg =
+
+#
+# If the nlm has a hlp file put it's path here
+#
+FILE_nlm_hlp =
+
+#
+# If this is specified, it will override the default copyright.
+#
+FILE_nlm_copyright =
+
+#
+# Any additional imports go here
+#
+FILES_nlm_Ximports = \
+ @libc.imp \
+ @$(APR)/aprlib.imp \
+ $(EOLIST)
+
+#
+# Any symbols exported to here
+#
+FILES_nlm_exports = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the LIB target above.
+# Paths must all use the '/' character
+#
+FILES_lib_objs = \
+ $(EOLIST)
+
+#
+# implement targets and dependancies (leave this section alone)
+#
+
+libs :: $(OBJDIR) $(TARGET_lib)
+
+nlms :: libs $(TARGET_nlm)
+
+#
+# Updated this target to create necessary directories and copy files to the
+# correct place. (See $(APR_WORK)\build\NWGNUhead.inc for examples)
+#
+install :: nlms FORCE
+
+#
+# Any specialized rules here
+#
+
+#
+# Include the 'tail' makefile that has targets that depend on variables defined
+# in this makefile
+#
+
+include $(APR_WORK)\build\NWGNUtail.inc
+
diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestmd5 b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestmd5 new file mode 100644 index 00000000..567c0e42 --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestmd5 @@ -0,0 +1,254 @@ +#
+# Make sure all needed macro's are defined
+#
+
+#
+# Get the 'head' of the build environment if necessary. This includes default
+# targets and paths to tools
+#
+
+include $(APR_WORK)\build\NWGNUhead.inc
+
+#
+# These directories will be at the beginning of the include list, followed by
+# INCDIRS
+#
+XINCDIRS += \
+ $(APR_WORK)/include \
+ $(APU_WORK)/include \
+ $(APR_WORK)/include/arch/NetWare \
+ $(EOLIST)
+
+#
+# These flags will come after CFLAGS
+#
+XCFLAGS += \
+ $(EOLIST)
+
+#
+# These defines will come after DEFINES
+#
+XDEFINES += \
+ $(EOLIST)
+
+#
+# These flags will be added to the link.opt file
+#
+XLFLAGS += \
+ $(EOLIST)
+
+#
+# These values will be appended to the correct variables based on the value of
+# RELEASE
+#
+ifeq "$(RELEASE)" "debug"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "noopt"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "release"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+#
+# These are used by the link target if an NLM is being generated
+# This is used by the link 'name' directive to name the nlm. If left blank
+# TARGET_nlm (see below) will be used.
+#
+NLM_NAME = testmd5
+
+#
+# This is used by the link '-desc ' directive.
+# If left blank, NLM_NAME will be used.
+#
+NLM_DESCRIPTION = NLM is to test the APR-UTIL functions
+
+#
+# This is used by the '-threadname' directive. If left blank,
+# NLM_NAME Thread will be used.
+#
+NLM_THREAD_NAME = $(NLM_NAME)
+
+#
+# This is used by the '-screenname' directive. If left blank,
+# 'Apache for NetWare' Thread will be used.
+#
+NLM_SCREEN_NAME = $(NLM_NAME)
+
+#
+# If this is specified, it will override VERSION value in
+# $(APR_WORK)\build\NWGNUenvironment.inc
+#
+NLM_VERSION =
+
+#
+# If this is specified, it will override the default of 64K
+#
+NLM_STACK_SIZE =
+
+#
+# If this is specified it will be used by the link '-entry' directive
+#
+NLM_ENTRY_SYM = _LibCPrelude
+
+#
+# If this is specified it will be used by the link '-exit' directive
+#
+NLM_EXIT_SYM = _LibCPostlude
+
+#
+# If this is specified it will be used by the link '-check' directive
+#
+NLM_CHECK_SYM =
+
+#
+# If this is specified it will be used by the link '-flags' directive
+#
+NLM_FLAGS = AUTOUNLOAD, PSEUDOPREEMPTION
+
+#
+# If this is specified it will be linked in with the XDCData option in the def
+# file instead of the default of $(APR)/misc/netware/apache.xdc. XDCData can
+# be disabled by setting APACHE_UNIPROC in the environment
+#
+XDCDATA =
+
+#
+# Declare all target files (you must add your files here)
+#
+
+#
+# If there is an NLM target, put it here
+#
+TARGET_nlm = \
+ $(OBJDIR)/$(NLM_NAME).nlm \
+ $(EOLIST)
+
+#
+# If there is an LIB target, put it here
+#
+TARGET_lib = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the NLM target above.
+# Paths must all use the '/' character
+#
+FILES_nlm_objs = \
+ $(OBJDIR)/$(NLM_NAME).o \
+ $(OBJDIR)/nw_misc.o \
+ $(EOLIST)
+
+# Pending tests
+
+#
+# These are the LIB files needed to create the NLM target above.
+# These will be added as a library command in the link.opt file.
+#
+FILES_nlm_libs = \
+ libcpre.o \
+ $(EOLIST)
+
+#
+# These are the modules that the above NLM target depends on to load.
+# These will be added as a module command in the link.opt file.
+#
+FILES_nlm_modules = \
+ Libc \
+ APRLIB \
+ $(EOLIST)
+
+#
+# If the nlm has a msg file, put it's path here
+#
+FILE_nlm_msg =
+
+#
+# If the nlm has a hlp file put it's path here
+#
+FILE_nlm_hlp =
+
+#
+# If this is specified, it will override the default copyright.
+#
+FILE_nlm_copyright =
+
+#
+# Any additional imports go here
+#
+FILES_nlm_Ximports = \
+ @libc.imp \
+ @$(APR)/aprlib.imp \
+ $(EOLIST)
+
+#
+# Any symbols exported to here
+#
+FILES_nlm_exports = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the LIB target above.
+# Paths must all use the '/' character
+#
+FILES_lib_objs = \
+ $(EOLIST)
+
+#
+# implement targets and dependancies (leave this section alone)
+#
+
+libs :: $(OBJDIR) $(TARGET_lib)
+
+nlms :: libs $(TARGET_nlm)
+
+#
+# Updated this target to create necessary directories and copy files to the
+# correct place. (See $(APR_WORK)\build\NWGNUhead.inc for examples)
+#
+install :: nlms FORCE
+
+#
+# Any specialized rules here
+#
+
+#
+# Include the 'tail' makefile that has targets that depend on variables defined
+# in this makefile
+#
+
+include $(APR_WORK)\build\NWGNUtail.inc
+
diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestpass b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestpass new file mode 100644 index 00000000..56df3a15 --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestpass @@ -0,0 +1,254 @@ +#
+# Make sure all needed macro's are defined
+#
+
+#
+# Get the 'head' of the build environment if necessary. This includes default
+# targets and paths to tools
+#
+
+include $(APR_WORK)\build\NWGNUhead.inc
+
+#
+# These directories will be at the beginning of the include list, followed by
+# INCDIRS
+#
+XINCDIRS += \
+ $(APR_WORK)/include \
+ $(APU_WORK)/include \
+ $(APR_WORK)/include/arch/NetWare \
+ $(EOLIST)
+
+#
+# These flags will come after CFLAGS
+#
+XCFLAGS += \
+ $(EOLIST)
+
+#
+# These defines will come after DEFINES
+#
+XDEFINES += \
+ $(EOLIST)
+
+#
+# These flags will be added to the link.opt file
+#
+XLFLAGS += \
+ $(EOLIST)
+
+#
+# These values will be appended to the correct variables based on the value of
+# RELEASE
+#
+ifeq "$(RELEASE)" "debug"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "noopt"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "release"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+#
+# These are used by the link target if an NLM is being generated
+# This is used by the link 'name' directive to name the nlm. If left blank
+# TARGET_nlm (see below) will be used.
+#
+NLM_NAME = testpass
+
+#
+# This is used by the link '-desc ' directive.
+# If left blank, NLM_NAME will be used.
+#
+NLM_DESCRIPTION = NLM is to test the APR-UTIL functions
+
+#
+# This is used by the '-threadname' directive. If left blank,
+# NLM_NAME Thread will be used.
+#
+NLM_THREAD_NAME = $(NLM_NAME)
+
+#
+# This is used by the '-screenname' directive. If left blank,
+# 'Apache for NetWare' Thread will be used.
+#
+NLM_SCREEN_NAME = $(NLM_NAME)
+
+#
+# If this is specified, it will override VERSION value in
+# $(APR_WORK)\build\NWGNUenvironment.inc
+#
+NLM_VERSION =
+
+#
+# If this is specified, it will override the default of 64K
+#
+NLM_STACK_SIZE =
+
+#
+# If this is specified it will be used by the link '-entry' directive
+#
+NLM_ENTRY_SYM = _LibCPrelude
+
+#
+# If this is specified it will be used by the link '-exit' directive
+#
+NLM_EXIT_SYM = _LibCPostlude
+
+#
+# If this is specified it will be used by the link '-check' directive
+#
+NLM_CHECK_SYM =
+
+#
+# If this is specified it will be used by the link '-flags' directive
+#
+NLM_FLAGS = AUTOUNLOAD, PSEUDOPREEMPTION
+
+#
+# If this is specified it will be linked in with the XDCData option in the def
+# file instead of the default of $(APR)/misc/netware/apache.xdc. XDCData can
+# be disabled by setting APACHE_UNIPROC in the environment
+#
+XDCDATA =
+
+#
+# Declare all target files (you must add your files here)
+#
+
+#
+# If there is an NLM target, put it here
+#
+TARGET_nlm = \
+ $(OBJDIR)/$(NLM_NAME).nlm \
+ $(EOLIST)
+
+#
+# If there is an LIB target, put it here
+#
+TARGET_lib = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the NLM target above.
+# Paths must all use the '/' character
+#
+FILES_nlm_objs = \
+ $(OBJDIR)/$(NLM_NAME).o \
+ $(OBJDIR)/nw_misc.o \
+ $(EOLIST)
+
+# Pending tests
+
+#
+# These are the LIB files needed to create the NLM target above.
+# These will be added as a library command in the link.opt file.
+#
+FILES_nlm_libs = \
+ libcpre.o \
+ $(EOLIST)
+
+#
+# These are the modules that the above NLM target depends on to load.
+# These will be added as a module command in the link.opt file.
+#
+FILES_nlm_modules = \
+ Libc \
+ APRLIB \
+ $(EOLIST)
+
+#
+# If the nlm has a msg file, put it's path here
+#
+FILE_nlm_msg =
+
+#
+# If the nlm has a hlp file put it's path here
+#
+FILE_nlm_hlp =
+
+#
+# If this is specified, it will override the default copyright.
+#
+FILE_nlm_copyright =
+
+#
+# Any additional imports go here
+#
+FILES_nlm_Ximports = \
+ @libc.imp \
+ @$(APR)/aprlib.imp \
+ $(EOLIST)
+
+#
+# Any symbols exported to here
+#
+FILES_nlm_exports = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the LIB target above.
+# Paths must all use the '/' character
+#
+FILES_lib_objs = \
+ $(EOLIST)
+
+#
+# implement targets and dependancies (leave this section alone)
+#
+
+libs :: $(OBJDIR) $(TARGET_lib)
+
+nlms :: libs $(TARGET_nlm)
+
+#
+# Updated this target to create necessary directories and copy files to the
+# correct place. (See $(APR_WORK)\build\NWGNUhead.inc for examples)
+#
+install :: nlms FORCE
+
+#
+# Any specialized rules here
+#
+
+#
+# Include the 'tail' makefile that has targets that depend on variables defined
+# in this makefile
+#
+
+include $(APR_WORK)\build\NWGNUtail.inc
+
diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestqueue b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestqueue new file mode 100644 index 00000000..702831e8 --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestqueue @@ -0,0 +1,254 @@ +#
+# Make sure all needed macro's are defined
+#
+
+#
+# Get the 'head' of the build environment if necessary. This includes default
+# targets and paths to tools
+#
+
+include $(APR_WORK)\build\NWGNUhead.inc
+
+#
+# These directories will be at the beginning of the include list, followed by
+# INCDIRS
+#
+XINCDIRS += \
+ $(APR_WORK)/include \
+ $(APU_WORK)/include \
+ $(APR_WORK)/include/arch/NetWare \
+ $(EOLIST)
+
+#
+# These flags will come after CFLAGS
+#
+XCFLAGS += \
+ $(EOLIST)
+
+#
+# These defines will come after DEFINES
+#
+XDEFINES += \
+ $(EOLIST)
+
+#
+# These flags will be added to the link.opt file
+#
+XLFLAGS += \
+ $(EOLIST)
+
+#
+# These values will be appended to the correct variables based on the value of
+# RELEASE
+#
+ifeq "$(RELEASE)" "debug"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "noopt"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "release"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+#
+# These are used by the link target if an NLM is being generated
+# This is used by the link 'name' directive to name the nlm. If left blank
+# TARGET_nlm (see below) will be used.
+#
+NLM_NAME = testqueue
+
+#
+# This is used by the link '-desc ' directive.
+# If left blank, NLM_NAME will be used.
+#
+NLM_DESCRIPTION = NLM is to test the APR-UTIL functions
+
+#
+# This is used by the '-threadname' directive. If left blank,
+# NLM_NAME Thread will be used.
+#
+NLM_THREAD_NAME = $(NLM_NAME)
+
+#
+# This is used by the '-screenname' directive. If left blank,
+# 'Apache for NetWare' Thread will be used.
+#
+NLM_SCREEN_NAME = $(NLM_NAME)
+
+#
+# If this is specified, it will override VERSION value in
+# $(APR_WORK)\build\NWGNUenvironment.inc
+#
+NLM_VERSION =
+
+#
+# If this is specified, it will override the default of 64K
+#
+NLM_STACK_SIZE =
+
+#
+# If this is specified it will be used by the link '-entry' directive
+#
+NLM_ENTRY_SYM = _LibCPrelude
+
+#
+# If this is specified it will be used by the link '-exit' directive
+#
+NLM_EXIT_SYM = _LibCPostlude
+
+#
+# If this is specified it will be used by the link '-check' directive
+#
+NLM_CHECK_SYM =
+
+#
+# If this is specified it will be used by the link '-flags' directive
+#
+NLM_FLAGS = AUTOUNLOAD, PSEUDOPREEMPTION
+
+#
+# If this is specified it will be linked in with the XDCData option in the def
+# file instead of the default of $(APR)/misc/netware/apache.xdc. XDCData can
+# be disabled by setting APACHE_UNIPROC in the environment
+#
+XDCDATA =
+
+#
+# Declare all target files (you must add your files here)
+#
+
+#
+# If there is an NLM target, put it here
+#
+TARGET_nlm = \
+ $(OBJDIR)/$(NLM_NAME).nlm \
+ $(EOLIST)
+
+#
+# If there is an LIB target, put it here
+#
+TARGET_lib = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the NLM target above.
+# Paths must all use the '/' character
+#
+FILES_nlm_objs = \
+ $(OBJDIR)/$(NLM_NAME).o \
+ $(OBJDIR)/nw_misc.o \
+ $(EOLIST)
+
+# Pending tests
+
+#
+# These are the LIB files needed to create the NLM target above.
+# These will be added as a library command in the link.opt file.
+#
+FILES_nlm_libs = \
+ libcpre.o \
+ $(EOLIST)
+
+#
+# These are the modules that the above NLM target depends on to load.
+# These will be added as a module command in the link.opt file.
+#
+FILES_nlm_modules = \
+ Libc \
+ APRLIB \
+ $(EOLIST)
+
+#
+# If the nlm has a msg file, put it's path here
+#
+FILE_nlm_msg =
+
+#
+# If the nlm has a hlp file put it's path here
+#
+FILE_nlm_hlp =
+
+#
+# If this is specified, it will override the default copyright.
+#
+FILE_nlm_copyright =
+
+#
+# Any additional imports go here
+#
+FILES_nlm_Ximports = \
+ @libc.imp \
+ @$(APR)/aprlib.imp \
+ $(EOLIST)
+
+#
+# Any symbols exported to here
+#
+FILES_nlm_exports = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the LIB target above.
+# Paths must all use the '/' character
+#
+FILES_lib_objs = \
+ $(EOLIST)
+
+#
+# implement targets and dependancies (leave this section alone)
+#
+
+libs :: $(OBJDIR) $(TARGET_lib)
+
+nlms :: libs $(TARGET_nlm)
+
+#
+# Updated this target to create necessary directories and copy files to the
+# correct place. (See $(APR_WORK)\build\NWGNUhead.inc for examples)
+#
+install :: nlms FORCE
+
+#
+# Any specialized rules here
+#
+
+#
+# Include the 'tail' makefile that has targets that depend on variables defined
+# in this makefile
+#
+
+include $(APR_WORK)\build\NWGNUtail.inc
+
diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestreslist b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestreslist new file mode 100644 index 00000000..ac9d48c9 --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestreslist @@ -0,0 +1,254 @@ +#
+# Make sure all needed macro's are defined
+#
+
+#
+# Get the 'head' of the build environment if necessary. This includes default
+# targets and paths to tools
+#
+
+include $(APR_WORK)\build\NWGNUhead.inc
+
+#
+# These directories will be at the beginning of the include list, followed by
+# INCDIRS
+#
+XINCDIRS += \
+ $(APR_WORK)/include \
+ $(APU_WORK)/include \
+ $(APR_WORK)/include/arch/NetWare \
+ $(EOLIST)
+
+#
+# These flags will come after CFLAGS
+#
+XCFLAGS += \
+ $(EOLIST)
+
+#
+# These defines will come after DEFINES
+#
+XDEFINES += \
+ $(EOLIST)
+
+#
+# These flags will be added to the link.opt file
+#
+XLFLAGS += \
+ $(EOLIST)
+
+#
+# These values will be appended to the correct variables based on the value of
+# RELEASE
+#
+ifeq "$(RELEASE)" "debug"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "noopt"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "release"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+#
+# These are used by the link target if an NLM is being generated
+# This is used by the link 'name' directive to name the nlm. If left blank
+# TARGET_nlm (see below) will be used.
+#
+NLM_NAME = testreslist
+
+#
+# This is used by the link '-desc ' directive.
+# If left blank, NLM_NAME will be used.
+#
+NLM_DESCRIPTION = NLM is to test the APR-UTIL functions
+
+#
+# This is used by the '-threadname' directive. If left blank,
+# NLM_NAME Thread will be used.
+#
+NLM_THREAD_NAME = $(NLM_NAME)
+
+#
+# This is used by the '-screenname' directive. If left blank,
+# 'Apache for NetWare' Thread will be used.
+#
+NLM_SCREEN_NAME = $(NLM_NAME)
+
+#
+# If this is specified, it will override VERSION value in
+# $(APR_WORK)\build\NWGNUenvironment.inc
+#
+NLM_VERSION =
+
+#
+# If this is specified, it will override the default of 64K
+#
+NLM_STACK_SIZE =
+
+#
+# If this is specified it will be used by the link '-entry' directive
+#
+NLM_ENTRY_SYM = _LibCPrelude
+
+#
+# If this is specified it will be used by the link '-exit' directive
+#
+NLM_EXIT_SYM = _LibCPostlude
+
+#
+# If this is specified it will be used by the link '-check' directive
+#
+NLM_CHECK_SYM =
+
+#
+# If this is specified it will be used by the link '-flags' directive
+#
+NLM_FLAGS = AUTOUNLOAD, PSEUDOPREEMPTION
+
+#
+# If this is specified it will be linked in with the XDCData option in the def
+# file instead of the default of $(APR)/misc/netware/apache.xdc. XDCData can
+# be disabled by setting APACHE_UNIPROC in the environment
+#
+XDCDATA =
+
+#
+# Declare all target files (you must add your files here)
+#
+
+#
+# If there is an NLM target, put it here
+#
+TARGET_nlm = \
+ $(OBJDIR)/$(NLM_NAME).nlm \
+ $(EOLIST)
+
+#
+# If there is an LIB target, put it here
+#
+TARGET_lib = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the NLM target above.
+# Paths must all use the '/' character
+#
+FILES_nlm_objs = \
+ $(OBJDIR)/$(NLM_NAME).o \
+ $(OBJDIR)/nw_misc.o \
+ $(EOLIST)
+
+# Pending tests
+
+#
+# These are the LIB files needed to create the NLM target above.
+# These will be added as a library command in the link.opt file.
+#
+FILES_nlm_libs = \
+ libcpre.o \
+ $(EOLIST)
+
+#
+# These are the modules that the above NLM target depends on to load.
+# These will be added as a module command in the link.opt file.
+#
+FILES_nlm_modules = \
+ Libc \
+ APRLIB \
+ $(EOLIST)
+
+#
+# If the nlm has a msg file, put it's path here
+#
+FILE_nlm_msg =
+
+#
+# If the nlm has a hlp file put it's path here
+#
+FILE_nlm_hlp =
+
+#
+# If this is specified, it will override the default copyright.
+#
+FILE_nlm_copyright =
+
+#
+# Any additional imports go here
+#
+FILES_nlm_Ximports = \
+ @libc.imp \
+ @$(APR)/aprlib.imp \
+ $(EOLIST)
+
+#
+# Any symbols exported to here
+#
+FILES_nlm_exports = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the LIB target above.
+# Paths must all use the '/' character
+#
+FILES_lib_objs = \
+ $(EOLIST)
+
+#
+# implement targets and dependancies (leave this section alone)
+#
+
+libs :: $(OBJDIR) $(TARGET_lib)
+
+nlms :: libs $(TARGET_nlm)
+
+#
+# Updated this target to create necessary directories and copy files to the
+# correct place. (See $(APR_WORK)\build\NWGNUhead.inc for examples)
+#
+install :: nlms FORCE
+
+#
+# Any specialized rules here
+#
+
+#
+# Include the 'tail' makefile that has targets that depend on variables defined
+# in this makefile
+#
+
+include $(APR_WORK)\build\NWGNUtail.inc
+
diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestrmm b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestrmm new file mode 100644 index 00000000..eb7d6897 --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestrmm @@ -0,0 +1,254 @@ +#
+# Make sure all needed macro's are defined
+#
+
+#
+# Get the 'head' of the build environment if necessary. This includes default
+# targets and paths to tools
+#
+
+include $(APR_WORK)\build\NWGNUhead.inc
+
+#
+# These directories will be at the beginning of the include list, followed by
+# INCDIRS
+#
+XINCDIRS += \
+ $(APR_WORK)/include \
+ $(APU_WORK)/include \
+ $(APR_WORK)/include/arch/NetWare \
+ $(EOLIST)
+
+#
+# These flags will come after CFLAGS
+#
+XCFLAGS += \
+ $(EOLIST)
+
+#
+# These defines will come after DEFINES
+#
+XDEFINES += \
+ $(EOLIST)
+
+#
+# These flags will be added to the link.opt file
+#
+XLFLAGS += \
+ $(EOLIST)
+
+#
+# These values will be appended to the correct variables based on the value of
+# RELEASE
+#
+ifeq "$(RELEASE)" "debug"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "noopt"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "release"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+#
+# These are used by the link target if an NLM is being generated
+# This is used by the link 'name' directive to name the nlm. If left blank
+# TARGET_nlm (see below) will be used.
+#
+NLM_NAME = testrmm
+
+#
+# This is used by the link '-desc ' directive.
+# If left blank, NLM_NAME will be used.
+#
+NLM_DESCRIPTION = NLM is to test the APR-UTIL functions
+
+#
+# This is used by the '-threadname' directive. If left blank,
+# NLM_NAME Thread will be used.
+#
+NLM_THREAD_NAME = $(NLM_NAME)
+
+#
+# This is used by the '-screenname' directive. If left blank,
+# 'Apache for NetWare' Thread will be used.
+#
+NLM_SCREEN_NAME = $(NLM_NAME)
+
+#
+# If this is specified, it will override VERSION value in
+# $(APR_WORK)\build\NWGNUenvironment.inc
+#
+NLM_VERSION =
+
+#
+# If this is specified, it will override the default of 64K
+#
+NLM_STACK_SIZE =
+
+#
+# If this is specified it will be used by the link '-entry' directive
+#
+NLM_ENTRY_SYM = _LibCPrelude
+
+#
+# If this is specified it will be used by the link '-exit' directive
+#
+NLM_EXIT_SYM = _LibCPostlude
+
+#
+# If this is specified it will be used by the link '-check' directive
+#
+NLM_CHECK_SYM =
+
+#
+# If this is specified it will be used by the link '-flags' directive
+#
+NLM_FLAGS = AUTOUNLOAD, PSEUDOPREEMPTION
+
+#
+# If this is specified it will be linked in with the XDCData option in the def
+# file instead of the default of $(APR)/misc/netware/apache.xdc. XDCData can
+# be disabled by setting APACHE_UNIPROC in the environment
+#
+XDCDATA =
+
+#
+# Declare all target files (you must add your files here)
+#
+
+#
+# If there is an NLM target, put it here
+#
+TARGET_nlm = \
+ $(OBJDIR)/$(NLM_NAME).nlm \
+ $(EOLIST)
+
+#
+# If there is an LIB target, put it here
+#
+TARGET_lib = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the NLM target above.
+# Paths must all use the '/' character
+#
+FILES_nlm_objs = \
+ $(OBJDIR)/$(NLM_NAME).o \
+ $(OBJDIR)/nw_misc.o \
+ $(EOLIST)
+
+# Pending tests
+
+#
+# These are the LIB files needed to create the NLM target above.
+# These will be added as a library command in the link.opt file.
+#
+FILES_nlm_libs = \
+ libcpre.o \
+ $(EOLIST)
+
+#
+# These are the modules that the above NLM target depends on to load.
+# These will be added as a module command in the link.opt file.
+#
+FILES_nlm_modules = \
+ Libc \
+ APRLIB \
+ $(EOLIST)
+
+#
+# If the nlm has a msg file, put it's path here
+#
+FILE_nlm_msg =
+
+#
+# If the nlm has a hlp file put it's path here
+#
+FILE_nlm_hlp =
+
+#
+# If this is specified, it will override the default copyright.
+#
+FILE_nlm_copyright =
+
+#
+# Any additional imports go here
+#
+FILES_nlm_Ximports = \
+ @libc.imp \
+ @$(APR)/aprlib.imp \
+ $(EOLIST)
+
+#
+# Any symbols exported to here
+#
+FILES_nlm_exports = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the LIB target above.
+# Paths must all use the '/' character
+#
+FILES_lib_objs = \
+ $(EOLIST)
+
+#
+# implement targets and dependancies (leave this section alone)
+#
+
+libs :: $(OBJDIR) $(TARGET_lib)
+
+nlms :: libs $(TARGET_nlm)
+
+#
+# Updated this target to create necessary directories and copy files to the
+# correct place. (See $(APR_WORK)\build\NWGNUhead.inc for examples)
+#
+install :: nlms FORCE
+
+#
+# Any specialized rules here
+#
+
+#
+# Include the 'tail' makefile that has targets that depend on variables defined
+# in this makefile
+#
+
+include $(APR_WORK)\build\NWGNUtail.inc
+
diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUteststrmatch b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUteststrmatch new file mode 100644 index 00000000..bb8b85e7 --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUteststrmatch @@ -0,0 +1,254 @@ +#
+# Make sure all needed macro's are defined
+#
+
+#
+# Get the 'head' of the build environment if necessary. This includes default
+# targets and paths to tools
+#
+
+include $(APR_WORK)\build\NWGNUhead.inc
+
+#
+# These directories will be at the beginning of the include list, followed by
+# INCDIRS
+#
+XINCDIRS += \
+ $(APR_WORK)/include \
+ $(APU_WORK)/include \
+ $(APR_WORK)/include/arch/NetWare \
+ $(EOLIST)
+
+#
+# These flags will come after CFLAGS
+#
+XCFLAGS += \
+ $(EOLIST)
+
+#
+# These defines will come after DEFINES
+#
+XDEFINES += \
+ $(EOLIST)
+
+#
+# These flags will be added to the link.opt file
+#
+XLFLAGS += \
+ $(EOLIST)
+
+#
+# These values will be appended to the correct variables based on the value of
+# RELEASE
+#
+ifeq "$(RELEASE)" "debug"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "noopt"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "release"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+#
+# These are used by the link target if an NLM is being generated
+# This is used by the link 'name' directive to name the nlm. If left blank
+# TARGET_nlm (see below) will be used.
+#
+NLM_NAME = teststrmatch
+
+#
+# This is used by the link '-desc ' directive.
+# If left blank, NLM_NAME will be used.
+#
+NLM_DESCRIPTION = NLM is to test the APR-UTIL functions
+
+#
+# This is used by the '-threadname' directive. If left blank,
+# NLM_NAME Thread will be used.
+#
+NLM_THREAD_NAME = $(NLM_NAME)
+
+#
+# This is used by the '-screenname' directive. If left blank,
+# 'Apache for NetWare' Thread will be used.
+#
+NLM_SCREEN_NAME = $(NLM_NAME)
+
+#
+# If this is specified, it will override VERSION value in
+# $(APR_WORK)\build\NWGNUenvironment.inc
+#
+NLM_VERSION =
+
+#
+# If this is specified, it will override the default of 64K
+#
+NLM_STACK_SIZE =
+
+#
+# If this is specified it will be used by the link '-entry' directive
+#
+NLM_ENTRY_SYM = _LibCPrelude
+
+#
+# If this is specified it will be used by the link '-exit' directive
+#
+NLM_EXIT_SYM = _LibCPostlude
+
+#
+# If this is specified it will be used by the link '-check' directive
+#
+NLM_CHECK_SYM =
+
+#
+# If this is specified it will be used by the link '-flags' directive
+#
+NLM_FLAGS = AUTOUNLOAD, PSEUDOPREEMPTION
+
+#
+# If this is specified it will be linked in with the XDCData option in the def
+# file instead of the default of $(APR)/misc/netware/apache.xdc. XDCData can
+# be disabled by setting APACHE_UNIPROC in the environment
+#
+XDCDATA =
+
+#
+# Declare all target files (you must add your files here)
+#
+
+#
+# If there is an NLM target, put it here
+#
+TARGET_nlm = \
+ $(OBJDIR)/$(NLM_NAME).nlm \
+ $(EOLIST)
+
+#
+# If there is an LIB target, put it here
+#
+TARGET_lib = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the NLM target above.
+# Paths must all use the '/' character
+#
+FILES_nlm_objs = \
+ $(OBJDIR)/$(NLM_NAME).o \
+ $(OBJDIR)/nw_misc.o \
+ $(EOLIST)
+
+# Pending tests
+
+#
+# These are the LIB files needed to create the NLM target above.
+# These will be added as a library command in the link.opt file.
+#
+FILES_nlm_libs = \
+ libcpre.o \
+ $(EOLIST)
+
+#
+# These are the modules that the above NLM target depends on to load.
+# These will be added as a module command in the link.opt file.
+#
+FILES_nlm_modules = \
+ Libc \
+ APRLIB \
+ $(EOLIST)
+
+#
+# If the nlm has a msg file, put it's path here
+#
+FILE_nlm_msg =
+
+#
+# If the nlm has a hlp file put it's path here
+#
+FILE_nlm_hlp =
+
+#
+# If this is specified, it will override the default copyright.
+#
+FILE_nlm_copyright =
+
+#
+# Any additional imports go here
+#
+FILES_nlm_Ximports = \
+ @libc.imp \
+ @$(APR)/aprlib.imp \
+ $(EOLIST)
+
+#
+# Any symbols exported to here
+#
+FILES_nlm_exports = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the LIB target above.
+# Paths must all use the '/' character
+#
+FILES_lib_objs = \
+ $(EOLIST)
+
+#
+# implement targets and dependancies (leave this section alone)
+#
+
+libs :: $(OBJDIR) $(TARGET_lib)
+
+nlms :: libs $(TARGET_nlm)
+
+#
+# Updated this target to create necessary directories and copy files to the
+# correct place. (See $(APR_WORK)\build\NWGNUhead.inc for examples)
+#
+install :: nlms FORCE
+
+#
+# Any specialized rules here
+#
+
+#
+# Include the 'tail' makefile that has targets that depend on variables defined
+# in this makefile
+#
+
+include $(APR_WORK)\build\NWGNUtail.inc
+
diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtesturi b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtesturi new file mode 100644 index 00000000..e3b228bc --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtesturi @@ -0,0 +1,254 @@ +#
+# Make sure all needed macro's are defined
+#
+
+#
+# Get the 'head' of the build environment if necessary. This includes default
+# targets and paths to tools
+#
+
+include $(APR_WORK)\build\NWGNUhead.inc
+
+#
+# These directories will be at the beginning of the include list, followed by
+# INCDIRS
+#
+XINCDIRS += \
+ $(APR_WORK)/include \
+ $(APU_WORK)/include \
+ $(APR_WORK)/include/arch/NetWare \
+ $(EOLIST)
+
+#
+# These flags will come after CFLAGS
+#
+XCFLAGS += \
+ $(EOLIST)
+
+#
+# These defines will come after DEFINES
+#
+XDEFINES += \
+ $(EOLIST)
+
+#
+# These flags will be added to the link.opt file
+#
+XLFLAGS += \
+ $(EOLIST)
+
+#
+# These values will be appended to the correct variables based on the value of
+# RELEASE
+#
+ifeq "$(RELEASE)" "debug"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "noopt"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "release"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+#
+# These are used by the link target if an NLM is being generated
+# This is used by the link 'name' directive to name the nlm. If left blank
+# TARGET_nlm (see below) will be used.
+#
+NLM_NAME = testuri
+
+#
+# This is used by the link '-desc ' directive.
+# If left blank, NLM_NAME will be used.
+#
+NLM_DESCRIPTION = NLM is to test the APR-UTIL functions
+
+#
+# This is used by the '-threadname' directive. If left blank,
+# NLM_NAME Thread will be used.
+#
+NLM_THREAD_NAME = $(NLM_NAME)
+
+#
+# This is used by the '-screenname' directive. If left blank,
+# 'Apache for NetWare' Thread will be used.
+#
+NLM_SCREEN_NAME = $(NLM_NAME)
+
+#
+# If this is specified, it will override VERSION value in
+# $(APR_WORK)\build\NWGNUenvironment.inc
+#
+NLM_VERSION =
+
+#
+# If this is specified, it will override the default of 64K
+#
+NLM_STACK_SIZE =
+
+#
+# If this is specified it will be used by the link '-entry' directive
+#
+NLM_ENTRY_SYM = _LibCPrelude
+
+#
+# If this is specified it will be used by the link '-exit' directive
+#
+NLM_EXIT_SYM = _LibCPostlude
+
+#
+# If this is specified it will be used by the link '-check' directive
+#
+NLM_CHECK_SYM =
+
+#
+# If this is specified it will be used by the link '-flags' directive
+#
+NLM_FLAGS = AUTOUNLOAD, PSEUDOPREEMPTION
+
+#
+# If this is specified it will be linked in with the XDCData option in the def
+# file instead of the default of $(APR)/misc/netware/apache.xdc. XDCData can
+# be disabled by setting APACHE_UNIPROC in the environment
+#
+XDCDATA =
+
+#
+# Declare all target files (you must add your files here)
+#
+
+#
+# If there is an NLM target, put it here
+#
+TARGET_nlm = \
+ $(OBJDIR)/$(NLM_NAME).nlm \
+ $(EOLIST)
+
+#
+# If there is an LIB target, put it here
+#
+TARGET_lib = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the NLM target above.
+# Paths must all use the '/' character
+#
+FILES_nlm_objs = \
+ $(OBJDIR)/$(NLM_NAME).o \
+ $(OBJDIR)/nw_misc.o \
+ $(EOLIST)
+
+# Pending tests
+
+#
+# These are the LIB files needed to create the NLM target above.
+# These will be added as a library command in the link.opt file.
+#
+FILES_nlm_libs = \
+ libcpre.o \
+ $(EOLIST)
+
+#
+# These are the modules that the above NLM target depends on to load.
+# These will be added as a module command in the link.opt file.
+#
+FILES_nlm_modules = \
+ Libc \
+ APRLIB \
+ $(EOLIST)
+
+#
+# If the nlm has a msg file, put it's path here
+#
+FILE_nlm_msg =
+
+#
+# If the nlm has a hlp file put it's path here
+#
+FILE_nlm_hlp =
+
+#
+# If this is specified, it will override the default copyright.
+#
+FILE_nlm_copyright =
+
+#
+# Any additional imports go here
+#
+FILES_nlm_Ximports = \
+ @libc.imp \
+ @$(APR)/aprlib.imp \
+ $(EOLIST)
+
+#
+# Any symbols exported to here
+#
+FILES_nlm_exports = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the LIB target above.
+# Paths must all use the '/' character
+#
+FILES_lib_objs = \
+ $(EOLIST)
+
+#
+# implement targets and dependancies (leave this section alone)
+#
+
+libs :: $(OBJDIR) $(TARGET_lib)
+
+nlms :: libs $(TARGET_nlm)
+
+#
+# Updated this target to create necessary directories and copy files to the
+# correct place. (See $(APR_WORK)\build\NWGNUhead.inc for examples)
+#
+install :: nlms FORCE
+
+#
+# Any specialized rules here
+#
+
+#
+# Include the 'tail' makefile that has targets that depend on variables defined
+# in this makefile
+#
+
+include $(APR_WORK)\build\NWGNUtail.inc
+
diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestuuid b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestuuid new file mode 100644 index 00000000..d100af7f --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestuuid @@ -0,0 +1,254 @@ +#
+# Make sure all needed macro's are defined
+#
+
+#
+# Get the 'head' of the build environment if necessary. This includes default
+# targets and paths to tools
+#
+
+include $(APR_WORK)\build\NWGNUhead.inc
+
+#
+# These directories will be at the beginning of the include list, followed by
+# INCDIRS
+#
+XINCDIRS += \
+ $(APR_WORK)/include \
+ $(APU_WORK)/include \
+ $(APR_WORK)/include/arch/NetWare \
+ $(EOLIST)
+
+#
+# These flags will come after CFLAGS
+#
+XCFLAGS += \
+ $(EOLIST)
+
+#
+# These defines will come after DEFINES
+#
+XDEFINES += \
+ $(EOLIST)
+
+#
+# These flags will be added to the link.opt file
+#
+XLFLAGS += \
+ $(EOLIST)
+
+#
+# These values will be appended to the correct variables based on the value of
+# RELEASE
+#
+ifeq "$(RELEASE)" "debug"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "noopt"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "release"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+#
+# These are used by the link target if an NLM is being generated
+# This is used by the link 'name' directive to name the nlm. If left blank
+# TARGET_nlm (see below) will be used.
+#
+NLM_NAME = testuuid
+
+#
+# This is used by the link '-desc ' directive.
+# If left blank, NLM_NAME will be used.
+#
+NLM_DESCRIPTION = NLM is to test the APR-UTIL functions
+
+#
+# This is used by the '-threadname' directive. If left blank,
+# NLM_NAME Thread will be used.
+#
+NLM_THREAD_NAME = $(NLM_NAME)
+
+#
+# This is used by the '-screenname' directive. If left blank,
+# 'Apache for NetWare' Thread will be used.
+#
+NLM_SCREEN_NAME = $(NLM_NAME)
+
+#
+# If this is specified, it will override VERSION value in
+# $(APR_WORK)\build\NWGNUenvironment.inc
+#
+NLM_VERSION =
+
+#
+# If this is specified, it will override the default of 64K
+#
+NLM_STACK_SIZE =
+
+#
+# If this is specified it will be used by the link '-entry' directive
+#
+NLM_ENTRY_SYM = _LibCPrelude
+
+#
+# If this is specified it will be used by the link '-exit' directive
+#
+NLM_EXIT_SYM = _LibCPostlude
+
+#
+# If this is specified it will be used by the link '-check' directive
+#
+NLM_CHECK_SYM =
+
+#
+# If this is specified it will be used by the link '-flags' directive
+#
+NLM_FLAGS = AUTOUNLOAD, PSEUDOPREEMPTION
+
+#
+# If this is specified it will be linked in with the XDCData option in the def
+# file instead of the default of $(APR)/misc/netware/apache.xdc. XDCData can
+# be disabled by setting APACHE_UNIPROC in the environment
+#
+XDCDATA =
+
+#
+# Declare all target files (you must add your files here)
+#
+
+#
+# If there is an NLM target, put it here
+#
+TARGET_nlm = \
+ $(OBJDIR)/$(NLM_NAME).nlm \
+ $(EOLIST)
+
+#
+# If there is an LIB target, put it here
+#
+TARGET_lib = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the NLM target above.
+# Paths must all use the '/' character
+#
+FILES_nlm_objs = \
+ $(OBJDIR)/$(NLM_NAME).o \
+ $(OBJDIR)/nw_misc.o \
+ $(EOLIST)
+
+# Pending tests
+
+#
+# These are the LIB files needed to create the NLM target above.
+# These will be added as a library command in the link.opt file.
+#
+FILES_nlm_libs = \
+ libcpre.o \
+ $(EOLIST)
+
+#
+# These are the modules that the above NLM target depends on to load.
+# These will be added as a module command in the link.opt file.
+#
+FILES_nlm_modules = \
+ Libc \
+ APRLIB \
+ $(EOLIST)
+
+#
+# If the nlm has a msg file, put it's path here
+#
+FILE_nlm_msg =
+
+#
+# If the nlm has a hlp file put it's path here
+#
+FILE_nlm_hlp =
+
+#
+# If this is specified, it will override the default copyright.
+#
+FILE_nlm_copyright =
+
+#
+# Any additional imports go here
+#
+FILES_nlm_Ximports = \
+ @libc.imp \
+ @$(APR)/aprlib.imp \
+ $(EOLIST)
+
+#
+# Any symbols exported to here
+#
+FILES_nlm_exports = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the LIB target above.
+# Paths must all use the '/' character
+#
+FILES_lib_objs = \
+ $(EOLIST)
+
+#
+# implement targets and dependancies (leave this section alone)
+#
+
+libs :: $(OBJDIR) $(TARGET_lib)
+
+nlms :: libs $(TARGET_nlm)
+
+#
+# Updated this target to create necessary directories and copy files to the
+# correct place. (See $(APR_WORK)\build\NWGNUhead.inc for examples)
+#
+install :: nlms FORCE
+
+#
+# Any specialized rules here
+#
+
+#
+# Include the 'tail' makefile that has targets that depend on variables defined
+# in this makefile
+#
+
+include $(APR_WORK)\build\NWGNUtail.inc
+
diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestxlate b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestxlate new file mode 100644 index 00000000..fdcec184 --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestxlate @@ -0,0 +1,254 @@ +#
+# Make sure all needed macro's are defined
+#
+
+#
+# Get the 'head' of the build environment if necessary. This includes default
+# targets and paths to tools
+#
+
+include $(APR_WORK)\build\NWGNUhead.inc
+
+#
+# These directories will be at the beginning of the include list, followed by
+# INCDIRS
+#
+XINCDIRS += \
+ $(APR_WORK)/include \
+ $(APU_WORK)/include \
+ $(APR_WORK)/include/arch/NetWare \
+ $(EOLIST)
+
+#
+# These flags will come after CFLAGS
+#
+XCFLAGS += \
+ $(EOLIST)
+
+#
+# These defines will come after DEFINES
+#
+XDEFINES += \
+ $(EOLIST)
+
+#
+# These flags will be added to the link.opt file
+#
+XLFLAGS += \
+ $(EOLIST)
+
+#
+# These values will be appended to the correct variables based on the value of
+# RELEASE
+#
+ifeq "$(RELEASE)" "debug"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "noopt"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "release"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+#
+# These are used by the link target if an NLM is being generated
+# This is used by the link 'name' directive to name the nlm. If left blank
+# TARGET_nlm (see below) will be used.
+#
+NLM_NAME = testxlate
+
+#
+# This is used by the link '-desc ' directive.
+# If left blank, NLM_NAME will be used.
+#
+NLM_DESCRIPTION = NLM is to test the APR-UTIL functions
+
+#
+# This is used by the '-threadname' directive. If left blank,
+# NLM_NAME Thread will be used.
+#
+NLM_THREAD_NAME = $(NLM_NAME)
+
+#
+# This is used by the '-screenname' directive. If left blank,
+# 'Apache for NetWare' Thread will be used.
+#
+NLM_SCREEN_NAME = $(NLM_NAME)
+
+#
+# If this is specified, it will override VERSION value in
+# $(APR_WORK)\build\NWGNUenvironment.inc
+#
+NLM_VERSION =
+
+#
+# If this is specified, it will override the default of 64K
+#
+NLM_STACK_SIZE =
+
+#
+# If this is specified it will be used by the link '-entry' directive
+#
+NLM_ENTRY_SYM = _LibCPrelude
+
+#
+# If this is specified it will be used by the link '-exit' directive
+#
+NLM_EXIT_SYM = _LibCPostlude
+
+#
+# If this is specified it will be used by the link '-check' directive
+#
+NLM_CHECK_SYM =
+
+#
+# If this is specified it will be used by the link '-flags' directive
+#
+NLM_FLAGS = AUTOUNLOAD, PSEUDOPREEMPTION
+
+#
+# If this is specified it will be linked in with the XDCData option in the def
+# file instead of the default of $(APR)/misc/netware/apache.xdc. XDCData can
+# be disabled by setting APACHE_UNIPROC in the environment
+#
+XDCDATA =
+
+#
+# Declare all target files (you must add your files here)
+#
+
+#
+# If there is an NLM target, put it here
+#
+TARGET_nlm = \
+ $(OBJDIR)/$(NLM_NAME).nlm \
+ $(EOLIST)
+
+#
+# If there is an LIB target, put it here
+#
+TARGET_lib = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the NLM target above.
+# Paths must all use the '/' character
+#
+FILES_nlm_objs = \
+ $(OBJDIR)/$(NLM_NAME).o \
+ $(OBJDIR)/nw_misc.o \
+ $(EOLIST)
+
+# Pending tests
+
+#
+# These are the LIB files needed to create the NLM target above.
+# These will be added as a library command in the link.opt file.
+#
+FILES_nlm_libs = \
+ libcpre.o \
+ $(EOLIST)
+
+#
+# These are the modules that the above NLM target depends on to load.
+# These will be added as a module command in the link.opt file.
+#
+FILES_nlm_modules = \
+ Libc \
+ APRLIB \
+ $(EOLIST)
+
+#
+# If the nlm has a msg file, put it's path here
+#
+FILE_nlm_msg =
+
+#
+# If the nlm has a hlp file put it's path here
+#
+FILE_nlm_hlp =
+
+#
+# If this is specified, it will override the default copyright.
+#
+FILE_nlm_copyright =
+
+#
+# Any additional imports go here
+#
+FILES_nlm_Ximports = \
+ @libc.imp \
+ @$(APR)/aprlib.imp \
+ $(EOLIST)
+
+#
+# Any symbols exported to here
+#
+FILES_nlm_exports = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the LIB target above.
+# Paths must all use the '/' character
+#
+FILES_lib_objs = \
+ $(EOLIST)
+
+#
+# implement targets and dependancies (leave this section alone)
+#
+
+libs :: $(OBJDIR) $(TARGET_lib)
+
+nlms :: libs $(TARGET_nlm)
+
+#
+# Updated this target to create necessary directories and copy files to the
+# correct place. (See $(APR_WORK)\build\NWGNUhead.inc for examples)
+#
+install :: nlms FORCE
+
+#
+# Any specialized rules here
+#
+
+#
+# Include the 'tail' makefile that has targets that depend on variables defined
+# in this makefile
+#
+
+include $(APR_WORK)\build\NWGNUtail.inc
+
diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestxml b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestxml new file mode 100644 index 00000000..00225056 --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/NWGNUtestxml @@ -0,0 +1,254 @@ +#
+# Make sure all needed macro's are defined
+#
+
+#
+# Get the 'head' of the build environment if necessary. This includes default
+# targets and paths to tools
+#
+
+include $(APR_WORK)\build\NWGNUhead.inc
+
+#
+# These directories will be at the beginning of the include list, followed by
+# INCDIRS
+#
+XINCDIRS += \
+ $(APR_WORK)/include \
+ $(APU_WORK)/include \
+ $(APR_WORK)/include/arch/NetWare \
+ $(EOLIST)
+
+#
+# These flags will come after CFLAGS
+#
+XCFLAGS += \
+ $(EOLIST)
+
+#
+# These defines will come after DEFINES
+#
+XDEFINES += \
+ $(EOLIST)
+
+#
+# These flags will be added to the link.opt file
+#
+XLFLAGS += \
+ $(EOLIST)
+
+#
+# These values will be appended to the correct variables based on the value of
+# RELEASE
+#
+ifeq "$(RELEASE)" "debug"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "noopt"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+ifeq "$(RELEASE)" "release"
+XINCDIRS += \
+ $(EOLIST)
+
+XCFLAGS += \
+ $(EOLIST)
+
+XDEFINES += \
+ $(EOLIST)
+
+XLFLAGS += \
+ $(EOLIST)
+endif
+
+#
+# These are used by the link target if an NLM is being generated
+# This is used by the link 'name' directive to name the nlm. If left blank
+# TARGET_nlm (see below) will be used.
+#
+NLM_NAME = testxml
+
+#
+# This is used by the link '-desc ' directive.
+# If left blank, NLM_NAME will be used.
+#
+NLM_DESCRIPTION = NLM is to test the APR-UTIL functions
+
+#
+# This is used by the '-threadname' directive. If left blank,
+# NLM_NAME Thread will be used.
+#
+NLM_THREAD_NAME = $(NLM_NAME)
+
+#
+# This is used by the '-screenname' directive. If left blank,
+# 'Apache for NetWare' Thread will be used.
+#
+NLM_SCREEN_NAME = $(NLM_NAME)
+
+#
+# If this is specified, it will override VERSION value in
+# $(APR_WORK)\build\NWGNUenvironment.inc
+#
+NLM_VERSION =
+
+#
+# If this is specified, it will override the default of 64K
+#
+NLM_STACK_SIZE =
+
+#
+# If this is specified it will be used by the link '-entry' directive
+#
+NLM_ENTRY_SYM = _LibCPrelude
+
+#
+# If this is specified it will be used by the link '-exit' directive
+#
+NLM_EXIT_SYM = _LibCPostlude
+
+#
+# If this is specified it will be used by the link '-check' directive
+#
+NLM_CHECK_SYM =
+
+#
+# If this is specified it will be used by the link '-flags' directive
+#
+NLM_FLAGS = AUTOUNLOAD, PSEUDOPREEMPTION
+
+#
+# If this is specified it will be linked in with the XDCData option in the def
+# file instead of the default of $(APR)/misc/netware/apache.xdc. XDCData can
+# be disabled by setting APACHE_UNIPROC in the environment
+#
+XDCDATA =
+
+#
+# Declare all target files (you must add your files here)
+#
+
+#
+# If there is an NLM target, put it here
+#
+TARGET_nlm = \
+ $(OBJDIR)/$(NLM_NAME).nlm \
+ $(EOLIST)
+
+#
+# If there is an LIB target, put it here
+#
+TARGET_lib = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the NLM target above.
+# Paths must all use the '/' character
+#
+FILES_nlm_objs = \
+ $(OBJDIR)/$(NLM_NAME).o \
+ $(OBJDIR)/nw_misc.o \
+ $(EOLIST)
+
+# Pending tests
+
+#
+# These are the LIB files needed to create the NLM target above.
+# These will be added as a library command in the link.opt file.
+#
+FILES_nlm_libs = \
+ libcpre.o \
+ $(EOLIST)
+
+#
+# These are the modules that the above NLM target depends on to load.
+# These will be added as a module command in the link.opt file.
+#
+FILES_nlm_modules = \
+ Libc \
+ APRLIB \
+ $(EOLIST)
+
+#
+# If the nlm has a msg file, put it's path here
+#
+FILE_nlm_msg =
+
+#
+# If the nlm has a hlp file put it's path here
+#
+FILE_nlm_hlp =
+
+#
+# If this is specified, it will override the default copyright.
+#
+FILE_nlm_copyright =
+
+#
+# Any additional imports go here
+#
+FILES_nlm_Ximports = \
+ @libc.imp \
+ @$(APR)/aprlib.imp \
+ $(EOLIST)
+
+#
+# Any symbols exported to here
+#
+FILES_nlm_exports = \
+ $(EOLIST)
+
+#
+# These are the OBJ files needed to create the LIB target above.
+# Paths must all use the '/' character
+#
+FILES_lib_objs = \
+ $(EOLIST)
+
+#
+# implement targets and dependancies (leave this section alone)
+#
+
+libs :: $(OBJDIR) $(TARGET_lib)
+
+nlms :: libs $(TARGET_nlm)
+
+#
+# Updated this target to create necessary directories and copy files to the
+# correct place. (See $(APR_WORK)\build\NWGNUhead.inc for examples)
+#
+install :: nlms FORCE
+
+#
+# Any specialized rules here
+#
+
+#
+# Include the 'tail' makefile that has targets that depend on variables defined
+# in this makefile
+#
+
+include $(APR_WORK)\build\NWGNUtail.inc
+
diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/data/billion-laughs.xml b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/data/billion-laughs.xml new file mode 100644 index 00000000..3af89ae4 --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/data/billion-laughs.xml @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<!DOCTYPE billion [ +<!ELEMENT billion (#PCDATA)> +<!ENTITY laugh0 "ha"> +<!ENTITY laugh1 "&laugh0;&laugh0;"> +<!ENTITY laugh2 "&laugh1;&laugh1;"> +<!ENTITY laugh3 "&laugh2;&laugh2;"> +<!ENTITY laugh4 "&laugh3;&laugh3;"> +<!ENTITY laugh5 "&laugh4;&laugh4;"> +<!ENTITY laugh6 "&laugh5;&laugh5;"> +<!ENTITY laugh7 "&laugh6;&laugh6;"> +<!ENTITY laugh8 "&laugh7;&laugh7;"> +<!ENTITY laugh9 "&laugh8;&laugh8;"> +<!ENTITY laugh10 "&laugh9;&laugh9;"> +<!ENTITY laugh11 "&laugh10;&laugh10;"> +<!ENTITY laugh12 "&laugh11;&laugh11;"> +<!ENTITY laugh13 "&laugh12;&laugh12;"> +<!ENTITY laugh14 "&laugh13;&laugh13;"> +<!ENTITY laugh15 "&laugh14;&laugh14;"> +<!ENTITY laugh16 "&laugh15;&laugh15;"> +<!ENTITY laugh17 "&laugh16;&laugh16;"> +<!ENTITY laugh18 "&laugh17;&laugh17;"> +<!ENTITY laugh19 "&laugh18;&laugh18;"> +<!ENTITY laugh20 "&laugh19;&laugh19;"> +<!ENTITY laugh21 "&laugh20;&laugh20;"> +<!ENTITY laugh22 "&laugh21;&laugh21;"> +<!ENTITY laugh23 "&laugh22;&laugh22;"> +<!ENTITY laugh24 "&laugh23;&laugh23;"> +<!ENTITY laugh25 "&laugh24;&laugh24;"> +<!ENTITY laugh26 "&laugh25;&laugh25;"> +<!ENTITY laugh27 "&laugh26;&laugh26;"> +<!ENTITY laugh28 "&laugh27;&laugh27;"> +<!ENTITY laugh29 "&laugh28;&laugh28;"> +<!ENTITY laugh30 "&laugh29;&laugh29;"> +]> +<billion>&laugh30;</billion> diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/nw_misc.c b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/nw_misc.c new file mode 100644 index 00000000..91874411 --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/nw_misc.c @@ -0,0 +1,17 @@ +#include <stdlib.h>
+#include <netware.h>
+#include <screen.h>
+
+void _NonAppStop( void )
+{
+ if (getenv("_IN_NETWARE_BASH_") == NULL)
+ pressanykey();
+}
+
+/*
+static void test_not_impl(CuTest *tc)
+{
+ CuNotImpl(tc, "Test not implemented on this platform yet");
+}
+*/
+
diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/test_apu.h b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/test_apu.h new file mode 100644 index 00000000..8d5f6dde --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/test_apu.h @@ -0,0 +1,100 @@ +/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as + * applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Some simple functions to make the test apps easier to write and + * a bit more consistent... + * this is a >copy< of apr_test.h + */ + +/* Things to bear in mind when using these... + * + * If you include '\t' within the string passed in it won't be included + * in the spacing, so use spaces instead :) + * + */ + +#ifndef APU_TEST_INCLUDES +#define APU_TEST_INCLUDES + +#include "apr_strings.h" +#include "apr_time.h" + +#define TEST_EQ(str, func, value, good, bad) \ + printf("%-60s", str); \ + { \ + apr_status_t rv; \ + if ((rv = func) == value){ \ + char errmsg[200]; \ + printf("%s\n", bad); \ + fprintf(stderr, "Error was %d : %s\n", rv, \ + apr_strerror(rv, (char*)&errmsg, 200)); \ + exit(-1); \ + } \ + printf("%s\n", good); \ + } + +#define TEST_NEQ(str, func, value, good, bad) \ + printf("%-60s", str); \ + { \ + apr_status_t rv; \ + if ((rv = func) != value){ \ + char errmsg[200]; \ + printf("%s\n", bad); \ + fprintf(stderr, "Error was %d : %s\n", rv, \ + apr_strerror(rv, (char*)&errmsg, 200)); \ + exit(-1); \ + } \ + printf("%s\n", good); \ + } + +#define TEST_STATUS(str, func, testmacro, good, bad) \ + printf("%-60s", str); \ + { \ + apr_status_t rv = func; \ + if (!testmacro(rv)) { \ + char errmsg[200]; \ + printf("%s\n", bad); \ + fprintf(stderr, "Error was %d : %s\n", rv, \ + apr_strerror(rv, (char*)&errmsg, 200)); \ + exit(-1); \ + } \ + printf("%s\n", good); \ + } + +#define STD_TEST_NEQ(str, func) \ + TEST_NEQ(str, func, APR_SUCCESS, "OK", "Failed"); + +#define PRINT_ERROR(rv) \ + { \ + char errmsg[200]; \ + fprintf(stderr, "Error was %d : %s\n", rv, \ + apr_strerror(rv, (char*)&errmsg, 200)); \ + exit(-1); \ + } + +#define MSG_AND_EXIT(msg) \ + printf("%s\n", msg); \ + exit (-1); + +#define TIME_FUNCTION(time, function) \ + { \ + apr_time_t tt = apr_time_now(); \ + function; \ + time = apr_time_now() - tt; \ + } + + +#endif /* APU_TEST_INCLUDES */ diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testdate.c b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testdate.c new file mode 100644 index 00000000..173f03bf --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testdate.c @@ -0,0 +1,198 @@ +/* This program tests the date_parse_http routine in ../main/util_date.c. + * + * It is only semiautomated in that I would run it, modify the code to + * use a different algorithm or seed, recompile and run again, etc. + * Obviously it should use an argument for that, but I never got around + * to changing the implementation. + * + * gcc -g -O2 -I../main -o test_date ../main/util_date.o test_date.c + * test_date | egrep '^No ' + * + * Roy Fielding, 1996 + */ + +#include <stdio.h> +#include <stdlib.h> +#include <time.h> +#include "apr_date.h" + +#ifndef srand48 +#define srand48 srandom +#endif + +#ifndef mrand48 +#define mrand48 random +#endif + +void gm_timestr_822(char *ts, apr_time_t sec); +void gm_timestr_850(char *ts, apr_time_t sec); +void gm_timestr_ccc(char *ts, apr_time_t sec); + +static const apr_time_t year2secs[] = { + APR_INT64_C(0), /* 1970 */ + APR_INT64_C(31536000), /* 1971 */ + APR_INT64_C(63072000), /* 1972 */ + APR_INT64_C(94694400), /* 1973 */ + APR_INT64_C(126230400), /* 1974 */ + APR_INT64_C(157766400), /* 1975 */ + APR_INT64_C(189302400), /* 1976 */ + APR_INT64_C(220924800), /* 1977 */ + APR_INT64_C(252460800), /* 1978 */ + APR_INT64_C(283996800), /* 1979 */ + APR_INT64_C(315532800), /* 1980 */ + APR_INT64_C(347155200), /* 1981 */ + APR_INT64_C(378691200), /* 1982 */ + APR_INT64_C(410227200), /* 1983 */ + APR_INT64_C(441763200), /* 1984 */ + APR_INT64_C(473385600), /* 1985 */ + APR_INT64_C(504921600), /* 1986 */ + APR_INT64_C(536457600), /* 1987 */ + APR_INT64_C(567993600), /* 1988 */ + APR_INT64_C(599616000), /* 1989 */ + APR_INT64_C(631152000), /* 1990 */ + APR_INT64_C(662688000), /* 1991 */ + APR_INT64_C(694224000), /* 1992 */ + APR_INT64_C(725846400), /* 1993 */ + APR_INT64_C(757382400), /* 1994 */ + APR_INT64_C(788918400), /* 1995 */ + APR_INT64_C(820454400), /* 1996 */ + APR_INT64_C(852076800), /* 1997 */ + APR_INT64_C(883612800), /* 1998 */ + APR_INT64_C(915148800), /* 1999 */ + APR_INT64_C(946684800), /* 2000 */ + APR_INT64_C(978307200), /* 2001 */ + APR_INT64_C(1009843200), /* 2002 */ + APR_INT64_C(1041379200), /* 2003 */ + APR_INT64_C(1072915200), /* 2004 */ + APR_INT64_C(1104537600), /* 2005 */ + APR_INT64_C(1136073600), /* 2006 */ + APR_INT64_C(1167609600), /* 2007 */ + APR_INT64_C(1199145600), /* 2008 */ + APR_INT64_C(1230768000), /* 2009 */ + APR_INT64_C(1262304000), /* 2010 */ + APR_INT64_C(1293840000), /* 2011 */ + APR_INT64_C(1325376000), /* 2012 */ + APR_INT64_C(1356998400), /* 2013 */ + APR_INT64_C(1388534400), /* 2014 */ + APR_INT64_C(1420070400), /* 2015 */ + APR_INT64_C(1451606400), /* 2016 */ + APR_INT64_C(1483228800), /* 2017 */ + APR_INT64_C(1514764800), /* 2018 */ + APR_INT64_C(1546300800), /* 2019 */ + APR_INT64_C(1577836800), /* 2020 */ + APR_INT64_C(1609459200), /* 2021 */ + APR_INT64_C(1640995200), /* 2022 */ + APR_INT64_C(1672531200), /* 2023 */ + APR_INT64_C(1704067200), /* 2024 */ + APR_INT64_C(1735689600), /* 2025 */ + APR_INT64_C(1767225600), /* 2026 */ + APR_INT64_C(1798761600), /* 2027 */ + APR_INT64_C(1830297600), /* 2028 */ + APR_INT64_C(1861920000), /* 2029 */ + APR_INT64_C(1893456000), /* 2030 */ + APR_INT64_C(1924992000), /* 2031 */ + APR_INT64_C(1956528000), /* 2032 */ + APR_INT64_C(1988150400), /* 2033 */ + APR_INT64_C(2019686400), /* 2034 */ + APR_INT64_C(2051222400), /* 2035 */ + APR_INT64_C(2082758400), /* 2036 */ + APR_INT64_C(2114380800), /* 2037 */ + APR_INT64_C(2145916800) /* 2038 */ +}; + +const char month_snames[12][4] = { + "Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec" +}; + +void gm_timestr_822(char *ts, apr_time_t sec) +{ + static const char *const days[7]= + {"Sun","Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; + struct tm *tms; + time_t ls = (time_t)sec; + + tms = gmtime(&ls); + + sprintf(ts, "%s, %.2d %s %d %.2d:%.2d:%.2d GMT", days[tms->tm_wday], + tms->tm_mday, month_snames[tms->tm_mon], tms->tm_year + 1900, + tms->tm_hour, tms->tm_min, tms->tm_sec); +} + +void gm_timestr_850(char *ts, apr_time_t sec) +{ + static const char *const days[7]= + {"Sunday","Monday", "Tuesday", "Wednesday", "Thursday", "Friday", + "Saturday"}; + struct tm *tms; + int year; + time_t ls = (time_t)sec; + + tms = gmtime(&ls); + + year = tms->tm_year; + if (year >= 100) year -= 100; + + sprintf(ts, "%s, %.2d-%s-%.2d %.2d:%.2d:%.2d GMT", days[tms->tm_wday], + tms->tm_mday, month_snames[tms->tm_mon], year, + tms->tm_hour, tms->tm_min, tms->tm_sec); +} + +void gm_timestr_ccc(char *ts, apr_time_t sec) +{ + static const char *const days[7]= + {"Sun","Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; + struct tm *tms; + time_t ls = (time_t)sec; + + tms = gmtime(&ls); + + sprintf(ts, "%s %s %2d %.2d:%.2d:%.2d %d", days[tms->tm_wday], + month_snames[tms->tm_mon], tms->tm_mday, + tms->tm_hour, tms->tm_min, tms->tm_sec, tms->tm_year + 1900); +} + +int main (void) +{ + int year, i; + apr_time_t guess; + apr_time_t offset = 0; + /* apr_time_t offset = 0; */ + /* apr_time_t offset = ((31 + 28) * 24 * 3600) - 1; */ + apr_time_t secstodate, newsecs; + char datestr[50]; + + for (year = 1970; year < 2038; ++year) { + secstodate = year2secs[year - 1970] + offset; + gm_timestr_822(datestr, secstodate); + secstodate *= APR_USEC_PER_SEC; + newsecs = apr_date_parse_http(datestr); + if (secstodate == newsecs) + printf("Yes %4d %19" APR_TIME_T_FMT " %s\n", year, secstodate, datestr); + else if (newsecs == APR_DATE_BAD) + printf("No %4d %19" APR_TIME_T_FMT " %19" APR_TIME_T_FMT " %s\n", + year, secstodate, newsecs, datestr); + else + printf("No* %4d %19" APR_TIME_T_FMT " %19" APR_TIME_T_FMT " %s\n", + year, secstodate, newsecs, datestr); + } + + srand48(978245L); + + for (i = 0; i < 10000; ++i) { + guess = (time_t)mrand48(); + if (guess < 0) guess *= -1; + secstodate = guess + offset; + gm_timestr_822(datestr, secstodate); + secstodate *= APR_USEC_PER_SEC; + newsecs = apr_date_parse_http(datestr); + if (secstodate == newsecs) + printf("Yes %" APR_TIME_T_FMT " %s\n", secstodate, datestr); + else if (newsecs == APR_DATE_BAD) + printf("No %" APR_TIME_T_FMT " %" APR_TIME_T_FMT " %s\n", + secstodate, newsecs, datestr); + else + printf("No* %" APR_TIME_T_FMT " %" APR_TIME_T_FMT " %s\n", + secstodate, newsecs, datestr); + } + exit(0); +} diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testdbm.c b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testdbm.c new file mode 100644 index 00000000..da787125 --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testdbm.c @@ -0,0 +1,425 @@ +/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as + * applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* This file came from the SDBM package (written by oz@nexus.yorku.ca). + * That package was under public domain. This file has been ported to + * APR, updated to ANSI C and other, newer idioms, and added to the Apache + * codebase under the above copyright and license. + */ + +/* + * testdbm: Simple APR dbm tester. + * Automatic test case: ./testdbm auto foo + * - Attempts to store and fetch values from the DBM. + * + * Run the program for more help. + */ + +#include "apr.h" +#include "apr_general.h" +#include "apr_pools.h" +#include "apr_errno.h" +#include "apr_getopt.h" +#include "apr_time.h" +#define APR_WANT_STRFUNC +#include "apr_want.h" + +#if APR_HAVE_STDIO_H +#include <stdio.h> +#endif +#if APR_HAVE_UNISTD_H +#include <unistd.h> +#endif +#include <stdlib.h> /* for atexit(), malloc() */ +#include <string.h> + +#include "apr_dbm.h" + +static const char *progname; +static int rflag; + +#define DERROR 0 +#define DLOOK 1 + +#define DDELETE 3 +#define DCAT 4 +#define DBUILD 5 +#define DPRESS 6 +#define DCREAT 7 +#define DNAME 8 +#define DTRUNC 9 +#define DAUTO 10 + +#define LINEMAX 8192 + +typedef struct { + const char *sname; + int scode; + int flags; +} cmd; + +static const cmd cmds[] = { + + { "fetch", DLOOK, APR_DBM_READONLY }, + { "get", DLOOK, APR_DBM_READONLY }, + { "look", DLOOK, APR_DBM_READONLY }, + { "add", DBUILD, APR_DBM_READWRITE }, + { "insert", DBUILD, APR_DBM_READWRITE }, + { "store", DBUILD, APR_DBM_READWRITE }, + { "delete", DDELETE, APR_DBM_READWRITE }, + { "remove", DDELETE, APR_DBM_READWRITE }, + { "dump", DCAT, APR_DBM_READONLY }, + { "list", DCAT, APR_DBM_READONLY }, + { "cat", DCAT, APR_DBM_READONLY }, + { "build", DBUILD, APR_DBM_RWCREATE }, /** this one creates the DB */ + { "creat", DCREAT, APR_DBM_RWCREATE }, + { "trunc", DTRUNC, APR_DBM_RWTRUNC }, + { "new", DCREAT, APR_DBM_RWCREATE }, + { "names", DNAME, APR_DBM_READONLY }, +#if 0 + {"squash", DPRESS, APR_DBM_READWRITE, }, + {"compact", DPRESS, APR_DBM_READWRITE, }, + {"compress", DPRESS, APR_DBM_READWRITE, }, +#endif + { "auto", DAUTO, APR_DBM_RWCREATE }, +}; + +#define CMD_SIZE (sizeof(cmds)/sizeof(cmd)) + +static void doit(const cmd *act, const char*type, const char *file, apr_pool_t *pool); +static const cmd *parse_command(const char *str); +static void prdatum(FILE *stream, apr_datum_t d); +static void oops(apr_dbm_t *dbm, apr_status_t rv, const char *s1, + const char *s2); +static void show_usage(void); + +int main(int argc, const char * const * argv) +{ + apr_pool_t *pool; + const cmd *act; + apr_getopt_t *os; + char optch; + const char *optarg; + const char*dbtype; + + (void) apr_initialize(); + apr_pool_create(&pool, NULL); + atexit(apr_terminate); + + (void) apr_getopt_init(&os, pool, argc, argv); + + progname = argv[0]; + dbtype = "default"; + + while (apr_getopt(os, "Rt:", &optch, &optarg) == APR_SUCCESS) { + switch (optch) { + case 'R': /* raw processing */ + rflag++; + break; + case 't': + dbtype = optarg; + break; + default: + show_usage(); + fputs("unknown option.",stderr); + exit(-1); + break; + } + } + + if (argc <= os->ind) { + show_usage(); + fputs("Note: If you have no clue what this program is, start with:\n", stderr); + fputs(" ./testdbm auto foo\n", stderr); + fputs(" where foo is the DBM prefix.\n", stderr); + exit(-2); + } + + if ((act = parse_command(argv[os->ind])) == NULL) { + show_usage(); + fprintf(stderr, "unrecognized command: %s\n", argv[os->ind]); + exit(-3); + } + + if (++os->ind >= argc) { + show_usage(); + fputs("please supply a DB file to use (may be created)\n", stderr); + exit(-4); + } + + doit(act, dbtype, argv[os->ind], pool); + + apr_pool_destroy(pool); + + return 0; +} + +static void doit(const cmd *act, const char*type, const char *file, + apr_pool_t *pool) +{ + apr_status_t rv; + apr_datum_t key; + apr_datum_t val; + apr_dbm_t *db; + char *op; + int n; + char *line; + const char *use1; + const char *use2; +#ifdef TIME + long start; + extern long time(); +#endif + + rv = apr_dbm_open_ex(&db, type, file, act->flags, APR_OS_DEFAULT, pool); + if (rv != APR_SUCCESS) + oops(db, rv, "cannot open: %s", file); + + line = (char *) apr_palloc(pool,LINEMAX); + + switch (act->scode) { + + case DLOOK: + while (fgets(line, LINEMAX, stdin) != NULL) { + n = strlen(line) - 1; + line[n] = 0; + if (n == 0) + break; + + key.dptr = line; + key.dsize = n; + rv = apr_dbm_fetch(db, key, &val); + if (rv == APR_SUCCESS) { + prdatum(stdout, val); + putchar('\n'); + continue; + } + prdatum(stderr, key); + fprintf(stderr, ": not found.\n"); + } + break; + + case DDELETE: + while (fgets(line, LINEMAX, stdin) != NULL) { + n = strlen(line) - 1; + line[n] = 0; + if (n == 0) + break; + + key.dptr = line; + key.dsize = n; + if (apr_dbm_delete(db, key) != APR_SUCCESS) { + prdatum(stderr, key); + fprintf(stderr, ": not found.\n"); + } + } + break; + case DCAT: + rv = apr_dbm_firstkey(db, &key); + if (rv != APR_SUCCESS) + oops(db, rv, "could not fetch first key: %s", file); + + while (key.dptr != NULL) { + prdatum(stdout, key); + putchar('\t'); + rv = apr_dbm_fetch(db, key, &val); + if (rv != APR_SUCCESS) + oops(db, rv, "apr_dbm_fetch", "failure"); + prdatum(stdout, val); + putchar('\n'); + rv = apr_dbm_nextkey(db, &key); + if (rv != APR_SUCCESS) + oops(db, rv, "NextKey", "failure"); + } + break; + case DBUILD: +#ifdef TIME + start = time(0); +#endif + while (fgets(line, LINEMAX, stdin) != NULL) { + n = strlen(line) - 1; + line[n] = 0; + if (n == 0) + break; + + key.dptr = line; + if ((op = strchr(line, '\t')) != 0) { + key.dsize = op - line; + *op++ = 0; + val.dptr = op; + val.dsize = line + n - op; + } + else + oops(NULL, APR_EGENERAL, "bad input: %s", line); + + rv = apr_dbm_store(db, key, val); + if (rv != APR_SUCCESS) { + prdatum(stderr, key); + fprintf(stderr, ": "); + oops(db, rv, "store: %s", "failed"); + } + } +#ifdef TIME + printf("done: %d seconds.\n", time(0) - start); +#endif + break; + case DPRESS: + break; + case DCREAT: + break; + case DTRUNC: + break; + case DNAME: + apr_dbm_get_usednames(pool, file, &use1, &use2); + fprintf(stderr, "%s %s\n", use1, use2); + break; + case DAUTO: + { + int i; + char *valdata = "0123456789"; + fprintf(stderr, "Generating data: "); + for (i = 0; i < 10; i++) { + int j; + char c, keydata[10]; + for (j = 0, c = 'A' + (i % 16); j < 10; j++, c++) { + keydata[j] = c; + } + key.dptr = keydata; + key.dsize = 10; + val.dptr = valdata; + val.dsize = 10; + rv = apr_dbm_store(db, key, val); + if (rv != APR_SUCCESS) { + prdatum(stderr, key); + fprintf(stderr, ": "); + oops(db, rv, "store: %s", "failed"); + } + } + fputs("OK\n", stderr); + fputs("Testing existence/retrieval: ", stderr); + for (i = 0; i < 10; i++) { + int j; + char c, keydata[10]; + for (j = 0, c = 'A' + (i % 16); j < 10; j++, c++) { + keydata[j] = c; + } + key.dptr = keydata; + key.dsize = 10; + if (!apr_dbm_exists(db, key)) { + prdatum(stderr, key); + oops(db, 0, "exists: %s", "failed"); + } + rv = apr_dbm_fetch(db, key, &val); + if (rv != APR_SUCCESS || val.dsize != 10 || + (strncmp(val.dptr, valdata, 10) != 0) ) { + prdatum(stderr, key); + fprintf(stderr, ": "); + oops(db, rv, "fetch: %s", "failed"); + } + } + fputs("OK\n", stderr); + } + break; + } + + apr_dbm_close(db); +} + +static const cmd *parse_command(const char *str) +{ + int i; + + for (i = 0; i < CMD_SIZE; i++) + if (strcasecmp(cmds[i].sname, str) == 0) + return &cmds[i]; + + return NULL; +} + +static void prdatum(FILE *stream, apr_datum_t d) +{ + int c; + const char *p = d.dptr; + int n = d.dsize; + + while (n--) { + c = *p++ & 0377; + if (c & 0200) { + fprintf(stream, "M-"); + c &= 0177; + } + if (c == 0177 || c < ' ') + fprintf(stream, "^%c", (c == 0177) ? '?' : c + '@'); + else + putc(c, stream); + } +} + +static void oops(apr_dbm_t * dbm, apr_status_t rv, const char *s1, + const char *s2) +{ + char errbuf[200]; + + if (progname) { + fprintf(stderr, "%s: ", progname); + } + fprintf(stderr, s1, s2); + fprintf(stderr, "\n"); + + if (rv != APR_SUCCESS) { + apr_strerror(rv, errbuf, sizeof(errbuf)); + fprintf(stderr, "APR Error %d - %s\n", rv, errbuf); + + if (dbm) { + apr_dbm_geterror(dbm, &rv, errbuf, sizeof(errbuf)); + fprintf(stderr, "APR_DB Error %d - %s\n", rv, errbuf); + } + } + exit(1); +} + +static void show_usage(void) +{ + int i; + + if (!progname) { + progname = "testdbm"; + } + + fprintf(stderr, "%s [-t DBM-type] [-R] [commands] dbm-file-path\n", + progname); + + fputs("Available DBM-types:", stderr); +#if APU_HAVE_GDBM + fputs(" GDBM", stderr); +#endif +#if APU_HAVE_NDBM + fputs(" NDBM", stderr); +#endif +#if APU_HAVE_SDBM + fputs(" SDBM", stderr); +#endif +#if APU_HAVE_DB + fputs(" DB", stderr); +#endif + fputs(" default\n", stderr); + + fputs("Available commands:\n", stderr); + for (i = 0; i < CMD_SIZE; i++) { + fprintf(stderr, "%-8s%c", cmds[i].sname, + ((i + 1) % 6 == 0) ? '\n' : ' '); + } + fputs("\n", stderr); +} diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testmd4.c b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testmd4.c new file mode 100644 index 00000000..26d43a8e --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testmd4.c @@ -0,0 +1,238 @@ +/* Copyright 2001-2005 The Apache Software Foundation or its licensors, as + * applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* This is derived from material copyright RSA Data Security, Inc. + * Their notice is reproduced below in its entirety. + * + * Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All + * rights reserved. + * + * RSA Data Security, Inc. makes no representations concerning either + * the merchantability of this software or the suitability of this + * software for any particular purpose. It is provided "as is" + * without express or implied warranty of any kind. + * + * These notices must be retained in any copies of any part of this + * documentation and/or software. + */ + + +#include "apr.h" +#include "apr_general.h" +#include "apr_file_io.h" +#include "apr_time.h" +#include "apr_md4.h" + +#include <stdio.h> +#include <string.h> +#include <stdlib.h> + +/* + * This is a MD4 test program based on the code published in RFC 1320. + * When run as ./testmd4 -x it should produce the following output: + +MD4 test suite: +MD4 ("") = 31d6cfe0d16ae931b73c59d7e0c089c0 +MD4 ("a") = bde52cb31de33e46245e05fbdbd6fb24 +MD4 ("abc") = a448017aaf21d8525fc10ae87aa6729d +MD4 ("message digest") = d9130a8164549fe818874806e1c7014b +MD4 ("abcdefghijklmnopqrstuvwxyz") = d79e1c308aa5bbcdeea8ed63df412da9 +MD4 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") = 043f8582f241db351ce627e153e7f0e4 +MD4 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") = e33b4ddc9c38f2199c3e7b164fcc0536 + +*/ + +/* Length of test block, number of test blocks. + */ +#define TEST_BLOCK_LEN 1000 +#define TEST_BLOCK_COUNT 1000 + +apr_pool_t *local_pool; +apr_file_t *in, *out, *err; + +/* Prints a message digest in hexadecimal. + */ +static void MDPrint (unsigned char digest[APR_MD4_DIGESTSIZE]) +{ + unsigned int i; + + for (i = 0; i < APR_MD4_DIGESTSIZE; i++) + apr_file_printf(out, "%02x", digest[i]); +} + +/* Digests a string and prints the result. + */ +static void MDString(char *string) +{ + apr_md4_ctx_t context; + unsigned char digest[APR_MD4_DIGESTSIZE]; + unsigned int len = strlen(string); + + apr_md4_init(&context); + apr_md4_update(&context, (unsigned char *)string, len); + apr_md4_final(digest, &context); + + apr_file_printf (out, "MD4 (\"%s\") = ", string); + MDPrint(digest); + apr_file_printf (out, "\n"); +} + +/* Measures the time to digest TEST_BLOCK_COUNT TEST_BLOCK_LEN-byte + blocks. + */ +static void MDTimeTrial(void) +{ + apr_md4_ctx_t context; + apr_time_t endTime, startTime; + apr_interval_time_t timeTaken; + unsigned char block[TEST_BLOCK_LEN], digest[APR_MD4_DIGESTSIZE]; + unsigned int i; + + apr_file_printf(out, "MD4 time trial. Digesting %d %d-byte blocks ...", + TEST_BLOCK_LEN, TEST_BLOCK_COUNT); + + /* Initialize block */ + for (i = 0; i < TEST_BLOCK_LEN; i++) + block[i] = (unsigned char)(i & 0xff); + + /* Start timer */ + startTime = apr_time_now(); + + /* Digest blocks */ + apr_md4_init(&context); + for (i = 0; i < TEST_BLOCK_COUNT; i++) + apr_md4_update(&context, block, TEST_BLOCK_LEN); + + apr_md4_final(digest, &context); + + /* Stop timer */ + endTime = apr_time_now(); + timeTaken = endTime - startTime; + + apr_file_printf(out, " done\n"); + apr_file_printf(out, "Digest = "); + MDPrint(digest); + + apr_file_printf(out, "\nTime = %" APR_TIME_T_FMT " seconds\n", timeTaken); + apr_file_printf(out, "Speed = % " APR_TIME_T_FMT " bytes/second\n", + TEST_BLOCK_LEN * TEST_BLOCK_COUNT/timeTaken); +} + +/* Digests a reference suite of strings and prints the results. + */ +static void MDTestSuite(void) +{ + apr_file_printf(out, "MD4 test suite:\n"); + + MDString(""); + MDString("a"); + MDString("abc"); + MDString("message digest"); + MDString("abcdefghijklmnopqrstuvwxyz"); + MDString("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"); + MDString("12345678901234567890123456789012345678901234567890123456789012345678901234567890"); +} + +/* Digests a file and prints the result. + */ +static void MDFile(char *filename) +{ + apr_file_t *file; + apr_md4_ctx_t context; + apr_size_t len = 1024; + unsigned char buffer[1024], digest[APR_MD4_DIGESTSIZE]; + + if (apr_file_open(&file, filename, APR_READ, APR_OS_DEFAULT, local_pool) + != APR_SUCCESS) + apr_file_printf(err, "%s can't be opened\n", filename); + else { + apr_md4_init(&context); + while (apr_file_read(file, buffer, &len) != APR_SUCCESS) + { + apr_md4_update(&context, buffer, len); + len = 1024; + } + apr_md4_final(digest, &context); + + apr_file_close(file); + + apr_file_printf(out, "MD4 (%s) = ", filename); + MDPrint(digest); + apr_file_printf(out, "\n"); + } +} + +/* Digests the standard input and prints the result. + */ +static void MDFilter(void) +{ + apr_md4_ctx_t context; + apr_size_t len = 16; + unsigned char buffer[16], digest[16]; + + apr_md4_init(&context); + while (apr_file_read(in, buffer, &len) != APR_SUCCESS) + { + apr_md4_update(&context, buffer, len); + len = 16; + } + apr_md4_update(&context, buffer, len); + apr_md4_final(digest, &context); + + MDPrint(digest); + apr_file_printf(out, "\n"); +} + + +/* Main driver. + + Arguments (may be any combination): + -sstring - digests string + -t - runs time trial + -x - runs test script + filename - digests file + (none) - digests standard input + */ +int main (int argc, char **argv) +{ + int i; + + apr_initialize(); + atexit(apr_terminate); + + if (apr_pool_create(&local_pool, NULL) != APR_SUCCESS) + exit(-1); + + apr_file_open_stdin(&in, local_pool); + apr_file_open_stdout(&out, local_pool); + apr_file_open_stderr(&err, local_pool); + + if (argc > 1) + { + for (i = 1; i < argc; i++) + if (argv[i][0] == '-' && argv[i][1] == 's') + MDString(argv[i] + 2); + else if (strcmp(argv[i], "-t") == 0) + MDTimeTrial(); + else if (strcmp (argv[i], "-x") == 0) + MDTestSuite(); + else + MDFile(argv[i]); + } + else + MDFilter(); + + return 0; +} diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testmd5.c b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testmd5.c new file mode 100644 index 00000000..fb4ff716 --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testmd5.c @@ -0,0 +1,142 @@ +/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as + * applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include <assert.h> +#include <stdlib.h> +#include <stdio.h> + +#include "apr_md5.h" +#include "apr_xlate.h" +#include "apr_general.h" +#include "test_apu.h" + +int cur; + +struct testcase { + const char *s; + const char *digest; +}; + +struct testcase testcases[] = +{ + {"Jeff was here!", + "\xa5\x25\x8a\x89\x11\xb2\x9d\x1f\x81\x75\x96\x3b\x60\x94\x49\xc0"}, + {"01234567890aBcDeFASDFGHJKLPOIUYTR" + "POIUYTREWQZXCVBN LLLLLLLLLLLLLLL", + "\xd4\x1a\x06\x2c\xc5\xfd\x6f\x24\x67\x68\x56\x7c\x40\x8a\xd5\x69"}, + {"111111118888888888888888*******%%%%%%%%%%#####" + "142134u8097289720432098409289nkjlfkjlmn,m.. ", + "\xb6\xea\x5b\xe8\xca\x45\x8a\x33\xf0\xf1\x84\x6f\xf9\x65\xa8\xe1"}, + {"01234567890aBcDeFASDFGHJKLPOIUYTR" + "POIUYTREWQZXCVBN LLLLLLLLLLLLLLL" + "01234567890aBcDeFASDFGHJKLPOIUYTR" + "POIUYTREWQZXCVBN LLLLLLLLLLLLLLL" + "1", + "\xd1\xa1\xc0\x97\x8a\x60\xbb\xfb\x2a\x25\x46\x9d\xa5\xae\xd0\xb0"} +}; + +static void try(const void *buf, apr_size_t bufLen, apr_xlate_t *xlate, + const void *digest) +{ + int i; + apr_md5_ctx_t context; + unsigned char hash[APR_MD5_DIGESTSIZE]; + + printf("Trying translation %d\n", cur + 1); + + STD_TEST_NEQ(" apr_md5_init", apr_md5_init(&context)) + + if (xlate) { +#if APR_HAS_XLATE + STD_TEST_NEQ(" apr_md5_set_xlate", + apr_md5_set_xlate(&context, xlate)) +#else + printf(" Didn't expect a translation handle! Not fatal.\n"); +#endif + } + + STD_TEST_NEQ(" apr_md5_update", apr_md5_update(&context, buf, bufLen)) + STD_TEST_NEQ(" apr_md5_final", apr_md5_final(hash, &context)) + + printf(" (MD5 hash : "); + for (i = 0; i < APR_MD5_DIGESTSIZE; i++) { + printf("%02x",hash[i]); + } + + printf(")\n"); + + printf("%-60s", " Checking hash against expected"); + if (memcmp(hash, digest, APR_MD5_DIGESTSIZE)) { + /* This is a fatal error...report on stderr */ + fprintf(stderr, "The digest is not as expected!\n"); +#if 'A' != 0x41 + fprintf(stderr, + "Maybe you didn't tell me what character sets " + "to translate between?\n" + "The expected digest is based on the string " + "being in ASCII.\n"); +#endif + } + printf("OK\n"); +} + +int main(int argc, char **argv) +{ + apr_status_t rv; + apr_xlate_t *xlate = NULL; + apr_pool_t *pool; + const char *src = NULL, *dst = NULL; + + switch(argc) { + case 1: + break; + case 3: + src = argv[1]; + dst = argv[2]; + break; + default: + fprintf(stderr, + "Usage: %s [src-charset dst-charset]\n", + argv[0]); + exit(1); + } + + rv = apr_initialize(); + assert(!rv); + atexit(apr_terminate); + + printf("APR MD5 Test\n============\n\n"); + STD_TEST_NEQ("Creating pool", apr_pool_create(&pool, NULL)) + + if (src) { +#if APR_HAS_XLATE + STD_TEST_NEQ("Opening xlate functions", + apr_xlate_open(&xlate, dst, src, pool)) +#else + /* This isn't a fatal error, so just report it... */ + printf("APR doesn't implement translation for this " + "configuration.\n"); +#endif + } + + for (cur = 0; cur < sizeof(testcases) / sizeof(testcases[0]); cur++) { + try(testcases[cur].s, strlen(testcases[cur].s), xlate, + testcases[cur].digest); + } + + printf("\nMD5 Test passed.\n"); + return 0; +} diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testpass.c b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testpass.c new file mode 100644 index 00000000..6bf85625 --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testpass.c @@ -0,0 +1,129 @@ +/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as + * applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include <assert.h> +#include <stdio.h> +#include <stdlib.h> + +#include "apr_errno.h" +#include "apr_strings.h" +#include "apr_file_io.h" +#include "apr_thread_proc.h" +#include "apr_md5.h" + +static struct { + const char *password; + const char *hash; +} passwords[] = +{ +/* + passwords and hashes created with Apache's htpasswd utility like this: + + htpasswd -c -b passwords pass1 pass1 + htpasswd -b passwords pass2 pass2 + htpasswd -b passwords pass3 pass3 + htpasswd -b passwords pass4 pass4 + htpasswd -b passwords pass5 pass5 + htpasswd -b passwords pass6 pass6 + htpasswd -b passwords pass7 pass7 + htpasswd -b passwords pass8 pass8 + (insert Perl one-liner to convert to initializer :) ) + */ + {"pass1", "1fWDc9QWYCWrQ"}, + {"pass2", "1fiGx3u7QoXaM"}, + {"pass3", "1fzijMylTiwCs"}, + {"pass4", "nHUYc8U2UOP7s"}, + {"pass5", "nHpETGLGPwAmA"}, + {"pass6", "nHbsbWmJ3uyhc"}, + {"pass7", "nHQ3BbF0Y9vpI"}, + {"pass8", "nHZA1rViSldQk"} +}; +static int num_passwords = sizeof(passwords) / sizeof(passwords[0]); + +static void check_rv(apr_status_t rv) +{ + if (rv != APR_SUCCESS) { + fprintf(stderr, "bailing\n"); + exit(1); + } +} + +static void test(void) +{ + int i; + + for (i = 0; i < num_passwords; i++) { + apr_status_t rv = apr_password_validate(passwords[i].password, + passwords[i].hash); + assert(rv == APR_SUCCESS); + } +} + +#if APR_HAS_THREADS + +static void * APR_THREAD_FUNC testing_thread(apr_thread_t *thd, + void *data) +{ + int i; + + for (i = 0; i < 100; i++) { + test(); + } + return APR_SUCCESS; +} + +static void thread_safe_test(apr_pool_t *p) +{ +#define NUM_THR 20 + apr_thread_t *my_threads[NUM_THR]; + int i; + apr_status_t rv; + + for (i = 0; i < NUM_THR; i++) { + rv = apr_thread_create(&my_threads[i], NULL, testing_thread, NULL, p); + check_rv(rv); + } + + for (i = 0; i < NUM_THR; i++) { + apr_thread_join(&rv, my_threads[i]); + } +} +#endif + +int main(void) +{ + apr_status_t rv; + apr_pool_t *p; + + rv = apr_initialize(); + check_rv(rv); + rv = apr_pool_create(&p, NULL); + check_rv(rv); + atexit(apr_terminate); + + /* before creating any threads, test it first just to check + * for problems with the test driver + */ + printf("dry run\n"); + test(); + +#if APR_HAS_THREADS + printf("thread-safe test\n"); + thread_safe_test(p); +#endif + + return 0; +} diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testqueue.c b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testqueue.c new file mode 100644 index 00000000..9a971f4b --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testqueue.c @@ -0,0 +1,282 @@ +/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as + * applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include <apr_thread_proc.h> +#include <apr_errno.h> +#include <apr_general.h> +#include <apr_getopt.h> +#include <apr_strings.h> +#include "errno.h" +#include <stdio.h> +#include <stdlib.h> +#include <apr_time.h> +#if APR_HAVE_UNISTD_H +#include <unistd.h> +#endif +#include <apr_portable.h> +#include "apr_queue.h" + +#if !APR_HAS_THREADS +int main(void) +{ + fprintf(stderr, + "This program won't work on this platform because there is no " + "support for threads.\n"); + return 0; +} +#else /* !APR_HAS_THREADS */ + +apr_pool_t *context; +int consumer_activity=400; +int producer_activity=300; +int verbose=0; +static void * APR_THREAD_FUNC consumer(apr_thread_t *thd, void *data); +static void * APR_THREAD_FUNC producer(apr_thread_t *thd, void *data); +static void usage(void); + +static void * APR_THREAD_FUNC consumer(apr_thread_t *thd, void *data) +{ + long sleeprate; + apr_queue_t *q = (apr_queue_t*)data; + apr_status_t rv; + int val; + void *v; + char current_thread_str[30]; + apr_os_thread_t current_thread = apr_os_thread_current(); + + apr_snprintf(current_thread_str, sizeof current_thread_str, + "%pT", ¤t_thread); + + sleeprate = 1000000/consumer_activity; + apr_sleep( (rand() % 4 ) * 1000000 ); /* sleep random seconds */ + while (1) { + do { + rv = apr_queue_pop(q, &v); + if (rv == APR_EINTR) { + fprintf(stderr, "%s\tconsumer intr\n", current_thread_str); + } + + } while (rv == APR_EINTR) ; + if (rv != APR_SUCCESS) { + if (rv == APR_EOF) { + fprintf(stderr, "%s\tconsumer:queue terminated APR_EOF\n", current_thread_str); + rv=APR_SUCCESS; + } + else + fprintf(stderr, "%s\tconsumer thread exit rv %d\n", current_thread_str, rv); + apr_thread_exit(thd, rv); + return NULL; + } + val = *(int*)v; + if (verbose) + fprintf(stderr, "%s\tpop %d\n", current_thread_str, val); + apr_sleep( sleeprate ); /* sleep this long to acheive our rate */ + } + /* not reached */ + return NULL; +} + +static void * APR_THREAD_FUNC producer(apr_thread_t *thd, void *data) +{ + int i=0; + long sleeprate; + apr_queue_t *q = (apr_queue_t*)data; + apr_status_t rv; + int *val; + char current_thread_str[30]; + apr_os_thread_t current_thread = apr_os_thread_current(); + + apr_snprintf(current_thread_str, sizeof current_thread_str, + "%pT", ¤t_thread); + + sleeprate = 1000000/producer_activity; + apr_sleep( (rand() % 4 ) * 1000000 ); /* sleep random seconds */ + + while(1) { + val = apr_palloc(context, sizeof(int)); + *val=i; + if (verbose) + fprintf(stderr, "%s\tpush %d\n", current_thread_str, *val); + do { + rv = apr_queue_push(q, val); + if (rv == APR_EINTR) + fprintf(stderr, "%s\tproducer intr\n", current_thread_str); + } while (rv == APR_EINTR); + + if (rv != APR_SUCCESS) { + if (rv == APR_EOF) { + fprintf(stderr, "%s\tproducer: queue terminated APR_EOF\n", current_thread_str); + rv = APR_SUCCESS; + } + else + fprintf(stderr, "%s\tproducer thread exit rv %d\n", current_thread_str, rv); + apr_thread_exit(thd, rv); + return NULL; + } + i++; + apr_sleep( sleeprate ); /* sleep this long to acheive our rate */ + } + /* not reached */ + return NULL; +} + +static void usage(void) +{ + fprintf(stderr,"usage: testqueue -p n -P n -c n -C n -q n -s n\n"); + fprintf(stderr,"-c # of consumer\n"); + fprintf(stderr,"-C amount they consumer before dying\n"); + fprintf(stderr,"-p # of producers\n"); + fprintf(stderr,"-P amount they produce before dying\n"); + fprintf(stderr,"-q queue size\n"); + fprintf(stderr,"-s amount of time to sleep before killing it\n"); + fprintf(stderr,"-v verbose\n"); +} + +int main(int argc, const char* const argv[]) +{ + apr_thread_t **t; + apr_queue_t *queue; + int i; + apr_status_t rv; + apr_getopt_t *opt; + const char *optarg; + char c; + int numconsumers=3; + int numproducers=4; + int queuesize=100; + int sleeptime=30; + char errorbuf[200]; + + apr_initialize(); + srand((unsigned int)apr_time_now()); + printf("APR Queue Test\n======================\n\n"); + + printf("%-60s", "Initializing the context"); + if (apr_pool_create(&context, NULL) != APR_SUCCESS) { + fflush(stdout); + fprintf(stderr, "Failed.\nCould not initialize\n"); + exit(-1); + } + printf("OK\n"); + + apr_getopt_init(&opt, context, argc, argv); + while ((rv = apr_getopt(opt, "p:c:P:C:q:s:v", &c, &optarg)) + == APR_SUCCESS) { + switch (c) { + case 'c': + numconsumers = atoi( optarg); + break; + case 'p': + numproducers = atoi( optarg); + break; + case 'C': + consumer_activity = atoi( optarg); + break; + case 'P': + producer_activity = atoi( optarg); + break; + case 's': + sleeptime= atoi(optarg); + break; + case 'q': + queuesize = atoi(optarg); + break; + case 'v': + verbose= 1; + break; + default: + usage(); + exit(-1); + } + } + /* bad cmdline option? then we die */ + if (rv != APR_EOF || opt->ind < opt->argc) { + usage(); + exit(-1); + } + + + + printf("test stats %d consumers (rate %d/sec) %d producers (rate %d/sec) queue size %d sleep %d\n", + numconsumers,consumer_activity, numproducers, producer_activity, queuesize,sleeptime); + printf("%-60s", "Initializing the queue"); + rv = apr_queue_create(&queue, queuesize, context); + + if (rv != APR_SUCCESS) { + fflush(stdout); + fprintf(stderr, "Failed\nCould not create queue %d\n",rv); + apr_strerror(rv, errorbuf,200); + fprintf(stderr,"%s\n",errorbuf); + exit(-1); + } + printf("OK\n"); + + t = apr_palloc( context, sizeof(apr_thread_t*) * (numconsumers+numproducers)); + printf("%-60s", "Starting consumers"); + for (i=0;i<numconsumers;i++) { + rv = apr_thread_create(&t[i], NULL, consumer, queue, context); + if (rv != APR_SUCCESS) { + apr_strerror(rv, errorbuf,200); + fprintf(stderr, "Failed\nError starting consumer thread (%d) rv=%d:%s\n",i, rv,errorbuf); + exit(-1); + + } + } + for (i=numconsumers;i<(numconsumers+numproducers);i++) { + rv = apr_thread_create(&t[i], NULL, producer, queue, context); + if (rv != APR_SUCCESS) { + apr_strerror(rv, errorbuf,200); + fprintf(stderr, "Failed\nError starting producer thread (%d) rv=%d:%s\n",i, rv,errorbuf); + exit(-1); + + } + } + + printf("OK\n"); + printf("%-60s", "Sleeping\n"); + apr_sleep( sleeptime * 1000000 ); /* sleep 10 seconds */ + printf("OK\n"); + + printf("%-60s", "Terminating queue"); + rv = apr_queue_term(queue); + if (rv != APR_SUCCESS) { + apr_strerror(rv, errorbuf,200); + fprintf( stderr, "apr_queue_term failed %d:%s\n",rv,errorbuf); + } + printf("OK\n"); + + + printf("%-60s", "Waiting for threads to exit\n"); + fflush(stdout); + for (i=0;i<numconsumers+numproducers;i++) { + apr_thread_join(&rv, t[i]); + if (rv != 0 ) { + apr_strerror(rv, errorbuf,200); + if (i<numconsumers) + fprintf( stderr, "consumer thread %d failed rv %d:%s\n",i,rv,errorbuf); + else + fprintf( stderr, "producer thread %d failed rv %d:%s\n",i,rv,errorbuf); + } + } + + printf("OK\n"); + + apr_terminate(); + + return 0; +} + +#endif /* !APR_HAS_THREADS */ diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testreslist.c b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testreslist.c new file mode 100644 index 00000000..68f5902a --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testreslist.c @@ -0,0 +1,232 @@ +/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as + * applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include <stdio.h> +#include <stdlib.h> +#include "apr_reslist.h" +#include "apr_thread_proc.h" + +#if !APR_HAS_THREADS + +int main(void) +{ + fprintf(stderr, "this program requires APR thread support\n"); + return 0; +} + +#else + +#define RESLIST_MIN 3 +#define RESLIST_SMAX 10 +#define RESLIST_HMAX 20 +#define RESLIST_TTL APR_TIME_C(350000) /* 35 ms */ +#define CONSUMER_THREADS 25 +#define CONSUMER_ITERATIONS 250 +#define CONSTRUCT_SLEEP_TIME APR_TIME_C(250000) /* 25 ms */ +#define DESTRUCT_SLEEP_TIME APR_TIME_C(100000) /* 10 ms */ +#define WORK_DELAY_SLEEP_TIME APR_TIME_C(150000) /* 15 ms */ + +typedef struct { + apr_interval_time_t sleep_upon_construct; + apr_interval_time_t sleep_upon_destruct; + int c_count; + int d_count; +} my_parameters_t; + +typedef struct { + int id; +} my_resource_t; + +static apr_status_t my_constructor(void **resource, void *params, + apr_pool_t *pool) +{ + my_resource_t *res; + my_parameters_t *my_params = params; + + /* Create some resource */ + res = apr_palloc(pool, sizeof(*res)); + res->id = my_params->c_count++; + + printf("++ constructing new resource [id:%d]\n", res->id); + + /* Sleep for awhile, to simulate construction overhead. */ + apr_sleep(my_params->sleep_upon_construct); + + /* Set the resource so it can be managed by the reslist */ + *resource = res; + return APR_SUCCESS; +} + +static apr_status_t my_destructor(void *resource, void *params, + apr_pool_t *pool) +{ + my_resource_t *res = resource; + my_parameters_t *my_params = params; + + printf("-- destructing old resource [id:%d, #%d]\n", res->id, + my_params->d_count++); + + apr_sleep(my_params->sleep_upon_destruct); + + return APR_SUCCESS; +} + +typedef struct { + int tid; + apr_reslist_t *reslist; + apr_interval_time_t work_delay_sleep; +} my_thread_info_t; + +static void * APR_THREAD_FUNC resource_consuming_thread(apr_thread_t *thd, + void *data) +{ + apr_status_t rv; + my_thread_info_t *thread_info = data; + apr_reslist_t *rl = thread_info->reslist; + int i; + + for (i = 0; i < CONSUMER_ITERATIONS; i++) { + my_resource_t *res; + rv = apr_reslist_acquire(rl, (void**)&res); + if (rv != APR_SUCCESS) { + fprintf(stderr, "Failed to retrieve resource from reslist\n"); + apr_thread_exit(thd, rv); + return NULL; + } + printf(" [tid:%d,iter:%d] using resource id:%d\n", thread_info->tid, + i, res->id); + apr_sleep(thread_info->work_delay_sleep); + rv = apr_reslist_release(rl, res); + if (rv != APR_SUCCESS) { + fprintf(stderr, "Failed to return resource to reslist\n"); + apr_thread_exit(thd, rv); + return NULL; + } + } + + return APR_SUCCESS; +} + +static apr_status_t test_reslist(apr_pool_t *parpool) +{ + apr_status_t rv; + apr_pool_t *pool; + apr_reslist_t *rl; + my_parameters_t *params; + int i; + apr_thread_t *my_threads[CONSUMER_THREADS]; + my_thread_info_t my_thread_info[CONSUMER_THREADS]; + + printf("Creating child pool......................."); + rv = apr_pool_create(&pool, parpool); + if (rv != APR_SUCCESS) { + fprintf(stderr, "Error creating child pool\n"); + return rv; + } + printf("OK\n"); + + /* Create some parameters that will be passed into each + * constructor and destructor call. */ + params = apr_pcalloc(pool, sizeof(*params)); + params->sleep_upon_construct = CONSTRUCT_SLEEP_TIME; + params->sleep_upon_destruct = DESTRUCT_SLEEP_TIME; + + /* We're going to want 10 blocks of data from our target rmm. */ + printf("Creating resource list:\n" + " min/smax/hmax: %d/%d/%d\n" + " ttl: %" APR_TIME_T_FMT "\n", RESLIST_MIN, RESLIST_SMAX, + RESLIST_HMAX, RESLIST_TTL); + rv = apr_reslist_create(&rl, RESLIST_MIN, RESLIST_SMAX, RESLIST_HMAX, + RESLIST_TTL, my_constructor, my_destructor, + params, pool); + if (rv != APR_SUCCESS) { + fprintf(stderr, "Error allocating shared memory block\n"); + return rv; + } + fprintf(stdout, "OK\n"); + + printf("Creating %d threads", CONSUMER_THREADS); + for (i = 0; i < CONSUMER_THREADS; i++) { + putchar('.'); + my_thread_info[i].tid = i; + my_thread_info[i].reslist = rl; + my_thread_info[i].work_delay_sleep = WORK_DELAY_SLEEP_TIME; + rv = apr_thread_create(&my_threads[i], NULL, + resource_consuming_thread, &my_thread_info[i], + pool); + if (rv != APR_SUCCESS) { + fprintf(stderr, "Failed to create thread %d\n", i); + return rv; + } + } + printf("\nDone!\n"); + + printf("Waiting for threads to finish"); + for (i = 0; i < CONSUMER_THREADS; i++) { + apr_status_t thread_rv; + putchar('.'); + apr_thread_join(&thread_rv, my_threads[i]); + if (rv != APR_SUCCESS) { + fprintf(stderr, "Failed to join thread %d\n", i); + return rv; + } + } + printf("\nDone!\n"); + + printf("Destroying resource list................."); + rv = apr_reslist_destroy(rl); + if (rv != APR_SUCCESS) { + printf("FAILED\n"); + return rv; + } + printf("OK\n"); + + apr_pool_destroy(pool); + + return APR_SUCCESS; +} + + +int main(void) +{ + apr_status_t rv; + apr_pool_t *pool; + char errmsg[200]; + + apr_initialize(); + + printf("APR Resource List Test\n"); + printf("======================\n\n"); + + printf("Initializing the pool............................"); + if (apr_pool_create(&pool, NULL) != APR_SUCCESS) { + printf("could not initialize pool\n"); + exit(-1); + } + printf("OK\n"); + + rv = test_reslist(pool); + if (rv != APR_SUCCESS) { + printf("Resource list test FAILED: [%d] %s\n", + rv, apr_strerror(rv, errmsg, sizeof(errmsg))); + exit(-2); + } + printf("Resource list test passed!\n"); + + return 0; +} + +#endif /* APR_HAS_THREADS */ diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testrmm.c b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testrmm.c new file mode 100644 index 00000000..3c3ac604 --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testrmm.c @@ -0,0 +1,281 @@ +/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as + * applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "apr_shm.h" +#include "apr_rmm.h" +#include "apr_errno.h" +#include "apr_general.h" +#include "apr_lib.h" +#include "apr_strings.h" +#include "apr_time.h" +#include <errno.h> +#include <stdio.h> +#include <stdlib.h> +#if APR_HAVE_UNISTD_H +#include <unistd.h> +#endif + +#if APR_HAS_SHARED_MEMORY + +#define FRAG_SIZE 80 +#define FRAG_COUNT 10 +#define SHARED_SIZE (apr_size_t)(FRAG_SIZE * FRAG_COUNT * sizeof(char*)) + +static apr_status_t test_rmm(apr_pool_t *parpool) +{ + apr_status_t rv; + apr_pool_t *pool; + apr_shm_t *shm; + apr_rmm_t *rmm; + apr_size_t size, fragsize; + apr_rmm_off_t *off; + int i; + void *entity; + + rv = apr_pool_create(&pool, parpool); + if (rv != APR_SUCCESS) { + fprintf(stderr, "Error creating child pool\n"); + return rv; + } + + /* We're going to want 10 blocks of data from our target rmm. */ + size = SHARED_SIZE + apr_rmm_overhead_get(FRAG_COUNT + 1); + printf("Creating anonymous shared memory (%" + APR_SIZE_T_FMT " bytes).....", size); + rv = apr_shm_create(&shm, size, NULL, pool); + if (rv != APR_SUCCESS) { + fprintf(stderr, "Error allocating shared memory block\n"); + return rv; + } + fprintf(stdout, "OK\n"); + + printf("Creating rmm segment............................."); + rv = apr_rmm_init(&rmm, NULL, apr_shm_baseaddr_get(shm), size, + pool); + + if (rv != APR_SUCCESS) { + fprintf(stderr, "Error allocating rmm..............\n"); + return rv; + } + fprintf(stdout, "OK\n"); + + fragsize = SHARED_SIZE / FRAG_COUNT; + printf("Creating each fragment of size %" APR_SIZE_T_FMT "................", + fragsize); + off = apr_palloc(pool, FRAG_COUNT * sizeof(apr_rmm_off_t)); + for (i = 0; i < FRAG_COUNT; i++) { + off[i] = apr_rmm_malloc(rmm, fragsize); + } + fprintf(stdout, "OK\n"); + + printf("Checking for out of memory allocation............"); + if (apr_rmm_malloc(rmm, FRAG_SIZE * FRAG_COUNT) == 0) { + fprintf(stdout, "OK\n"); + } + else { + return APR_EGENERAL; + } + + printf("Checking each fragment for address alignment....."); + for (i = 0; i < FRAG_COUNT; i++) { + char *c = apr_rmm_addr_get(rmm, off[i]); + apr_size_t sc = (apr_size_t)c; + + if (off[i] == 0) { + printf("allocation failed for offset %d\n", i); + return APR_ENOMEM; + } + + if (sc & 7) { + printf("Bad alignment for fragment %d; %p not %p!\n", + i, c, (void *)APR_ALIGN_DEFAULT((apr_size_t)c)); + return APR_EGENERAL; + } + } + fprintf(stdout, "OK\n"); + + printf("Setting each fragment to a unique value.........."); + for (i = 0; i < FRAG_COUNT; i++) { + int j; + char **c = apr_rmm_addr_get(rmm, off[i]); + for (j = 0; j < FRAG_SIZE; j++, c++) { + *c = apr_itoa(pool, i + j); + } + } + fprintf(stdout, "OK\n"); + + printf("Checking each fragment for its unique value......"); + for (i = 0; i < FRAG_COUNT; i++) { + int j; + char **c = apr_rmm_addr_get(rmm, off[i]); + for (j = 0; j < FRAG_SIZE; j++, c++) { + char *d = apr_itoa(pool, i + j); + if (strcmp(*c, d) != 0) { + return APR_EGENERAL; + } + } + } + fprintf(stdout, "OK\n"); + + printf("Freeing each fragment............................"); + for (i = 0; i < FRAG_COUNT; i++) { + rv = apr_rmm_free(rmm, off[i]); + if (rv != APR_SUCCESS) { + return rv; + } + } + fprintf(stdout, "OK\n"); + + printf("Creating one large segment......................."); + off[0] = apr_rmm_calloc(rmm, SHARED_SIZE); + fprintf(stdout, "OK\n"); + + printf("Setting large segment............................"); + for (i = 0; i < FRAG_COUNT * FRAG_SIZE; i++) { + char **c = apr_rmm_addr_get(rmm, off[0]); + c[i] = apr_itoa(pool, i); + } + fprintf(stdout, "OK\n"); + + printf("Freeing large segment............................"); + apr_rmm_free(rmm, off[0]); + fprintf(stdout, "OK\n"); + + printf("Creating each fragment of size %" APR_SIZE_T_FMT " (again)........", + fragsize); + for (i = 0; i < FRAG_COUNT; i++) { + off[i] = apr_rmm_malloc(rmm, fragsize); + } + fprintf(stdout, "OK\n"); + + printf("Freeing each fragment backwards.................."); + for (i = FRAG_COUNT - 1; i >= 0; i--) { + rv = apr_rmm_free(rmm, off[i]); + if (rv != APR_SUCCESS) { + return rv; + } + } + fprintf(stdout, "OK\n"); + + printf("Creating one large segment (again)..............."); + off[0] = apr_rmm_calloc(rmm, SHARED_SIZE); + fprintf(stdout, "OK\n"); + + printf("Freeing large segment............................"); + apr_rmm_free(rmm, off[0]); + fprintf(stdout, "OK\n"); + + printf("Checking realloc................................."); + off[0] = apr_rmm_calloc(rmm, SHARED_SIZE - 100); + off[1] = apr_rmm_calloc(rmm, 100); + if (off[0] == 0 || off[1] == 0) { + printf("FAILED\n"); + return APR_EINVAL; + } + entity = apr_rmm_addr_get(rmm, off[1]); + rv = apr_rmm_free(rmm, off[0]); + if (rv != APR_SUCCESS) { + printf("FAILED\n"); + return rv; + } + + { + unsigned char *c = entity; + + /* Fill in the region; the first half with zereos, which will + * likely catch the apr_rmm_realloc offset calculation bug by + * making it think the old region was zero length. */ + for (i = 0; i < 100; i++) { + c[i] = (i < 50) ? 0 : i; + } + } + + /* now we can realloc off[1] and get many more bytes */ + off[0] = apr_rmm_realloc(rmm, entity, SHARED_SIZE - 100); + if (off[0] == 0) { + printf("FAILED\n"); + return APR_EINVAL; + } + + { + unsigned char *c = apr_rmm_addr_get(rmm, off[0]); + + /* fill in the region */ + for (i = 0; i < 100; i++) { + if (c[i] != (i < 50 ? 0 : i)) { + printf("FAILED at offset %d: %hx\n", i, c[i]); + return APR_EGENERAL; + } + } + } + + fprintf(stdout, "OK\n"); + + printf("Destroying rmm segment..........................."); + rv = apr_rmm_destroy(rmm); + if (rv != APR_SUCCESS) { + printf("FAILED\n"); + return rv; + } + printf("OK\n"); + + printf("Destroying shared memory segment................."); + rv = apr_shm_destroy(shm); + if (rv != APR_SUCCESS) { + printf("FAILED\n"); + return rv; + } + printf("OK\n"); + + apr_pool_destroy(pool); + + return APR_SUCCESS; +} + + +int main(void) +{ + apr_status_t rv; + apr_pool_t *pool; + char errmsg[200]; + + apr_initialize(); + + printf("APR RMM Memory Test\n"); + printf("======================\n\n"); + + printf("Initializing the pool............................"); + if (apr_pool_create(&pool, NULL) != APR_SUCCESS) { + printf("could not initialize pool\n"); + exit(-1); + } + printf("OK\n"); + + rv = test_rmm(pool); + if (rv != APR_SUCCESS) { + printf("Anonymous shared memory test FAILED: [%d] %s\n", + rv, apr_strerror(rv, errmsg, sizeof(errmsg))); + exit(-2); + } + printf("RMM test passed!\n"); + + return 0; +} + +#else /* APR_HAS_SHARED_MEMORY */ +#error shmem is not supported on this platform +#endif /* APR_HAS_SHARED_MEMORY */ + diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/teststrmatch.c b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/teststrmatch.c new file mode 100644 index 00000000..f5cda393 --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/teststrmatch.c @@ -0,0 +1,132 @@ +/* Copyright 2002-2005 The Apache Software Foundation or its licensors, as + * applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "apr.h" +#include "apr_general.h" +#include "apr_strmatch.h" +#if APR_HAVE_STDLIB_H +#include <stdlib.h> +#endif +#define APR_WANT_STDIO +#define APR_WANT_STRFUNC +#include "apr_want.h" + + +int main (void) +{ + apr_pool_t *pool; + const apr_strmatch_pattern *pattern; + const apr_strmatch_pattern *pattern_nocase; + const apr_strmatch_pattern *pattern_onechar; + const apr_strmatch_pattern *pattern_zero; + const char *input1 = "string that contains a patterN..."; + const char *input2 = "string that contains a pattern..."; + const char *input3 = "pattern at the start of a string"; + const char *input4 = "string that ends with a pattern"; + const char *input5 = "patter\200n not found, negative chars in input"; + const char *input6 = "patter\200n, negative chars, contains pattern..."; + + (void) apr_initialize(); + apr_pool_create(&pool, NULL); + + printf("testing pattern precompilation..."); + pattern = apr_strmatch_precompile(pool, "pattern", 1); + if (!pattern) { + printf("FAILED\n"); + exit(1); + } + pattern_nocase = apr_strmatch_precompile(pool, "pattern", 0); + if (!pattern_nocase) { + printf("FAILED\n"); + exit(1); + } + pattern_onechar = apr_strmatch_precompile(pool, "g", 0); + if (!pattern_onechar) { + printf("FAILED\n"); + exit(1); + } + pattern_zero = apr_strmatch_precompile(pool, "", 0); + if (!pattern_zero) { + printf("FAILED\n"); + exit(1); + } + printf("OK\n"); + + printf("testing invalid match..."); + if (apr_strmatch(pattern, input1, strlen(input1)) != NULL) { + printf("FAILED\n"); + exit(1); + } + printf("OK\n"); + + printf("testing valid match..."); + if (apr_strmatch(pattern, input2, strlen(input2)) != input2 + 23) { + printf("FAILED\n"); + exit(1); + } + printf("OK\n"); + + printf("testing single-character match..."); + if (apr_strmatch(pattern_onechar, input1, strlen(input1)) != input1 + 5) { + printf("FAILED\n"); + exit(1); + } + printf("OK\n"); + + printf("testing zero-length pattern..."); + if (apr_strmatch(pattern_zero, input1, strlen(input1)) != input1) { + printf("FAILED\n"); + exit(1); + } + printf("OK\n"); + + printf("testing inexact-case match..."); + if (apr_strmatch(pattern_nocase, input1, strlen(input1)) != input1 + 23) { + printf("FAILED\n"); + exit(1); + } + printf("OK\n"); + + printf("testing match at start of string..."); + if (apr_strmatch(pattern, input3, strlen(input3)) != input3) { + printf("FAILED\n"); + exit(1); + } + printf("OK\n"); + + printf("testing match at end of string..."); + if (apr_strmatch(pattern, input4, strlen(input4)) != input4 + 24) { + printf("FAILED\n"); + exit(1); + } + printf("OK\n"); + + printf("testing invalid match with negative chars in input string..."); + if (apr_strmatch(pattern, input5, strlen(input5)) != NULL) { + printf("FAILED\n"); + exit(1); + } + printf("OK\n"); + + printf("testing valid match with negative chars in input string..."); + if (apr_strmatch(pattern, input6, strlen(input6)) != input6 + 35) { + printf("FAILED\n"); + exit(1); + } + printf("OK\n"); + + exit(0); +} diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testuri.c b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testuri.c new file mode 100644 index 00000000..675fa79f --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testuri.c @@ -0,0 +1,278 @@ +/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as + * applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include <stdio.h> +#include <stdlib.h> + +#include "apr_general.h" +#include "apr_uri.h" + +struct aup_test { + const char *uri; + apr_status_t rv; + const char *scheme; + const char *hostinfo; + const char *user; + const char *password; + const char *hostname; + const char *port_str; + const char *path; + const char *query; + const char *fragment; + apr_port_t port; +}; + +struct aup_test aup_tests[] = +{ + { "http://[/::1]/index.html", APR_EGENERAL }, + { "http://[", APR_EGENERAL }, + { "http://[?::1]/index.html", APR_EGENERAL }, + + + { + "http://127.0.0.1:9999/asdf.html", + 0, "http", "127.0.0.1:9999", NULL, NULL, "127.0.0.1", "9999", "/asdf.html", NULL, NULL, 9999 + }, + { + "http://127.0.0.1:9999a/asdf.html", + APR_EGENERAL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0 + }, + { + "http://[::127.0.0.1]:9999/asdf.html", + 0, "http", "[::127.0.0.1]:9999", NULL, NULL, "::127.0.0.1", "9999", "/asdf.html", NULL, NULL, 9999 + }, + { + "http://[::127.0.0.1]:9999a/asdf.html", + APR_EGENERAL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0 + }, + { + "/error/include/top.html", + 0, NULL, NULL, NULL, NULL, NULL, NULL, "/error/include/top.html", NULL, NULL, 0 + }, + { + "/error/include/../contact.html.var", + 0, NULL, NULL, NULL, NULL, NULL, NULL, "/error/include/../contact.html.var", NULL, NULL, 0 + }, + { + "/", + 0, NULL, NULL, NULL, NULL, NULL, NULL, "/", NULL, NULL, 0 + }, + { + "/manual/", + 0, NULL, NULL, NULL, NULL, NULL, NULL, "/manual/", NULL, NULL, 0 + }, + { + "/cocoon/developing/graphics/Using%20Databases-label_over.jpg", + 0, NULL, NULL, NULL, NULL, NULL, NULL, "/cocoon/developing/graphics/Using%20Databases-label_over.jpg", NULL, NULL, 0 + }, + { + "http://sonyamt:garbage@127.0.0.1/filespace/", + 0, "http", "sonyamt:garbage@127.0.0.1", "sonyamt", "garbage", "127.0.0.1", NULL, "/filespace/", NULL, NULL, 0 + }, + { + "http://sonyamt:garbage@[fe80::1]/filespace/", + 0, "http", "sonyamt:garbage@[fe80::1]", "sonyamt", "garbage", "fe80::1", NULL, "/filespace/", NULL, NULL, 0 + }, + { + "http://sonyamt@[fe80::1]/filespace/?arg1=store", + 0, "http", "sonyamt@[fe80::1]", "sonyamt", NULL, "fe80::1", NULL, "/filespace/", "arg1=store", NULL, 0 + } +}; + +struct uph_test { + const char *hostinfo; + apr_status_t rv; + const char *hostname; + const char *port_str; + apr_port_t port; +}; + +struct uph_test uph_tests[] = +{ + { + "www.ibm.com:443", + 0, "www.ibm.com", "443", 443 + }, + { + "[fe80::1]:443", + 0, "fe80::1", "443", 443 + }, + { + "127.0.0.1:443", + 0, "127.0.0.1", "443", 443 + }, + { + "127.0.0.1", + APR_EGENERAL, NULL, NULL, 0 + }, + { + "[fe80:80", + APR_EGENERAL, NULL, NULL, 0 + }, + { + "fe80::80]:443", + APR_EGENERAL, NULL, NULL, 0 + } +}; + +static void show_info(apr_status_t rv, apr_status_t expected, const apr_uri_t *info) +{ + if (rv != expected) { + fprintf(stderr, " actual rv: %d expected rv: %d\n", rv, expected); + } + else { + fprintf(stderr, + " scheme: %s\n" + " hostinfo: %s\n" + " user: %s\n" + " password: %s\n" + " hostname: %s\n" + " port_str: %s\n" + " path: %s\n" + " query: %s\n" + " fragment: %s\n" + " hostent: %p\n" + " port: %u\n" + " is_initialized: %u\n" + " dns_looked_up: %u\n" + " dns_resolved: %u\n", + info->scheme, info->hostinfo, info->user, info->password, + info->hostname, info->port_str, info->path, info->query, + info->fragment, info->hostent, info->port, info->is_initialized, + info->dns_looked_up, info->dns_resolved); + } +} + +static int same_str(const char *s1, const char *s2) +{ + if (s1 == s2) { /* e.g., NULL and NULL */ + return 1; + } + else if (!s1 || !s2) { /* only 1 is NULL */ + return 0; + } + else { + return strcmp(s1, s2) == 0; + } +} + +static int test_aup(apr_pool_t *p) +{ + int i; + apr_status_t rv; + apr_uri_t info; + struct aup_test *t; + const char *failed; + int rc = 0; + + for (i = 0; i < sizeof(aup_tests) / sizeof(aup_tests[0]); i++) { + memset(&info, 0, sizeof(info)); + t = &aup_tests[i]; + rv = apr_uri_parse(p, t->uri, &info); + failed = (rv != t->rv) ? "bad rc" : NULL; + if (!failed && t->rv == APR_SUCCESS) { + if (!same_str(info.scheme, t->scheme)) + failed = "bad scheme"; + if (!same_str(info.hostinfo, t->hostinfo)) + failed = "bad hostinfo"; + if (!same_str(info.user, t->user)) + failed = "bad user"; + if (!same_str(info.password, t->password)) + failed = "bad password"; + if (!same_str(info.hostname, t->hostname)) + failed = "bad hostname"; + if (!same_str(info.port_str, t->port_str)) + failed = "bad port_str"; + if (!same_str(info.path, t->path)) + failed = "bad path"; + if (!same_str(info.query, t->query)) + failed = "bad query"; + if (!same_str(info.fragment, t->fragment)) + failed = "bad fragment"; + if (info.port != t->port) + failed = "bad port"; + } + if (failed) { + ++rc; + fprintf(stderr, "failure for testcase %d/uri %s: %s\n", i, + t->uri, failed); + show_info(rv, t->rv, &info); + } + else if (t->rv == APR_SUCCESS) { + const char *s = apr_uri_unparse(p, &info, + APR_URI_UNP_REVEALPASSWORD); + + if (strcmp(s, t->uri)) { + fprintf(stderr, "apr_uri_unparsed failed for testcase %d\n", i); + fprintf(stderr, " got %s, expected %s\n", s, t->uri); + } + } + } + + return rc; +} + +static int test_uph(apr_pool_t *p) +{ + int i; + apr_status_t rv; + apr_uri_t info; + struct uph_test *t; + const char *failed; + int rc = 0; + + for (i = 0; i < sizeof(uph_tests) / sizeof(uph_tests[0]); i++) { + memset(&info, 0, sizeof(info)); + t = &uph_tests[i]; + rv = apr_uri_parse_hostinfo(p, t->hostinfo, &info); + failed = (rv != t->rv) ? "bad rc" : NULL; + if (!failed && t->rv == APR_SUCCESS) { + if (!same_str(info.hostname, t->hostname)) + failed = "bad hostname"; + if (!same_str(info.port_str, t->port_str)) + failed = "bad port_str"; + if (info.port != t->port) + failed = "bad port"; + } + if (failed) { + ++rc; + fprintf(stderr, "failure for testcase %d/hostinfo %s: %s\n", i, + t->hostinfo, failed); + show_info(rv, t->rv, &info); + } + } + + return rc; +} + +int main(void) +{ + apr_pool_t *pool; + int rc; + + apr_initialize(); + atexit(apr_terminate); + + apr_pool_create(&pool, NULL); + + rc = test_aup(pool); + + if (!rc) { + rc = test_uph(pool); + } + + return rc; +} diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testuuid.c b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testuuid.c new file mode 100644 index 00000000..e022bb50 --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testuuid.c @@ -0,0 +1,58 @@ +/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as + * applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include <stdio.h> +#include <stdlib.h> + +#include "apr_general.h" +#include "apr_uuid.h" + + +int main(int argc, char **argv) +{ + apr_uuid_t uuid; + apr_uuid_t uuid2; + char buf[APR_UUID_FORMATTED_LENGTH + 1]; + int retcode = 0; + + apr_initialize(); + atexit(apr_terminate); + + apr_uuid_get(&uuid); + apr_uuid_format(buf, &uuid); + printf("UUID: %s\n", buf); + + apr_uuid_parse(&uuid2, buf); + if (memcmp(&uuid, &uuid2, sizeof(uuid)) == 0) + printf("Parse appears to work.\n"); + else { + printf("ERROR: parse produced a different UUID.\n"); + retcode = 1; + } + + apr_uuid_format(buf, &uuid2); + printf("parsed/reformatted UUID: %s\n", buf); + + /* generate two of them quickly */ + apr_uuid_get(&uuid); + apr_uuid_get(&uuid2); + apr_uuid_format(buf, &uuid); + printf("UUID 1: %s\n", buf); + apr_uuid_format(buf, &uuid2); + printf("UUID 2: %s\n", buf); + + return retcode; +} diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testxlate.c b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testxlate.c new file mode 100644 index 00000000..3f0f1796 --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testxlate.c @@ -0,0 +1,118 @@ +/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as + * applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include <stdio.h> +#include <stdlib.h> + +#include "apr.h" +#include "apr_errno.h" +#include "apr_general.h" +#include "apr_strings.h" +#include "apr_xlate.h" + +static const char test_utf8[] = "Edelwei\xc3\x9f"; +static const char test_utf7[] = "Edelwei+AN8-"; +static const char test_latin1[] = "Edelwei\xdf"; +static const char test_latin2[] = "Edelwei\xdf"; + + +static int check_status (apr_status_t status, const char *msg) +{ + if (status) + { + static char buf[1024]; + printf("ERROR: %s\n %s\n", msg, + apr_strerror(status, buf, sizeof(buf))); + return 1; + } + return 0; +} + +static int test_conversion (apr_xlate_t *convset, + const char *inbuf, + const char *expected) +{ + static char buf[1024]; + int retcode = 0; + apr_size_t inbytes_left = strlen(inbuf) + 1; + apr_size_t outbytes_left = sizeof(buf) - 1; + apr_status_t status = apr_xlate_conv_buffer(convset, + inbuf, + &inbytes_left, + buf, + &outbytes_left); + retcode |= check_status(status, "apr_xlate_conv_buffer"); + if ((!status || APR_STATUS_IS_INCOMPLETE(status)) + && strcmp(buf, expected)) + { + printf("ERROR: expected: '%s'\n actual: '%s'" + "\n inbytes_left: %"APR_SIZE_T_FMT"\n", + expected, buf, inbytes_left); + retcode |= 1; + } + return retcode; +} + +static int one_test (const char *cs1, const char *cs2, + const char *str1, const char *str2, + apr_pool_t *pool) +{ + apr_xlate_t *convset; + const char *msg = apr_psprintf(pool, "apr_xlate_open(%s, %s)", cs2, cs1); + int retcode = check_status(apr_xlate_open(&convset, cs2, cs1, pool), msg); + if (!retcode) + { + retcode |= test_conversion(convset, str1, str2); + retcode |= check_status(apr_xlate_close(convset), "apr_xlate_close"); + } + printf("%s: %s -> %s\n", (retcode ? "FAIL" : "PASS"), cs1, cs2); + return retcode; +} + + +int main (int argc, char **argv) +{ + apr_pool_t *pool; + int retcode = 0; + +#ifndef APR_HAS_XLATE + puts("SKIP: apr_xlate not implemented"); + return 0; +#endif + + apr_initialize(); + atexit(apr_terminate); + apr_pool_create(&pool, NULL); + + /* 1. Identity transformation: UTF-8 -> UTF-8 */ + retcode |= one_test("UTF-8", "UTF-8", test_utf8, test_utf8, pool); + + /* 2. UTF-8 <-> ISO-8859-1 */ + retcode |= one_test("UTF-8", "ISO-8859-1", test_utf8, test_latin1, pool); + retcode |= one_test("ISO-8859-1", "UTF-8", test_latin1, test_utf8, pool); + + /* 3. ISO-8859-1 <-> ISO-8859-2, identity */ + retcode |= one_test("ISO-8859-1", "ISO-8859-2", + test_latin1, test_latin2, pool); + retcode |= one_test("ISO-8859-2", "ISO-8859-1", + test_latin2, test_latin1, pool); + + /* 4. Transformation using charset aliases */ + retcode |= one_test("UTF-8", "UTF-7", test_utf8, test_utf7, pool); + retcode |= one_test("UTF-7", "UTF-8", test_utf7, test_utf8, pool); + + return retcode; +} diff --git a/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testxml.c b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testxml.c new file mode 100644 index 00000000..748f43b3 --- /dev/null +++ b/rubbos/app/httpd-2.0.64/srclib/apr-util/test/testxml.c @@ -0,0 +1,287 @@ +/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as + * applicable. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "apr.h" +#include "apr_general.h" +#include "apr_xml.h" + +#if APR_HAVE_STDLIB_H +#include <stdlib.h> /* for exit() */ +#endif + +static const char *progname; +static const char *usage = "%s [xmlfile]\nIt will create " + "a dummy XML file if none is supplied"; +/* + * If our platform knows about the tmpnam() external buffer size, create + * a buffer to pass in. This is needed in a threaded environment, or + * one that thinks it is (like HP-UX). + */ + +#ifdef L_tmpnam +static char tname_buf[L_tmpnam]; +#else +static char *tname_buf = NULL; +#endif + +static apr_status_t create_dummy_file_error(apr_pool_t *p, apr_file_t **fd) +{ + apr_status_t rv; + char *tmpfile; + int i; + apr_off_t off = 0L; + tmpfile = tmpnam(tname_buf); + + if ((tmpfile == NULL) || (*tmpfile == '\0')) { + fprintf(stderr, "unable to generate temporary filename\n"); + if (errno == 0) { + errno = ENOENT; + } + perror("tmpnam"); + return APR_ENOENT; + } + rv = apr_file_open(fd, tmpfile, APR_CREATE|APR_TRUNCATE|APR_DELONCLOSE| + APR_READ|APR_WRITE|APR_EXCL, APR_OS_DEFAULT, p); + + if (rv != APR_SUCCESS) + return rv; + rv = apr_file_puts("<?xml version=\"1.0\" ?>\n<maryx>" + "<had a=\"little\"/><lamb its='fleece " + "was white as snow' />\n", *fd); + if (rv != APR_SUCCESS) + return rv; + + for (i = 0; i < 5000; i++) { + rv = apr_file_puts("<hmm roast=\"lamb\" " + "for=\"dinner\">yummy</hmm>\n", *fd); + if (rv != APR_SUCCESS) + return rv; + } + rv = apr_file_puts("</mary>\n", *fd); + if (rv != APR_SUCCESS) + return rv; + + return apr_file_seek(*fd, APR_SET, &off); +} + +static apr_status_t create_dummy_file(apr_pool_t *p, apr_file_t **fd) +{ + apr_status_t rv; + char *tmpfile; + int i; + apr_off_t off = 0L; + tmpfile = tmpnam(tname_buf); + + if ((tmpfile == NULL) || (*tmpfile == '\0')) { + fprintf(stderr, "unable to generate temporary filename\n"); + if (errno == 0) { + errno = ENOENT; + } + perror("tmpnam"); + return APR_ENOENT; + } + rv = apr_file_open(fd, tmpfile, APR_CREATE|APR_TRUNCATE|APR_DELONCLOSE| + APR_READ|APR_WRITE|APR_EXCL, APR_OS_DEFAULT, p); + + if (rv != APR_SUCCESS) + return rv; + rv = apr_file_puts("<?xml version=\"1.0\" ?>\n<mary>" + "<had a=\"little\"/><lamb its='fleece " + "was white as snow' />\n", *fd); + if (rv != APR_SUCCESS) + return rv; + + for (i = 0; i < 5000; i++) { + rv = apr_file_puts("<hmm roast=\"lamb\" " + "for=\"dinner\">yummy</hmm>\n", *fd); + if (rv != APR_SUCCESS) + return rv; + } + rv = apr_file_puts("</mary>\n", *fd); + if (rv != APR_SUCCESS) + return rv; + + rv = apr_file_seek(*fd, APR_SET, &off); + return rv; +} + +static void dump_xml(apr_xml_elem *e, int level) +{ + apr_xml_attr *a; + apr_xml_elem *ec; + + printf("%d: element %s\n", level, e->name); + if (e->attr) { + a = e->attr; + printf("%d:\tattrs\t", level); + while (a) { + printf("%s=%s\t", a->name, a->value); + a = a->next; + } + printf("\n"); + } + if (e->first_child) { + ec = e->first_child; + while (ec) { + dump_xml(ec, level + 1); + ec = ec->next; + } + } +} + +static void oops(const char *s1, const char *s2, apr_status_t rv) +{ + if (progname) + fprintf(stderr, "%s: ", progname); + fprintf(stderr, s1, s2); + if (rv != APR_SUCCESS) { + char buf[120]; + + fprintf(stderr, " (%s)", apr_strerror(rv, buf, sizeof buf)); + } + fprintf(stderr, "\n"); + exit(1); +} + +static int test_xml_parser(apr_pool_t *pool, const char *file) +{ + apr_file_t *fd; + apr_xml_parser *parser; + apr_xml_doc *doc; + apr_status_t rv; + char errbuf[2000]; + char errbufXML[2000]; + + if (file == NULL) { + rv = create_dummy_file(pool, &fd); + if (rv != APR_SUCCESS) { + oops("cannot create dummy file", "oops", rv); + } + } + else { + rv = apr_file_open(&fd, file, APR_READ, APR_OS_DEFAULT, pool); + if (rv != APR_SUCCESS) { + oops("cannot open: %s", file, rv); + } + } + + rv = apr_xml_parse_file(pool, &parser, &doc, fd, 2000); + if (rv != APR_SUCCESS) { + fprintf(stderr, "APR Error %s\nXML Error: %s\n", + apr_strerror(rv, errbuf, sizeof(errbuf)), + apr_xml_parser_geterror(parser, errbufXML, sizeof(errbufXML))); + return rv; + } + + dump_xml(doc->root, 0); + + rv = apr_file_close(fd); + + if (file == NULL) { + rv = create_dummy_file_error(pool, &fd); + if (rv != APR_SUCCESS) { + oops("cannot create error dummy file", "oops", rv); + } + rv = apr_xml_parse_file(pool, &parser, &doc, fd, 2000); + if (rv != APR_SUCCESS) { + fprintf(stdout, "APR Error %s\nXML Error: %s " + "(EXPECTED) This is good.\n", + apr_strerror(rv, errbuf, sizeof(errbuf)), + apr_xml_parser_geterror(parser, errbufXML, sizeof(errbufXML))); + rv = APR_SUCCESS; /* reset the return code, as the test is supposed to get this error */ + } + else { + fprintf(stderr, "Expected an error, but didn't get one ;( "); + return APR_EGENERAL; + } + } + return rv; +} + +static void test_billion_laughs(apr_pool_t *pool) +{ + apr_file_t *fd; + apr_xml_parser *parser; + apr_xml_doc *doc; + apr_status_t rv; + char errbuf[2000]; + + rv = apr_file_open(&fd, "data/billion-laughs.xml", + APR_READ, 0, pool); + if (rv != APR_SUCCESS) { + fprintf(stderr, "APR Error %s\n", + apr_strerror(rv, errbuf, sizeof(errbuf))); + } + + /* Don't test for return value; if it returns, chances are the bug + * is fixed or the machine has insane amounts of RAM. */ + apr_xml_parse_file(pool, &parser, &doc, fd, 2000); + + apr_file_close(fd); +} + +static void test_CVE_2009_3720_alpha(apr_pool_t *pool) +{ + apr_xml_parser *xp; + apr_xml_doc *doc; + apr_status_t rv; + + xp = apr_xml_parser_create(pool); + + rv = apr_xml_parser_feed(xp, "\0\r\n", 3); + if (rv == APR_SUCCESS) + apr_xml_parser_done(xp, &doc); +} + +static void test_CVE_2009_3720_beta(apr_pool_t *pool) +{ + apr_xml_parser *xp; + apr_xml_doc *doc; + apr_status_t rv; + + xp = apr_xml_parser_create(pool); + + rv = apr_xml_parser_feed(xp, "<?xml version\xc2\x85='1.0'?>\r\n", 25); + if (rv == APR_SUCCESS) + apr_xml_parser_done(xp, &doc); +} + +int main(int argc, const char *const * argv) +{ + apr_pool_t *pool; + apr_status_t rv; + + (void) apr_initialize(); + apr_pool_create(&pool, NULL); + progname = argv[0]; + if (argc == 1) { + rv = test_xml_parser(pool, NULL); + } + else { + if (argc == 2) { + rv = test_xml_parser(pool, argv[1]); + } + else { + oops("usage: %s", usage, 0); + } + } + test_billion_laughs(pool); + test_CVE_2009_3720_alpha(pool); + test_CVE_2009_3720_beta(pool); + apr_pool_destroy(pool); + apr_terminate(); + return rv; +} |