summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgstein <gstein@13f79535-47bb-0310-9956-ffa450edef68>2011-05-09 05:28:45 +0000
committergstein <gstein@13f79535-47bb-0310-9956-ffa450edef68>2011-05-09 05:28:45 +0000
commitb6c95c67641d8f4536181308bc6d7e3db50d8667 (patch)
tree641db983719306838b127152c89e01d3d04f472b
parent5d95dbe2f400b6db1e1bc6e616a1db8e849b630b (diff)
downloadlibapr-gstein-pocore.tar.gz
Catch my branch up to the latest 1.3.x branch.gstein-pocore
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/gstein-pocore@1100891 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--NWGNUmakefile93
-rw-r--r--STATUS2
-rw-r--r--atomic/win32/apr_atomic.c2
-rw-r--r--build/NWGNUenvironment.inc170
-rw-r--r--build/NWGNUhead.inc64
-rw-r--r--build/NWGNUmakefile102
-rw-r--r--build/NWGNUtail.inc297
-rw-r--r--build/aplibtool.c6
-rw-r--r--build/apr_hints.m447
-rwxr-xr-xbuild/config.guess296
-rwxr-xr-xbuild/config.sub215
-rw-r--r--build/make_nw_export.awk75
-rw-r--r--configure.in45
-rw-r--r--file_io/os2/readwrite.c4
-rw-r--r--file_io/win32/pipe.c31
-rw-r--r--file_io/win32/readwrite.c2
-rw-r--r--include/apr.h.in46
-rw-r--r--include/apr.hnw278
-rw-r--r--include/apr_portable.h7
-rw-r--r--include/apr_want.h11
-rw-r--r--include/arch/netware/apr_arch_file_io.h3
-rw-r--r--include/arch/netware/apr_arch_pre_nw.h36
-rw-r--r--include/arch/netware/apr_arch_threadproc.h12
-rw-r--r--include/arch/netware/apr_private.h75
-rw-r--r--include/arch/os2/apr_arch_file_io.h13
-rw-r--r--include/arch/win32/apr_arch_file_io.h4
-rw-r--r--include/arch/win32/apr_arch_misc.h95
-rw-r--r--locks/netware/thread_rwlock.c8
-rw-r--r--locks/os2/proc_mutex.c2
-rw-r--r--misc/netware/libprews.c4
-rw-r--r--misc/netware/start.c25
-rw-r--r--network_io/unix/sockets.c17
-rw-r--r--network_io/win32/sockopt.c4
-rw-r--r--passwd/apr_getpass.c12
-rw-r--r--test/NWGNUaprtest14
-rw-r--r--test/NWGNUechod6
-rw-r--r--test/NWGNUglobalmutexchild14
-rw-r--r--test/NWGNUmakefile8
-rw-r--r--test/NWGNUmod_test14
-rw-r--r--test/NWGNUproc_child14
-rw-r--r--test/NWGNUreadchild14
-rw-r--r--test/NWGNUsockchild14
-rw-r--r--test/NWGNUsockperf6
-rw-r--r--test/NWGNUtestatmc14
-rw-r--r--test/NWGNUtryread14
-rw-r--r--test/nw_misc.c1
-rw-r--r--test/testsock.c38
-rw-r--r--threadproc/netware/proc.c22
-rw-r--r--threadproc/netware/signals.c7
-rw-r--r--threadproc/netware/thread.c53
-rw-r--r--threadproc/unix/proc.c5
51 files changed, 1353 insertions, 1008 deletions
diff --git a/NWGNUmakefile b/NWGNUmakefile
index 2a327981a..dbadf5546 100644
--- a/NWGNUmakefile
+++ b/NWGNUmakefile
@@ -1,4 +1,20 @@
#
+# Define our macros with defaults if we dont got them already.
+#
+ifndef APR_WORK
+export APR_WORK = $(CURDIR)
+endif
+ifneq "$(wildcard $(APR_WORK)/include/apr_version.h)" "$(APR_WORK)/include/apr_version.h"
+$(error APR_WORK does not point to a valid APR source tree)
+endif
+ifndef APU_WORK
+export APU_WORK = $(CURDIR)/../apr-util
+endif
+ifneq "$(wildcard $(APU_WORK)/include/apu_version.h)" "$(APU_WORK)/include/apu_version.h"
+$(error APU_WORK does not point to a valid APU source tree)
+endif
+
+#
# Declare the sub-directories to be built here
#
@@ -7,12 +23,19 @@ SUBDIRS = \
$(APU_WORK) \
$(EOLIST)
+ifeq "$(TEST)" "1"
+SUBDIRS += \
+ test \
+ $(APU_WORK)/test \
+ $(EOLIST)
+endif
+
#
# Get the 'head' of the build environment. This includes default targets and
# paths to tools
#
-include $(APR_WORK)\build\NWGNUhead.inc
+include $(APR_WORK)/build/NWGNUhead.inc
#
# build this level's files
@@ -31,7 +54,9 @@ XINCDIRS += \
$(APR)/include/arch/unix \
$(APR)/memory/unix \
$(APR)/random/unix \
- $(APRUTIL)/xml \
+ $(APU)/include \
+ $(APU)/xml \
+ $(LDAPSDK)/inc \
$(EOLIST)
#
@@ -118,7 +143,7 @@ NLM_DESCRIPTION = Apache Portability Runtime Library $(VERSION_STR) $(VERSION_SK
NLM_THREAD_NAME =
#
# If this is specified, it will override VERSION value in
-# $(APR_WORK)\build\NWGNUenvironment.inc
+# $(APR_WORK)/build/NWGNUenvironment.inc
#
NLM_VERSION =
@@ -130,12 +155,12 @@ NLM_STACK_SIZE =
#
# If this is specified it will be used by the link '-entry' directive
#
-NLM_ENTRY_SYM = _LibCPrelude
+NLM_ENTRY_SYM =
#
# If this is specified it will be used by the link '-exit' directive
#
-NLM_EXIT_SYM = _LibCPostlude
+NLM_EXIT_SYM =
#
# If this is specified it will be used by the link '-check' directive
@@ -145,7 +170,7 @@ NLM_CHECK_SYM =
#
# If this is specified it will be used by the link '-flags' directive
#
-NLM_FLAGS = AUTOUNLOAD, PSEUDOPREEMPTION
+NLM_FLAGS =
#
# If this is specified it will be linked in with the XDCData option in the def
@@ -185,11 +210,11 @@ FILES_nlm_objs = \
# These will be added as a library command in the link.opt file.
#
FILES_nlm_libs = \
- libcpre.o \
+ $(PRELUDE) \
$(APRLIB) \
- $(APRUTLIB) \
+ $(APULIB) \
$(APULDAPLIB) \
- $(XMLLIB) \
+ $(APUXMLLIB) \
$(EOLIST)
#
@@ -249,8 +274,8 @@ endif
#If the LDAP support is defined then add the imports
ifneq "$(LDAPSDK)" ""
FILES_nlm_Ximports += \
- @$(LDAPSDK)/imports/lldapsdk.imp \
- @$(LDAPSDK)/imports/lldapssl.imp \
+ @lldapsdk.imp \
+ @lldapssl.imp \
$(EOLIST)
endif
@@ -298,7 +323,6 @@ FILES_lib_objs = \
$(OBJDIR)/groupinfo.o \
$(OBJDIR)/inet_pton.o \
$(OBJDIR)/inet_ntop.o \
- $(OBJDIR)/libprews.o \
$(OBJDIR)/mktemp.o \
$(OBJDIR)/mmap.o \
$(OBJDIR)/multicast.o \
@@ -345,32 +369,32 @@ 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)
+# correct place. (See $(APR_WORK)/build/NWGNUhead.inc for examples)
#
install :: nlms $(INSTDIRS) FORCE
- copy $(OBJDIR)\aprlib.nlm $(INSTALLBASE)\*.*
+ $(call COPY,$(APR)/$(TARGET_nlm),$(INSTALLBASE)/)
ifndef DEST
- -$(CP) $(subst /,\,$(APR))\STATUS $(INSTALLBASE)\*.apr
- -$(CP) $(subst /,\,$(APR))\LICENSE $(INSTALLBASE)\*
- -$(CP) $(subst /,\,$(APR))\CHANGES $(INSTALLBASE)\*.apr
- -$(CP) $(subst /,\,$(APRUTIL))\STATUS $(INSTALLBASE)\*.apu
- -$(CP) $(subst /,\,$(APRUTIL))\CHANGES $(INSTALLBASE)\*.apu
- @-$(XCP) $(subst /,\,$(APR))\docs $(INSTALLBASE)\docs\*.*
+ -$(call COPY,$(APR)/LICENSE,$(INSTALLBASE)/)
+ -$(call COPY,$(APR)/STATUS,$(INSTALLBASE)/STATUS.apr)
+ -$(call COPY,$(APR)/CHANGES,$(INSTALLBASE)/CHANGES.apr)
+ -$(call COPY,$(APU)/STATUS,$(INSTALLBASE)/STATUS.apu)
+ -$(call COPY,$(APU)/CHANGES,$(INSTALLBASE)/CHANGES.apu)
+ -$(call COPYR,$(APR)/docs,$(INSTALLBASE)/docs/)
endif
ifndef DEST
installdev :: $(INSTDEVDIRS) FORCE
- -$(CP) $(subst /,\,$(APR))\include\*.h $(INSTALLBASE)\include\*.*
- -$(CP) $(subst /,\,$(APRUTIL))\include\*.h $(INSTALLBASE)\include\*.*
- -$(CP) $(subst /,\,$(APR))\*.imp $(INSTALLBASE)\lib\*.*
- -$(CP) $(subst /,\,$(APR))\misc\netware\*.xdc $(INSTALLBASE)\lib\*.*
- -$(CP) $(subst /,\,$(APRLIB)) $(INSTALLBASE)\lib\*.*
- -$(CP) $(subst /,\,$(APRUTLIB)) $(INSTALLBASE)\lib\*.*
- -$(CP) $(subst /,\,$(APULDAPLIB)) $(INSTALLBASE)\lib\*.*
- -$(CP) $(subst /,\,$(XMLLIB)) $(INSTALLBASE)\lib\*.*
+ $(call COPY,$(APR)/include/*.h,$(INSTALLBASE)/include/)
+ $(call COPY,$(APR)/*.imp,$(INSTALLBASE)/lib/)
+ $(call COPY,$(APR)/misc/netware/*.xdc,$(INSTALLBASE)/lib/)
+ $(call COPY,$(APR)/$(TARGET_nlm),$(INSTALLBASE)/bin/)
+ $(call COPY,$(APRLIB),$(INSTALLBASE)/lib/)
+ $(call COPY,$(APULIB),$(INSTALLBASE)/lib/)
+ $(call COPY,$(APULDAPLIB),$(INSTALLBASE)/lib/)
+ $(call COPY,$(APUXMLLIB),$(INSTALLBASE)/lib/)
$(INSTDEVDIRS) ::
- $(CHKNOT) $@\NUL mkdir $@
+ $(call MKDIR,$@)
endif
#
@@ -379,7 +403,7 @@ endif
vpath %.c atomic/netware:strings:tables:passwd:lib:time/unix
vpath %.c file_io/unix:locks/netware:misc/netware:misc/unix:threadproc/netware
-vpath %.c poll/unix:shmem\unix:support/unix:random/unix
+vpath %.c poll/unix:shmem/unix:support/unix:random/unix
vpath %.c dso/netware:memory/unix:mmap/unix:user/netware
# Use the win32 network_io if Winsock is being used
@@ -388,15 +412,16 @@ vpath %.c network_io/win32
endif
vpath %.c network_io/unix
-$(OBJDIR)/%.o: file_io/netware/%.c $(OBJDIR)\$(NLM_NAME)_cc.opt
- @echo Compiling $<
- $(CC) file_io\netware\$(<F) -cwd source -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
+$(OBJDIR)/%.o: file_io/netware/%.c $(OBJDIR)/$(NLM_NAME)_cc.opt
+# @echo Compiling $<
+ @echo $(DL)CC $<$(DL)
+ $(CC) $< -cwd source -o=$@ @$(OBJDIR)/$(NLM_NAME)_cc.opt
#
# Include the 'tail' makefile that has targets that depend on variables defined
# in this makefile
#
-include $(APR_WORK)\build\NWGNUtail.inc
+include $(APRBUILD)/NWGNUtail.inc
diff --git a/STATUS b/STATUS
index 23bb0dd11..6396873b7 100644
--- a/STATUS
+++ b/STATUS
@@ -5,7 +5,7 @@ Releases:
2.0.0 : in development on trunk/
1.5.0 : in development on branches/1.5.x/
1.4.0 : in development on branches/1.4.x/
- 1.3.12 : tagged February 6, 2010
+ 1.3.12 : released April 4, 2010
1.3.11 : not released
1.3.10 : not released
1.3.9 : released September 23, 2009
diff --git a/atomic/win32/apr_atomic.c b/atomic/win32/apr_atomic.c
index 973c679e5..1ed7df893 100644
--- a/atomic/win32/apr_atomic.c
+++ b/atomic/win32/apr_atomic.c
@@ -54,7 +54,9 @@ APR_DECLARE(apr_uint32_t) apr_atomic_add32(volatile apr_uint32_t *mem, apr_uint3
}
/* Of course we want the 2's compliment of the unsigned value, val */
+#ifdef _MSC_VER
#pragma warning(disable: 4146)
+#endif
APR_DECLARE(void) apr_atomic_sub32(volatile apr_uint32_t *mem, apr_uint32_t val)
{
diff --git a/build/NWGNUenvironment.inc b/build/NWGNUenvironment.inc
index f620594a4..c15e003b4 100644
--- a/build/NWGNUenvironment.inc
+++ b/build/NWGNUenvironment.inc
@@ -2,9 +2,9 @@
# Setup needed Tools and Libraries
#
-ifeq "$(wildcard $(APR_WORK)\build\NWGNUcustom.inc)" "$(APR_WORK)\build\NWGNUcustom.inc"
-include $(APR_WORK)\build\NWGNUcustom.inc
-CUSTOM_INI = $(AP_WORK)\NWGNUcustom.ini
+ifeq "$(wildcard $(APR_WORK)/build/NWGNUcustom.inc)" "$(APR_WORK)/build/NWGNUcustom.inc"
+include $(APR_WORK)/build/NWGNUcustom.inc
+CUSTOM_INI = $(AP_WORK)/NWGNUcustom.ini
endif
ifndef VERBOSE
@@ -39,18 +39,42 @@ ifndef NOVELLLIBC
NOVELLLIBC = C:/novell/ndk/libc
endif
ifneq "$(wildcard $(NOVELLLIBC)/include/ndkvers.h)" "$(NOVELLLIBC)/include/ndkvers.h"
-$(error NOVELLLIBC does not point to a valid LIBC SDK)
+$(error NOVELLLIBC does not point to a valid Novell LIBC SDK)
endif
ifndef LDAPSDK
LDAPSDK = C:/novell/ndk/cldapsdk/NetWare/libc
endif
ifneq "$(wildcard $(LDAPSDK)/inc/ldap.h)" "$(LDAPSDK)/inc/ldap.h"
-$(error LDAPSDK does not point to a valid CLDAP SDK)
+$(error LDAPSDK does not point to a valid Novell CLDAP SDK)
+endif
+
+ifdef EXPATSDK
+ifeq "$(wildcard $(EXPATSDK)/include/expat.h)" "$(EXPATSDK)/include/expat.h"
+EXPAT_IMP = $(EXPATSDK)/imports/expatlbc.imp
+EXPAT_INC = $(EXPATSDK)/include
+EXPAT_LIB = $(EXPATSDK)/lib/expat.lib
+EXPAT_NLM = EXPATLBC
+else
+$(error EXPATSDK does not point to a valid EXPAT SDK)
+endif
+endif
+ifdef EXPATSRC
+ifeq "$(wildcard $(EXPATSRC)/lib/xmlparse.c)" "$(EXPATSRC)/lib/xmlparse.c"
+EXPAT_INC = $(EXPATSRC)/lib
+EXPAT_LIB = $(EXPATSRC)/lib/$(OBJDIR)/expat.lib
+else
+$(error EXPATSRC does not point to a valid EXPAT source tree)
+endif
+endif
+ifndef EXPAT_INC
+EXPATSRC = $(APUXML)/expat
+EXPAT_INC = $(EXPATSRC)/lib
+EXPAT_LIB = $(EXPATSRC)/lib/$(OBJDIR)/expat.lib
endif
ifndef METROWERKS
-METROWERKS = C:\Program Files\Metrowerks\CodeWarrior
+METROWERKS = $(ProgramFiles)\Metrowerks\CodeWarrior
endif
# If LM_LICENSE_FILE isn't defined, define a variable that can be used to
@@ -68,7 +92,7 @@ endif
ifdef reltype
RELEASE = $(reltype)
-endif
+endif
ifdef RELTYPE
RELEASE = $(RELTYPE)
@@ -102,6 +126,10 @@ ifndef RELEASE
RELEASE = release
endif
+ifeq "$(strip $(RELEASE))" "optimized"
+RELEASE = release
+endif
+
OBJDIR = obj_$(RELEASE)
#
@@ -117,19 +145,51 @@ LIB = mwldnlm -type library -w nocmdline
# Setup build tools
AWK = awk
+#
+# Declare Command and tool macros here
+#
+
+ifeq ($(findstring /sh,$(SHELL)),/sh)
+DEL = rm -f $1
+RMDIR = rm -rf $1
+MKDIR = mkdir -p $1
+COPY = cp -av $1 $2
+COPYR = cp -ar $1 $2
+ECHONL = echo ""
+DL = '
+CAT = cat
+else
+ifeq "$(OS)" "Windows_NT"
+DEL = $(shell if exist $(subst /,\,$1) del /q /f 2>NUL $(subst /,\,$1))
+RMDIR = $(shell if exist $(subst /,\,$1)\NUL rd /q /s 2>NUL $(subst /,\,$1))
+else
+DEL = $(shell if exist $(subst /,\,$1) del 2>NUL $(subst /,\,$1))
+RMDIR = $(shell if exist $(subst /,\,$1)\NUL deltree /y 2>NUL $(subst /,\,$1))
+endif
+ECHONL = $(ComSpec) /c echo.
+MKDIR = $(shell if not exist $(subst /,\,$1)\NUL md 2>NUL $(subst /,\,$1))
+COPY = copy /y 2>NUL $(subst /,\,$1) $(subst /,\,$2)
+COPYR = xcopy /y /e 2>NUL $(subst /,\,$1) $(subst /,\,$2)
+CAT = type
+endif
+
ifdef IPV6
ifndef USE_STDSOCKETS
USE_STDSOCKETS=1
endif
endif
-NOVI = $(NOVELLLIBC)\imports
+NOVI = $(NOVELLLIBC)/imports
+PRELUDE = $(NOVI)/libcpre.o
-INCDIRS = $(NOVELLLIBC)\include;$(NOVELLLIBC)\include\nks;$(NOVELLLIBC)\include\winsock;
+INCDIRS = $(NOVELLLIBC)/include;
DEFINES = -DNETWARE
-ifndef USE_STDSOCKETS
+ifdef USE_STDSOCKETS
+DEFINES += -DUSE_BSD_SOCKETS
+else
DEFINES += -DUSE_WINSOCK
+INCDIRS += $(NOVELLLIBC)/include/winsock;
endif
ifndef DEBUG
DEFINES += -DNDEBUG
@@ -141,12 +201,10 @@ else
VERSION_SKT = (WINSOCK)
endif
-#
# MetroWerks static Libraries
-
-CLIB3S = $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\Runtime\mwcrtl.lib
+CLIB3S = $(METROWERKS)/Novell Support/Metrowerks Support/Libraries/Runtime/mwcrtl.lib
MATH3S =
-PLIB3S = $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\MSL C++\MWCPP.lib
+PLIB3S = $(METROWERKS)/Novell Support/Metrowerks Support/Libraries/MSL C++/MWCPP.lib
# Base compile flags
# and prefix or precompiled header added here.
@@ -164,9 +222,12 @@ PLIB3S = $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\MSL C++\MWCPP
CFLAGS = -c -nosyspath -Cpp_exceptions off -RTTI off -align 4 -w nocmdline -proc PII
+ifeq "$(REQUIRE_PROTOTYPES)" "1"
+CFLAGS += -r
+endif
+
# -g generate debugging information
# -O0 level 0 optimizations
-
ifeq "$(RELEASE)" "debug"
CFLAGS += -g -O0
endif
@@ -177,11 +238,12 @@ CFLAGS += -O4,p
endif
# -prefix apr_arch_pre_nw.h #include pre_nw.h for all files
-
CFLAGS += -prefix apr_arch_pre_nw.h
+ifneq ($(findstring /sh,$(SHELL)),/sh)
PATH:=$(PATH);$(METROWERKS)\bin;$(METROWERKS)\Other Metrowerks Tools\Command Line Tools
+endif
#
# Declare major project deliverables output directories here
@@ -202,14 +264,15 @@ endif
endif
ifndef INSTALL
-INSTALL = $(APR_WORK)\Dist
-INSTDIRS = $(APR_WORK)\Dist
+INSTALL = $(APR_WORK)/Dist
+INSTDIRS = $(APR_WORK)/Dist
+BASEDIR = Apr
endif
# Add support for building IPV6 alongside
ifneq "$(IPV6)" ""
DEFINES += -DNW_BUILD_IPV6
-INCDIRS := $(NOVELLLIBC)\include\winsock\IPV6;$(INCDIRS)
+# INCDIRS := $(NOVELLLIBC)/include/winsock/IPV6;$(INCDIRS)
ifneq "$(findstring IPV6,$(OBJDIR))" "IPV6"
OBJDIR := $(OBJDIR)_IPV6
@@ -231,77 +294,40 @@ ifndef BASEDIR
BASEDIR = Apache2
endif
-INSTALLBASE := $(INSTALL)\$(BASEDIR)
-
-INSTDEVDIRS := \
- $(INSTDIRS) \
- $(INSTALLBASE) \
- $(INSTALLBASE)\include \
- $(INSTALLBASE)\lib \
+endif
-INSTDIRS += \
- $(INSTALLBASE) \
-
-else
-INSTALLBASE := $(INSTALL)\apr
+INSTALLBASE := $(INSTALL)/$(BASEDIR)
INSTDEVDIRS := \
- $(INSTDIRS) \
+ $(INSTDIRS) \
$(INSTALLBASE) \
- $(INSTALLBASE)\include \
- $(INSTALLBASE)\lib \
+ $(INSTALLBASE)/include \
+ $(INSTALLBASE)/lib \
+ $(INSTALLBASE)/bin
INSTDIRS += \
- $(INSTALLBASE) \
-
-endif
-
-#
-# Declare Command and tool macros here
-#
-
-# Os2LibPath is an extra check to see if we are on NT
-ifdef Os2LibPath
-OS = Windows_NT
-endif
-
-ifeq "$(OS)" "Windows_NT"
-CMD = cmd /C
-DEL = del /F
-DELTREE = $(CMD) rd /s/q
-WINNT = 1
-else
-CMD = command /C
-DEL = del
-DELTREE = deltree /y
-endif
-CP = copy /Y
-XCP = xcopy /E /Y
-CHK = $(CMD) if exist
-CHKNOT = $(CMD) if not exist
-
-#
-# Setup base C compiler flags
-#
+ $(INSTALLBASE)
#
# Common directories
#
-APR = $(APR_WORK)
-APRTEST = $(APR_WORK)/test
-APRUTIL = $(APU_WORK)
-APULDAP = $(APU_WORK)/ldap
-XML = $(APRUTIL)/xml
+APR = $(subst \,/,$(APR_WORK))
+APU = $(subst \,/,$(APU_WORK))
+APRBUILD = $(APR)/build
+APULDAP = $(APU)/ldap
+APUXML = $(APU)/xml
+APRTEST = $(APR)/test
+APUTEST = $(APU)/test
#
# Internal Libraries
#
APRLIB = $(APR)/$(OBJDIR)/aprlib.lib
-APRUTLIB = $(APRUTIL)/$(OBJDIR)/aprutil.lib
+APULIB = $(APU)/$(OBJDIR)/apulib.lib
APULDAPLIB = $(APULDAP)/$(OBJDIR)/apuldap.lib
-XMLLIB = $(XML)/$(OBJDIR)/xmllib.lib
+APUXMLLIB = $(APUXML)/$(OBJDIR)/apuxml.lib
#
# Additional general defines
diff --git a/build/NWGNUhead.inc b/build/NWGNUhead.inc
index 17f149cad..723137c46 100644
--- a/build/NWGNUhead.inc
+++ b/build/NWGNUhead.inc
@@ -2,7 +2,7 @@
# Obtain the global build environment
#
-include $(APR_WORK)\build\NWGNUenvironment.inc
+include $(APR_WORK)/build/NWGNUenvironment.inc
#
# Define base targets and rules
@@ -26,7 +26,7 @@ install :: NO_LICENSE_FILE
installdev :: NO_LICENSE_FILE
NO_LICENSE_FILE :
- $(MAKE) $(MAKECMDGOALS) -f NWGNUmakefile RELEASE=$(RELEASE) DEST="$(INSTALL)" LM_LICENSE_FILE="$(METROWERKS)\license.dat"
+ $(MAKE) $(MAKECMDGOALS) -f NWGNUmakefile RELEASE=$(RELEASE) DEST="$(INSTALL)" LM_LICENSE_FILE="$(METROWERKS)/license.dat"
else # LM_LICENSE_FILE must be defined so use the real targets
@@ -39,29 +39,29 @@ $(TARGETS) :: $(SUBDIRS)
endif #NO_LICENSE_FILE check
help :
- @echo targets for RELEASE=$(RELEASE):
- @echo (default) . . . . libs nlms
- @echo all . . . . . . . does everything (libs nlms install)
- @echo libs. . . . . . . builds all libs
- @echo nlms. . . . . . . builds all nlms
- @echo install . . . . . builds libs and nlms and copies install files to
- @echo "$(INSTALL)"
- @echo installdev. . . . copies headers and files needed for development to
- @echo "$(INSTALL)"
- @echo clean . . . . . . deletes $(OBJDIR) dirs, *.err, and *.map
- @echo clobber_all . . . deletes all possible output from the make
- @echo clobber_install . deletes all files in $(INSTALL)
- @$(CMD) echo.
- @echo Multiple targets can be used on a single nmake command line -
- @echo (i.e. $(MAKE) clean all)
- @$(CMD) echo.
- @echo You can also specify RELEASE=debug, RELEASE=noopt, or RELEASE=optimized
- @echo The default is RELEASE=optimized
+ @echo $(DL)targets for RELEASE=$(RELEASE):$(DL)
+ @echo $(DL)(default) . . . . libs nlms$(DL)
+ @echo $(DL)all . . . . . . . does everything (libs nlms install)$(DL)
+ @echo $(DL)libs. . . . . . . builds all libs$(DL)
+ @echo $(DL)nlms. . . . . . . builds all nlms$(DL)
+ @echo $(DL)install . . . . . builds libs and nlms and copies install files to$(DL)
+ @echo $(DL) "$(INSTALL)"$(DL)
+ @echo $(DL)installdev. . . . copies headers and files needed for development to$(DL)
+ @echo $(DL) "$(INSTALL)"$(DL)
+ @echo $(DL)clean . . . . . . deletes $(OBJDIR) dirs, *.err, and *.map$(DL)
+ @echo $(DL)clobber_all . . . deletes all possible output from the make$(DL)
+ @echo $(DL)clobber_install . deletes all files in $(INSTALL)$(DL)
+ @$(ECHONL)
+ @echo $(DL)Multiple targets can be used on a single make command line -$(DL)
+ @echo $(DL)(i.e. $(MAKE) clean all)$(DL)
+ @$(ECHONL)
+ @echo $(DL)You can also specify RELEASE=debug, RELEASE=noopt, or RELEASE=release$(DL)
+ @echo $(DL)The default is RELEASE=release$(DL)
clobber_all :: clean clobber_install
clobber_install ::
- -$(DELTREE) $(INSTALL) 2>NUL
+ $(call RMDIR,$(INSTALL))
#
# build recursive targets
@@ -69,28 +69,26 @@ clobber_install ::
$(SUBDIRS) : FORCE
ifneq "$(MAKECMDGOALS)" "clean"
- $(CMD) echo.
+ @$(ECHONL)
@echo Building $(CURDIR)/$@
endif
$(MAKE) -C $@ $(MAKECMDGOALS) -f NWGNUmakefile RELEASE=$(RELEASE) DEST="$(INSTALL)" LM_LICENSE_FILE="$(LM_LICENSE_FILE)"
- $(CMD) echo.
+ @$(ECHONL)
-FORCE:
+FORCE : ;
#
# Standard targets
#
-clean :: $(SUBDIRS)
+clean :: $(SUBDIRS) $(APRTEST)
@echo Cleaning up $(CURDIR)
- -$(DELTREE) $(OBJDIR) 2> NUL
- $(CHK) *.err $(DEL) *.err
- $(CHK) *.map $(DEL) *.map
- $(CHK) *.d $(DEL) *.d
- $(CHK) *.tmp $(DEL) *.tmp
- $(CHK) xc.bat $(DEL) xc.bat
- -$(DELTREE) $(OBJDIR) 2> NUL
+ $(call RMDIR,$(OBJDIR))
+ $(call DEL,*.err)
+ $(call DEL,*.map)
+ $(call DEL,*.tmp)
+# $(call DEL,*.d)
$(OBJDIR) ::
- $(CHKNOT) $(OBJDIR)\nul mkdir $(OBJDIR)
+ $(call MKDIR,$@)
diff --git a/build/NWGNUmakefile b/build/NWGNUmakefile
index baf03d2fe..68fff198b 100644
--- a/build/NWGNUmakefile
+++ b/build/NWGNUmakefile
@@ -10,98 +10,74 @@ SUBDIRS = \
# paths to tools
#
-include $(APR_WORK)\build\NWGNUhead.inc
+include $(APR_WORK)/build/NWGNUhead.inc
#
# build this level's files
FILES_prebuild_headers = \
$(APR)/include/apr.h \
- $(APRUTIL)/include/apu.h \
- $(APRUTIL)/include/apu_want.h \
- $(APRUTIL)/include/apr_ldap.h \
- $(APRUTIL)/include/private/apu_config.h \
- $(APRUTIL)/include/private/apu_select_dbm.h \
- $(APRUTIL)/xml/expat/lib/expat.h \
- $(APRUTIL)/xml/expat/lib/config.h \
+ $(APU)/include/apu.h \
+ $(APU)/include/apu_want.h \
+ $(APU)/include/apr_ldap.h \
+ $(APU)/include/private/apu_config.h \
+ $(APU)/include/private/apu_select_dbm.h \
+ $(APUXML)/expat/lib/expat_config.h \
$(EOLIST)
nlms :: $(APR)/aprlib.imp
$(APR)/aprlib.imp : make_nw_export.awk nw_export.i
- @echo Generating $(subst /,\,$@)
- $(AWK) -v EXPPREFIX=APR$(VERSION_MAJMIN) -f $^ | sort >$@
+ @echo $(DL)GEN $@$(DL)
+ $(AWK) -v EXPPREFIX=APR$(VERSION_MAJMIN) -f $^ >$@
-nw_export.i : nw_export.inc $(APRUTIL)/build/nw_apu_export.inc $(FILES_prebuild_headers) $(NLM_NAME)_cc.opt
- @echo Generating $(subst /,\,$@)
- $(CC) $< @$(NLM_NAME)_cc.opt
-
-$(NLM_NAME)_cc.opt : NWGNUmakefile $(APR_WORK)\build\NWGNUenvironment.inc $(APR_WORK)\build\NWGNUhead.inc $(APR_WORK)\build\NWGNUtail.inc $(CUSTOM_INI)
- $(CHK) $@ $(DEL) $@
- @echo -P >> $@
- @echo -EP >> $@
- @echo -nosyspath >> $@
- @echo -w nocmdline >> $@
- @echo $(DEFINES) -DGENEXPORTS >> $@
- @echo -I$(APR)\include >> $@
- @echo -I$(APR)\include\arch\netware >> $@
- @echo -I$(APR)\include\arch\unix >> $@
- @echo -I$(APRUTIL)\include >> $@
- @echo -I$(APRUTIL)\build >> $@
- @echo -ir $(NOVELLLIBC) >> $@
+nw_export.i : nw_export.inc $(APU)/build/nw_apu_export.inc $(FILES_prebuild_headers) cc.opt
+ @echo $(DL)GEN $@$(DL)
+ $(CC) $< @cc.opt
+
+cc.opt : NWGNUmakefile $(APR_WORK)/build/NWGNUenvironment.inc $(APR_WORK)/build/NWGNUhead.inc $(APRBUILD)/NWGNUtail.inc $(CUSTOM_INI)
+ @echo $(DL)-P$(DL)> $@
+ @echo $(DL)-EP$(DL)>> $@
+ @echo $(DL)-nosyspath$(DL)>> $@
+ @echo $(DL)-w nocmdline$(DL)>> $@
+ @echo $(DL)$(DEFINES) -DGENEXPORTS$(DL)>> $@
+ @echo $(DL)-I$(APR)/include$(DL)>> $@
+ @echo $(DL)-I$(APR)/include/arch/netware$(DL)>> $@
+ @echo $(DL)-I$(APR)/include/arch/unix$(DL)>> $@
+ @echo $(DL)-I$(APU)/include$(DL)>> $@
+ @echo $(DL)-I$(APU)/include/private$(DL)>> $@
+ @echo $(DL)-I$(APU)/build$(DL)>> $@
+ @echo $(DL)-ir $(NOVELLLIBC)$(DL)>> $@
ifneq "$(LDAPSDK)" ""
- @echo -ir $(LDAPSDK) >> $@
+ @echo $(DL)-ir $(LDAPSDK)$(DL)>> $@
endif
-$(APR)/include/%.h: $(subst /,\,$(APR))\include\%.hnw
- @echo Creating $(subst /,\,$@)
- $(CP) $< $(subst /,\,$(APR))\include\$(@F)
-
-$(APRUTIL)/include/private/%.h: $(subst /,\,$(APRUTIL))\include\private\%.hnw
- @echo Creating $(subst /,\,$@)
- $(CP) $< $(subst /,\,$(APRUTIL))\include\private\$(@F)
-
-$(APRUTIL)/include/private/%.h: $(subst /,\,$(APRUTIL))\include\private\%.hw
- @echo Creating $(subst /,\,$@)
- $(CP) $< $(subst /,\,$(APRUTIL))\include\private\$(@F)
-
-$(APRUTIL)/include/%.h: $(subst /,\,$(APRUTIL))\include\%.hnw
- @echo Creating $(subst /,\,$@)
- $(CP) $< $(subst /,\,$(APRUTIL))\include\$(@F)
-$(APRUTIL)/xml/expat/lib/%.h: $(subst /,\,$(APRUTIL))\xml\expat\lib\%.hnw
- @echo Creating $(subst /,\,$@)
- $(CP) $< $(subst /,\,$(APRUTIL))\xml\expat\lib\$(@F)
+%.h: %.hnw
+ @echo $(DL)Creating $@$(DL)
+ $(call COPY,$<,$@)
-$(APRUTIL)/xml/expat/lib/%.h: $(subst /,\,$(APRUTIL))\xml\expat\lib\%.h.in
- @echo Creating $(subst /,\,$@)
- $(CP) $< $(subst /,\,$(APRUTIL))\xml\expat\lib\$(@F)
+%.h: %.hw
+ @echo $(DL)Creating $@$(DL)
+ $(call COPY,$<,$@)
#
# You can use this target if all that is needed is to copy files to the
# installation area
#
install :: nlms FORCE
-
clean ::
- $(CHK) nw_export.i $(DEL) nw_export.i
- $(CHK) $(NLM_NAME)_cc.opt $(DEL) $(NLM_NAME)_cc.opt
- $(CHK) NWGNUversion.inc $(DEL) NWGNUversion.inc
- $(CHK) $(subst /,\,$(APR))\include\apr.h $(DEL) $(subst /,\,$(APR))\include\apr.h
- $(CHK) $(subst /,\,$(APRUTIL))\include\apu.h $(DEL) $(subst /,\,$(APRUTIL))\include\apu.h
- $(CHK) $(subst /,\,$(APRUTIL))\include\apu_want.h $(DEL) $(subst /,\,$(APRUTIL))\include\apu_want.h
- $(CHK) $(subst /,\,$(APRUTIL))\include\apr_ldap.h $(DEL) $(subst /,\,$(APRUTIL))\include\apr_ldap.h
- $(CHK) $(subst /,\,$(APRUTIL))\include\private\apu_config.h $(DEL) $(subst /,\,$(APRUTIL))\include\private\apu_config.h
- $(CHK) $(subst /,\,$(APRUTIL))\include\private\apu_select_dbm.h $(DEL) $(subst /,\,$(APRUTIL))\include\private\apu_select_dbm.h
- $(CHK) $(subst /,\,$(APRUTIL))\xml\expat\lib\expat.h $(DEL) $(subst /,\,$(APRUTIL))\xml\expat\lib\expat.h
- $(CHK) $(subst /,\,$(APRUTIL))\xml\expat\lib\config.h $(DEL) $(subst /,\,$(APRUTIL))\xml\expat\lib\config.h
- $(CHK) $(subst /,\,$(APR))\aprlib.imp $(DEL) $(subst /,\,$(APR))\aprlib.imp
+ $(call DEL,nw_export.i)
+ $(call DEL,cc.opt)
+ $(call DEL,NWGNUversion.inc)
+ $(call DEL,$(APR)/aprlib.imp)
+ $(foreach file,$(FILES_prebuild_headers),$(call DEL,$(file)))
#
# Include the 'tail' makefile that has targets that depend on variables defined
# in this makefile
#
-include $(APR_WORK)\build\NWGNUtail.inc
+include $(APRBUILD)/NWGNUtail.inc
diff --git a/build/NWGNUtail.inc b/build/NWGNUtail.inc
index 2179a5673..a5e562f32 100644
--- a/build/NWGNUtail.inc
+++ b/build/NWGNUtail.inc
@@ -7,7 +7,6 @@
# If we are going to create an nlm, make sure we have assigned variables to
# use during the link.
#
-echo NLM_NAME=$(NLM_NAME)
ifndef NLM_NAME
NLM_NAME = $(TARGET_nlm)
endif
@@ -28,43 +27,63 @@ ifndef NLM_COPYRIGHT
NLM_COPYRIGHT = Licensed under the Apache License, Version 2.0
endif
+ifeq "$(NLM_FLAGS)" ""
+NLM_FLAGS = AUTOUNLOAD, PSEUDOPREEMPTION
+endif
+
+ifeq "$(NLM_STACK_SIZE)" ""
+NLM_STACK_SIZE = 65536
+endif
+
+ifeq "$(NLM_ENTRY_SYM)" ""
+NLM_ENTRY_SYM = _LibCPrelude
+endif
+
+ifeq "$(NLM_EXIT_SYM)" ""
+NLM_EXIT_SYM = _LibCPostlude
+endif
+
+ifeq "$(NLM_VERSION)" ""
+NLM_VERSION = $(VERSION)
+endif
+
#
# Create dependency lists based on the files available
#
-CCOPT_DEPENDS = \
- $(APR_WORK)\build\NWGNUhead.inc \
- $(APR_WORK)\build\NWGNUenvironment.inc \
- $(APR_WORK)\build\NWGNUtail.inc \
+CCOPT_DEPENDS = \
+ $(APRBUILD)/NWGNUhead.inc \
+ $(APRBUILD)/NWGNUenvironment.inc \
+ $(APRBUILD)/NWGNUtail.inc \
NWGNUmakefile \
$(CUSTOM_INI) \
$(EOLIST)
-CPPOPT_DEPENDS = \
- $(APR_WORK)\build\NWGNUhead.inc \
- $(APR_WORK)\build\NWGNUenvironment.inc \
- $(APR_WORK)\build\NWGNUtail.inc \
+CPPOPT_DEPENDS = \
+ $(APRBUILD)/NWGNUhead.inc \
+ $(APRBUILD)/NWGNUenvironment.inc \
+ $(APRBUILD)/NWGNUtail.inc \
NWGNUmakefile \
$(CUSTOM_INI) \
$(EOLIST)
$(NLM_NAME)_LINKOPT_DEPENDS = \
$(TARGET_lib) \
- $(APR_WORK)\build\NWGNUenvironment.inc \
+ $(APRBUILD)/NWGNUenvironment.inc \
NWGNUmakefile \
- $(APR_WORK)\build\NWGNUtail.inc \
+ $(APRBUILD)/NWGNUtail.inc \
$(CUSTOM_INI) \
$(VERSION_INC) \
$(EOLIST)
ifeq "$(words $(strip $(TARGET_lib)))" "1"
-LIB_NAME = $(basename $(notdir $(TARGET_lib)))
+LIB_NAME = $(basename $(notdir $(TARGET_lib)))
$(LIB_NAME)_LIBLST_DEPENDS = \
$(FILES_lib_objs) \
- $(APR_WORK)\build\NWGNUenvironment.inc \
+ $(APRBUILD)/NWGNUenvironment.inc \
NWGNUmakefile \
- $(APR_WORK)\build\NWGNUtail.inc \
+ $(APRBUILD)/NWGNUtail.inc \
$(CUSTOM_INI) \
$(EOLIST)
endif
@@ -84,14 +103,15 @@ endif
#
ifneq ($(MAKECMDGOALS),clean)
-$(APR_WORK)\build\NWGNUversion.inc : $(APR_WORK)\build\nw_ver.awk $(APR_WORK)\include\apr_version.h
- @echo Generating $(subst /,\,$@)
+$(APRBUILD)/NWGNUversion.inc : $(APRBUILD)/nw_ver.awk $(APR)/include/apr_version.h
+# @echo Generating $@
+ @echo GEN $@
@$(AWK) -f $^ > $@
--include $(APR_WORK)\build\NWGNUversion.inc
+-include $(APRBUILD)/NWGNUversion.inc
ifneq "$(strip $(VERSION_STR))" ""
-VERSION_INC = $(APR_WORK)\build\NWGNUversion.inc
+VERSION_INC = $(APRBUILD)/NWGNUversion.inc
else
VERSION = 1,3,0
VERSION_STR = 1.3.0
@@ -100,69 +120,80 @@ endif
endif
ifeq "$(words $(strip $(TARGET_nlm)))" "1"
-INCLUDE_BLDCMDS=1
+INCLUDE_BLDCMDS = 1
+CCOPT_NAME = $(NLM_NAME)
endif
ifeq "$(words $(strip $(TARGET_lib)))" "1"
-INCLUDE_BLDCMDS=1
+INCLUDE_BLDCMDS = 1
+CCOPT_NAME = $(LIB_NAME)
endif
ifeq "$(INCLUDE_BLDCMDS)" "1"
-$(OBJDIR)/%.o: %.c $(OBJDIR)\$(NLM_NAME)_cc.opt
- @echo Compiling $<
- $(CC) $< -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
+$(OBJDIR)/%.o: %.c $(OBJDIR)/$(CCOPT_NAME)_cc.opt
+# @echo Compiling $<
+ @echo $(DL)CC $<$(DL)
+ $(CC) -o $@ $< @$(word 2, $^)
-$(OBJDIR)\$(NLM_NAME)_cc.opt: $(CCOPT_DEPENDS)
- @echo CCOPT_DEPENDS=$(CCOPT_DEPENDS)
- $(CHK) $@ $(DEL) $@
- @echo Generating $@
+$(OBJDIR)/$(CCOPT_NAME)_cc.opt: $(CCOPT_DEPENDS)
+ $(call DEL,$@)
+ifdef VERBOSE
+ @echo $(DL)CCOPT_DEPENDS=$^$(DL)
+endif
+# @echo Generating $@
+ @echo $(DL)GEN $@$(DL)
ifneq "$(strip $(CFLAGS))" ""
- @echo $(CFLAGS) >> $@
+ @echo $(DL)$(CFLAGS)$(DL)>> $@
endif
ifneq "$(strip $(XCFLAGS))" ""
- @echo $(XCFLAGS) >> $@
+ @echo $(DL)$(XCFLAGS)$(DL)>> $@
endif
ifneq "$(strip $(XINCDIRS))" ""
- @echo $(foreach xincdir,$(strip $(subst ;,$(SPACE),$(XINCDIRS))),-I$(xincdir)) >> $@
+ @echo $(DL)$(foreach xincdir,$(strip $(subst ;,$(SPACE),$(XINCDIRS))),-I$(xincdir))$(DL)>> $@
endif
ifneq "$(strip $(INCDIRS))" ""
- @echo $(foreach incdir,$(strip $(subst ;,$(SPACE),$(INCDIRS))),-I$(incdir)) >> $@
+ @echo $(DL)$(foreach incdir,$(strip $(subst ;,$(SPACE),$(INCDIRS))),-I$(incdir))$(DL)>> $@
endif
ifneq "$(strip $(DEFINES))" ""
- @echo $(DEFINES) >> $@
+ @echo $(DL)$(DEFINES)$(DL)>> $@
endif
ifneq "$(strip $(XDEFINES))" ""
- @echo $(XDEFINES) >> $@
+ @echo $(DL)$(XDEFINES)$(DL)>> $@
endif
-$(OBJDIR)/%.o: %.cpp $(OBJDIR)\cpp.opt
- @echo Compiling $<
- $(CPP) $< -o=$(OBJDIR)\$(@F) @$(OBJDIR)\cpp.opt
+$(OBJDIR)/%.o: %.cpp $(OBJDIR)/$(CCOPT_NAME)_cpp.opt
+# @echo Compiling $<
+ @echo $(DL)CPP $<$(DL)
+ $(CCP) -o $@ $< @$(word 2, $^)
-$(OBJDIR)\cpp.opt: $(CPPOPT_DEPENDS)
- $(CHK) $@ $(DEL) $@
- @echo Generating $@
+$(OBJDIR)/$(CCOPT_NAME)_cpp.opt: $(CPPOPT_DEPENDS)
+ $(call DEL,$@)
+ifdef VERBOSE
+ @echo $(DL)CPPOPT_DEPENDS=$^$(DL)
+endif
+# @echo Generating $@
+ @echo $(DL)GEN $@$(DL)
ifneq "$(strip $(CFLAGS))" ""
- @echo $(CFLAGS) >> $@
+ @echo $(DL)$(CFLAGS)$(DL)>> $@
endif
ifneq "$(strip $(XCFLAGS))" ""
- @echo $(XCFLAGS) >> $@
+ @echo $(DL)$(XCFLAGS)$(DL)>> $@
endif
ifneq "$(strip $(XINCDIRS))" ""
- @echo $(foreach xincdir,$(strip $(subst ;,$(SPACE),$(XINCDIRS))),-I$(xincdir)) >> $@
+ @echo $(DL)$(foreach xincdir,$(strip $(subst ;,$(SPACE),$(XINCDIRS))),-I$(xincdir))$(DL)>> $@
endif
ifneq "$(strip $(INCDIRS))" ""
- @echo $(foreach incdir,$(strip $(subst ;,$(SPACE),$(INCDIRS))),-I$(incdir)) >> $@
+ @echo $(DL)$(foreach incdir,$(strip $(subst ;,$(SPACE),$(INCDIRS))),-I$(incdir))$(DL)>> $@
endif
ifneq "$(strip $(DEFINES))" ""
- @echo $(DEFINES) >> $@
+ @echo $(DL)$(DEFINES)$(DL)>> $@
endif
ifneq "$(strip $(XDEFINES))" ""
- @echo $(XDEFINES) >> $@
+ @echo $(DL)$(XDEFINES)$(DL)>> $@
endif
-endif # one target nlm
+endif # one target nlm or lib
#
# Rules to build libraries
@@ -172,22 +203,41 @@ endif # one target nlm
ifeq "$(words $(strip $(TARGET_lib)))" "1"
-$(TARGET_lib) : $(OBJDIR)\$(LIB_NAME)_lib.lst
- @echo Generating $@
- $(CHK) $(OBJDIR)\$(@F) $(DEL) $(OBJDIR)\$(@F)
- $(LIB) -o $(OBJDIR)\$(@F) @$?
+$(TARGET_lib) : $(OBJDIR)/$(LIB_NAME)_lib.lst
+ $(call DEL,$@)
+# @echo Generating $@
+ @echo $(DL)AR $@$(DL)
+ $(LIB) -o $@ @$<
+
+$(OBJDIR)/aprlib_lib.lst: $(aprlib_LIBLST_DEPENDS)
+ $(call DEL,$@)
+ifneq "$(strip $(FILES_lib_objs))" ""
+# @echo Generating $@
+ @echo $(DL)GEN $@$(DL)
+ifdef VERBOSE
+ @echo $(DL)FILES_lib_objs=$(words $(FILES_lib_objs))$(DL)
+endif
+ @echo $(DL)$(wordlist 1, 20, $(FILES_lib_objs))$(DL)>> $@
+ @echo $(DL)$(wordlist 21, 40, $(FILES_lib_objs))$(DL)>> $@
+ @echo $(DL)$(wordlist 41, 60, $(FILES_lib_objs))$(DL)>> $@
+ @echo $(DL)$(wordlist 61, 80, $(FILES_lib_objs))$(DL)>> $@
+endif
-$(OBJDIR)\$(LIB_NAME)_lib.lst: $($(LIB_NAME)_LIBLST_DEPENDS)
- $(CHK) $@ $(DEL) $@
- @echo Generating $@
+$(OBJDIR)/%_lib.lst: $($(LIB_NAME)_LIBLST_DEPENDS)
+ $(call DEL,$@)
ifneq "$(strip $(FILES_lib_objs))" ""
- @echo $(foreach objfile,$(FILES_lib_objs),$(subst /,\,$(objfile)) ) >> $@
+# @echo Generating $@
+ @echo $(DL)GEN $@$(DL)
+ifdef VERBOSE
+ @echo FILES_lib_objs=$(words $(FILES_lib_objs))
+endif
+ @echo $(DL)$(FILES_lib_objs)$(DL)>> $@
endif
else # We must have more than one target library so load the individual makefiles
-$(OBJDIR)/%.lib: NWGNU% $(APR_WORK)\build\NWGNUhead.inc $(APR_WORK)\build\NWGNUtail.inc $(APR_WORK)\build\NWGNUenvironment.inc FORCE
- @echo Calling $<
+$(OBJDIR)/%.lib: NWGNU% $(APRBUILD)/NWGNUhead.inc $(APRBUILD)/NWGNUtail.inc $(APRBUILD)/NWGNUenvironment.inc FORCE
+ @echo $(DL)Calling $<$(DL)
$(MAKE) -f $< $(MAKECMDGOALS) RELEASE=$(RELEASE)
endif
@@ -196,113 +246,104 @@ endif
# Rules to build nlms.
#
-vpath libcpre.o $(NOVELLLIBC)\imports
+vpath libcpre.o $(NOVI)
# If we only have one target NLM then build it
ifeq "$(words $(strip $(TARGET_nlm)))" "1"
-$(TARGET_nlm) : $(FILES_nlm_objs) $(FILES_nlm_libs) $(OBJDIR)\$(NLM_NAME)_link.opt
- @echo Linking $@
- $(LINK) @$(OBJDIR)\$(NLM_NAME)_link.opt
+$(TARGET_nlm) : $(FILES_nlm_objs) $(FILES_nlm_libs) $(OBJDIR)/$(NLM_NAME)_link.opt
+# @echo Linking $@
+ @echo $(DL)LINK $@$(DL)
+ $(LINK) @$(OBJDIR)/$(NLM_NAME)_link.opt
# This will force the link option file to be rebuilt if we change the
# corresponding makefile
-$(OBJDIR)\$(NLM_NAME)_link.opt : $($(NLM_NAME)_LINKOPT_DEPENDS)
- $(CHK) $(OBJDIR)\$(@F) $(DEL) $(OBJDIR)\$(@F)
- $(CHK) $(OBJDIR)\$(NLM_NAME)_link.def $(DEL) $(OBJDIR)\$(NLM_NAME)_link.def
- @echo Generating $@
- @echo -warnings off >> $@
- @echo -zerobss >> $@
- @echo -o $(TARGET_nlm) >> $@
+$(OBJDIR)/$(NLM_NAME)_link.opt : $($(NLM_NAME)_LINKOPT_DEPENDS)
+ $(call DEL,$@)
+ $(call DEL,$(@:.opt=.def))
+# @echo Generating $@
+ @echo $(DL)GEN $@$(DL)
+ @echo $(DL)# Do not edit this file - it is created by make!$(DL) > $@
+ @echo $(DL)# All your changes will be lost!!$(DL)>> $@
+ @echo $(DL)-warnings off$(DL)>> $@
+ @echo $(DL)-zerobss$(DL)>> $@
+ @echo $(DL)-o $(TARGET_nlm)$(DL)>> $@
ifneq "$(FILE_nlm_copyright)" ""
- @-type $(FILE_nlm_copyright) >> $@
+ @-$(CAT) $(FILE_nlm_copyright) >> $@
endif
ifeq "$(RELEASE)" "debug"
- @echo -g >> $@
- @echo -sym internal >> $@
- @echo -sym codeview4 >> $@
- @echo -osym $(OBJDIR)\$(NLM_NAME).sym >> $@
+ @echo $(DL)-g$(DL)>> $@
+ @echo $(DL)-sym internal$(DL)>> $@
+ @echo $(DL)-sym codeview4$(DL)>> $@
+ @echo $(DL)-osym $(OBJDIR)/$(NLM_NAME).sym$(DL)>> $@
else
- @echo -sym internal >> $@
-endif
- @echo -l $(APR)/$(OBJDIR) >> $@
- @echo -l $(APRUTIL)/$(OBJDIR) >> $@
- @echo -l $(APULDAP)/$(OBJDIR) >> $@
- @echo -l $(XML)/$(OBJDIR) >> $@
- @echo -l "$(METROWERKS)/Novell Support/Metrowerks Support/Libraries/Runtime" >> $@
- @echo -l "$(METROWERKS)/Novell Support/Metrowerks Support/Libraries/MSL C++" >> $@
+ @echo $(DL)-sym internal$(DL)>> $@
+endif
+ @echo $(DL)-l $(APR)/$(OBJDIR)$(DL)>> $@
+ @echo $(DL)-l $(APU)/$(OBJDIR)$(DL)>> $@
+ @echo $(DL)-l $(APULDAP)/$(OBJDIR)$(DL)>> $@
+ @echo $(DL)-l $(APUXML)/$(OBJDIR)$(DL)>> $@
+ @echo $(DL)-l $(APR)/misc/netware$(DL)>> $@
+ @echo $(DL)-l $(APR)$(DL)>> $@
+ @echo $(DL)-l "$(METROWERKS)/Novell Support/Metrowerks Support/Libraries/Runtime"$(DL)>> $@
+ @echo $(DL)-l "$(METROWERKS)/Novell Support/Metrowerks Support/Libraries/MSL C++"$(DL)>> $@
ifneq "$(IPV6)" ""
- @echo -l $(NOVELLLIBC)\include\winsock\IPV6 >> $@
+ @echo $(DL)-l $(NOVELLLIBC)/include/winsock/IPV6$(DL)>> $@
endif
- @echo -l $(NOVELLLIBC)/imports >> $@
+ @echo $(DL)-l $(NOVELLLIBC)/imports$(DL)>> $@
ifneq "$(LDAPSDK)" ""
- @echo -l $(LDAPSDK)/lib/nlm >> $@
+ @echo $(DL)-l $(LDAPSDK)/imports$(DL)>> $@
endif
- @echo -nodefaults >> $@
- @echo -map $(OBJDIR)\$(NLM_NAME).map>> $@
+ @echo $(DL)-nodefaults$(DL)>> $@
+ @echo $(DL)-map $(OBJDIR)/$(NLM_NAME).map$(DL)>> $@
ifneq "$(strip $(XLFLAGS))" ""
- @echo $(XLFLAGS) >> $@
+ @echo $(DL)$(XLFLAGS)$(DL)>> $@
endif
ifneq "$(strip $(FILES_nlm_objs))" ""
- @echo $(foreach objfile,$(strip $(FILES_nlm_objs)),$(subst /,\,$(objfile))) >> $@
+ @echo $(DL)$(foreach objfile,$(strip $(FILES_nlm_objs)),$(objfile))$(DL)>> $@
endif
ifneq "$(FILES_nlm_libs)" ""
- @echo $(foreach libfile, $(notdir $(strip $(FILES_nlm_libs))),-l$(subst /,\,$(libfile))) >> $@
+ @echo $(DL)$(foreach libfile, $(notdir $(strip $(FILES_nlm_libs))),-l$(libfile))$(DL)>> $@
endif
- @echo -commandfile $(OBJDIR)\$(NLM_NAME)_link.def >> $@
- @echo # Do not edit this file - it is created by make! > $(OBJDIR)\$(NLM_NAME)_link.def
- @echo # All your changes will be lost!! >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo $(DL)-commandfile $(@:.opt=.def)$(DL)>> $@
+ @echo $(DL)# Do not edit this file - it is created by make!$(DL)> $(@:.opt=.def)
+ @echo $(DL)# All your changes will be lost!!$(DL)>> $(@:.opt=.def)
ifneq "$(FILE_nlm_msg)" ""
- @echo Messages $(FILE_nlm_msg) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo $(DL)Messages $(FILE_nlm_msg)$(DL)>> $(@:.opt=.def)
endif
ifneq "$(FILE_nlm_hlp)" ""
- @echo Help $(FILE_nlm_hlp) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo $(DL)Help $(FILE_nlm_hlp)$(DL)>> $(@:.opt=.def)
endif
ifeq "$(FILE_nlm_copyright)" ""
- @echo copyright "$(NLM_COPYRIGHT)" >> $(OBJDIR)\$(NLM_NAME)_link.def
-endif
- @echo description "$(NLM_DESCRIPTION)" >> $(OBJDIR)\$(NLM_NAME)_link.def
- @echo threadname "$(NLM_THREAD_NAME)" >> $(OBJDIR)\$(NLM_NAME)_link.def
-ifneq "$(NLM_STACK_SIZE)" ""
- @echo stacksize $(subst K,000,$(subst k,K,$(strip $(NLM_STACK_SIZE)))) >> $(OBJDIR)\$(NLM_NAME)_link.def
-else
- @echo stacksize 64000 >> $(OBJDIR)\$(NLM_NAME)_link.def
-endif
- @echo screenname "$(NLM_SCREEN_NAME)" >> $(OBJDIR)\$(NLM_NAME)_link.def
-ifneq "$(NLM_VERSION)" ""
- @echo version $(NLM_VERSION) >> $(OBJDIR)\$(NLM_NAME)_link.def
-else
- @echo version $(VERSION) >> $(OBJDIR)\$(NLM_NAME)_link.def
-endif
-ifneq "$(NLM_ENTRY_SYM)" ""
- @echo start $(NLM_ENTRY_SYM) >> $(OBJDIR)\$(NLM_NAME)_link.def
-endif
-ifneq "$(NLM_EXIT_SYM)" ""
- @echo exit $(NLM_EXIT_SYM) >> $(OBJDIR)\$(NLM_NAME)_link.def
-endif
+ @echo $(DL)copyright "$(NLM_COPYRIGHT)"$(DL)>> $(@:.opt=.def)
+endif
+ @echo $(DL)description "$(NLM_DESCRIPTION)"$(DL)>> $(@:.opt=.def)
+ @echo $(DL)threadname "$(NLM_THREAD_NAME)"$(DL)>> $(@:.opt=.def)
+ @echo $(DL)screenname "$(NLM_SCREEN_NAME)"$(DL)>> $(@:.opt=.def)
+ @echo $(DL)stacksize $(subst K,000,$(subst k,K,$(strip $(NLM_STACK_SIZE))))$(DL)>> $(@:.opt=.def)
+ @echo $(DL)version $(NLM_VERSION) $(DL)>> $(@:.opt=.def)
+ @echo $(DL)$(strip $(NLM_FLAGS))$(DL)>> $(@:.opt=.def)
+ @echo $(DL)start $(NLM_ENTRY_SYM)$(DL)>> $(@:.opt=.def)
+ @echo $(DL)exit $(NLM_EXIT_SYM)$(DL)>> $(@:.opt=.def)
ifneq "$(NLM_CHECK_SYM)" ""
- @echo check $(NLM_CHECK_SYM) >> $(OBJDIR)\$(NLM_NAME)_link.def
-endif
-ifneq "$(NLM_FLAGS)" ""
- @echo $(strip $(NLM_FLAGS)) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo $(DL)check $(NLM_CHECK_SYM)$(DL)>> $(@:.opt=.def)
endif
ifneq "$(FILES_nlm_modules)" ""
- @echo module $(foreach module,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_modules))),$(subst /,\,$(module))) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo $(DL)module $(foreach module,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_modules))),$(module))$(DL)>> $(@:.opt=.def)
endif
ifneq "$(FILES_nlm_Ximports)" ""
- @echo import $(foreach import,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_Ximports))),$(subst /,\,$(import))) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo $(DL)import $(foreach import,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_Ximports))),$(import))$(DL)>> $(@:.opt=.def)
endif
ifneq "$(FILES_nlm_exports)" ""
- @echo export $(foreach export,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_exports))),$(subst /,\,$(export))) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo $(DL)export $(foreach export,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_exports))),$(export))$(DL)>> $(@:.opt=.def)
endif
-
# if APACHE_UNIPROC is defined, don't include XDCData
ifndef APACHE_UNIPROC
ifneq "$(string $(XDCDATA))" ""
- @echo xdcdata $(XDCDATA) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo $(DL)xdcdata $(XDCDATA)$(DL)>> $(@:.opt=.def)
else
- @echo xdcdata $(APR)\misc\netware\apr.xdc >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo $(DL)xdcdata apr.xdc$(DL)>> $(@:.opt=.def)
endif
endif
@@ -313,10 +354,10 @@ else # more than one target so look for individual makefiles.
ifndef NO_LICENSE_FILE
-$(OBJDIR)/%.nlm: NWGNU% $(APR_WORK)\build\NWGNUhead.inc $(APR_WORK)\build\NWGNUtail.inc $(APR_WORK)\build\NWGNUenvironment.inc $(CUSTOM_INI) $(VERSION_INC) FORCE
- @echo Calling $<
+$(OBJDIR)/%.nlm: NWGNU% $(APRBUILD)/NWGNUhead.inc $(APRBUILD)/NWGNUtail.inc $(APRBUILD)/NWGNUenvironment.inc $(CUSTOM_INI) $(VERSION_INC) FORCE
+ @echo $(DL)Calling $<$(DL)
$(MAKE) -f $< $(MAKECMDGOALS) RELEASE=$(RELEASE)
- $(CMD) echo.
+ @$(ECHONL)
else
@@ -327,6 +368,6 @@ endif # NO_LICENSE_FILE
endif # multiple targets
$(INSTDIRS) ::
- $(CHKNOT) $@\NUL mkdir $@
+ $(call MKDIR,$@)
diff --git a/build/aplibtool.c b/build/aplibtool.c
index 8f4943c3e..ffbdc3f7b 100644
--- a/build/aplibtool.c
+++ b/build/aplibtool.c
@@ -532,9 +532,9 @@ char *shell_esc(const char *str)
for (; *s; ++s) {
if (*s == '"' || *s == '\\') {
- *d++ = '\\';
- }
- *d++ = *s;
+ *d++ = '\\';
+ }
+ *d++ = *s;
}
*d = '\0';
diff --git a/build/apr_hints.m4 b/build/apr_hints.m4
index a11ae0268..7e297067d 100644
--- a/build/apr_hints.m4
+++ b/build/apr_hints.m4
@@ -403,7 +403,7 @@ dnl # Not a problem in 10.20. Otherwise, who knows?
APR_ADDTO(LIBS, [-lbind -lsocket])
;;
esac
- APR_ADDTO(CPPFLAGS, [-DSIGPROCMASK_SETS_THREAD_MASK -DAP_AUTH_DBM_USE_APR])
+ APR_ADDTO(CPPFLAGS, [-DSIGPROCMASK_SETS_THREAD_MASK])
;;
4850-*.*)
APR_ADDTO(CPPFLAGS, [-DSVR4 -DMPRAS])
@@ -440,24 +440,33 @@ dnl # Not a problem in 10.20. Otherwise, who knows?
APR_ADDTO(CPPFLAGS, [-DCYGWIN])
;;
*mingw*)
- dnl gcc (3.4.2 at least) seems to mis-optimize at levels greater than
- dnl -O0 producing link-time errors. The user can override by
- dnl explicitly passing a CFLAGS value to configure.
- dnl
- dnl Example error messages:
- dnl undefined reference to 'libmsvcrt_a_iname'
- dnl undefined reference to '_nm___pctype'
- if test "$ac_test_CFLAGS" != set; then
- APR_REMOVEFROM(CFLAGS,-O2)
- APR_ADDTO(CFLAGS,-O0)
- fi
- APR_ADDTO(LDFLAGS, [-Wl,--enable-auto-import,--subsystem,console])
- APR_SETIFNULL(apr_lock_method, [win32])
- APR_SETIFNULL(apr_process_lock_is_global, [yes])
- APR_SETIFNULL(have_unicode_fs, [1])
- APR_SETIFNULL(have_proc_invoked, [1])
- APR_SETIFNULL(apr_cv_use_lfs64, [yes])
- ;;
+ APR_ADDTO(CPPFLAGS, [-DWIN32 -D__MSVCRT__])
+ APR_ADDTO(LDFLAGS, [-Wl,--enable-auto-import,--subsystem,console])
+ APR_SETIFNULL(have_unicode_fs, [1])
+ APR_SETIFNULL(have_proc_invoked, [1])
+ APR_SETIFNULL(apr_lock_method, [win32])
+ APR_SETIFNULL(apr_process_lock_is_global, [yes])
+ APR_SETIFNULL(apr_cv_use_lfs64, [yes])
+ APR_SETIFNULL(apr_cv_osuuid, [yes])
+ APR_SETIFNULL(apr_cv_tcp_nodelay_with_cork, [no])
+ APR_SETIFNULL(apr_thread_func, [__stdcall])
+ APR_SETIFNULL(ac_cv_o_nonblock_inherited, [yes])
+ APR_SETIFNULL(ac_cv_tcp_nodelay_inherited, [yes])
+ APR_SETIFNULL(ac_cv_file__dev_zero, [no])
+ APR_SETIFNULL(ac_cv_func_setpgrp_void, [no])
+ case $host in
+ *mingw32*)
+ APR_SETIFNULL(apr_has_xthread_files, [1])
+ APR_SETIFNULL(apr_has_user, [1])
+ APR_SETIFNULL(apr_procattr_user_set_requires_password, [1])
+ ;;
+ *mingwce)
+ APR_SETIFNULL(apr_has_xthread_files, [0])
+ APR_SETIFNULL(apr_has_user, [0])
+ APR_SETIFNULL(apr_procattr_user_set_requires_password, [0])
+ ;;
+ esac
+ ;;
esac
fi
diff --git a/build/config.guess b/build/config.guess
index 396482d6c..115f944a6 100755
--- a/build/config.guess
+++ b/build/config.guess
@@ -1,10 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-# Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+# Free Software Foundation, Inc.
-timestamp='2006-07-02'
+timestamp='2010-04-03'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -27,16 +27,16 @@ timestamp='2006-07-02'
# the same distribution terms that you use for the rest of that program.
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
+# Originally written by Per Bothner. Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a ChangeLog
+# entry.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
# exits with 0. Otherwise, it exits with 1.
#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -56,8 +56,9 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -91,7 +92,7 @@ if test $# != 0; then
exit 1
fi
-trap 'exit 1' 1 2 15
+trap 'exit 1' HUP INT TERM
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires
@@ -105,7 +106,7 @@ trap 'exit 1' 1 2 15
set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
@@ -161,6 +162,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
@@ -169,7 +171,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep __ELF__ >/dev/null
+ | grep -q __ELF__
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
@@ -323,14 +325,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
- i86pc:SunOS:5.*:*)
- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
@@ -531,7 +552,7 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit ;;
- *:AIX:*:[45])
+ *:AIX:*:[456])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
@@ -639,7 +660,7 @@ EOF
# => hppa64-hp-hpux11.23
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
- grep __LP64__ >/dev/null
+ grep -q __LP64__
then
HP_ARCH="hppa2.0w"
else
@@ -780,7 +801,7 @@ EOF
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
- i*:MINGW*:*)
+ *:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:windows32*:*)
@@ -790,15 +811,24 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
- x86:Interix*:[3456]*)
- echo i586-pc-interix${UNAME_RELEASE}
- exit ;;
- EM64T:Interix*:[3456]*)
- echo x86_64-unknown-interix${UNAME_RELEASE}
- exit ;;
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -828,8 +858,29 @@ EOF
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
arm*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ fi
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -843,6 +894,17 @@ EOF
frv:Linux:*:*)
echo frv-unknown-linux-gnu
exit ;;
+ i*86:Linux:*:*)
+ LIBC=gnu
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
@@ -852,74 +914,33 @@ EOF
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
- mips:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips
- #undef mipsel
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mipsel
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips
- #else
- CPU=
- #endif
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- mips64:Linux:*:*)
+ mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
- #undef mips64
- #undef mips64el
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mips64el
+ CPU=${UNAME_MACHINE}el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips64
+ CPU=${UNAME_MACHINE}
#else
CPU=
#endif
#endif
EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
echo or32-unknown-linux-gnu
exit ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-gnu
exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- exit ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
@@ -929,8 +950,11 @@ EOF
*) echo hppa-unknown-linux-gnu ;;
esac
exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
@@ -950,69 +974,9 @@ EOF
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
exit ;;
- i*86:Linux:*:*)
- # The BFD linker knows what the default object file format is, so
- # first see if it will tell us. cd to the root directory to prevent
- # problems with other programs or directories called `ld' in the path.
- # Set LC_ALL=C to ensure ld outputs messages in English.
- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
- | sed -ne '/supported targets:/!d
- s/[ ][ ]*/ /g
- s/.*supported targets: *//
- s/ .*//
- p'`
- case "$ld_supported_targets" in
- elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
- ;;
- a.out-i386-linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit ;;
- coff-i386)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit ;;
- "")
- # Either a pre-BFD a.out linker (linux-gnuoldld) or
- # one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
- exit ;;
- esac
- # Determine whether the default compiler is a.out or elf
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #ifdef __ELF__
- # ifdef __GLIBC__
- # if __GLIBC__ >= 2
- LIBC=gnu
- # else
- LIBC=gnulibc1
- # endif
- # else
- LIBC=gnulibc1
- # endif
- #else
- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
- LIBC=gnu
- #else
- LIBC=gnuaout
- #endif
- #endif
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^LIBC/{
- s: ::g
- p
- }'`"
- test x"${LIBC}" != x && {
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit
- }
- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
- ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
@@ -1041,7 +1005,7 @@ EOF
i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
exit ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit ;;
i*86:*DOS:*:*)
@@ -1085,8 +1049,11 @@ EOF
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i386.
- echo i386-pc-msdosdjgpp
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
@@ -1124,6 +1091,16 @@ EOF
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit ;;
@@ -1136,7 +1113,7 @@ EOF
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
exit ;;
SM[BE]S:UNIX_SV:*:*)
@@ -1199,6 +1176,9 @@ EOF
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@@ -1208,6 +1188,15 @@ EOF
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
@@ -1217,6 +1206,16 @@ EOF
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
+ i386)
+ eval $set_cc_for_build
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ UNAME_PROCESSOR="x86_64"
+ fi
+ fi ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@@ -1298,6 +1297,9 @@ EOF
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1458,9 +1460,9 @@ This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
If the version you run ($0) is already up to date, please
send the following data and any information you think might be
diff --git a/build/config.sub b/build/config.sub
index 387c18d1a..204218c07 100755
--- a/build/config.sub
+++ b/build/config.sub
@@ -1,10 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
-# Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+# Free Software Foundation, Inc.
-timestamp='2006-07-02'
+timestamp='2010-05-21'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -32,13 +32,16 @@ timestamp='2006-07-02'
# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
+# diff and a properly formatted GNU ChangeLog entry.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
@@ -72,8 +75,9 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -120,8 +124,10 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -148,10 +154,13 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray)
+ -apple | -axis | -knuth | -cray | -microblaze)
os=
basic_machine=$1
;;
+ -bluegene*)
+ os=-cnk
+ ;;
-sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
@@ -245,17 +254,20 @@ case $basic_machine in
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
- | fr30 | frv \
+ | fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
+ | lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore \
+ | maxq | mb | microblaze | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
- | mips64vr | mips64vrel \
+ | mips64octeon | mips64octeonel \
| mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
@@ -268,6 +280,7 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
+ | moxie \
| mt \
| msp430 \
| nios | nios2 \
@@ -276,19 +289,31 @@ case $basic_machine in
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu | strongarm \
- | tahoe | thumb | tic4x | tic80 | tron \
+ | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
| v850 | v850e \
| we32k \
- | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
- | z8k)
+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | z8k | z80)
basic_machine=$basic_machine-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12)
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | picochip)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
os=-none
@@ -319,23 +344,26 @@ case $basic_machine in
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
+ | lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
- | mips64vr-* | mips64vrel-* \
+ | mips64octeon-* | mips64octeonel-* \
| mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
@@ -356,21 +384,27 @@ case $basic_machine in
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
- | romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile-* | tilegx-* \
| tron-* \
+ | ubicom32-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
- | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
- | xstormy16-* | xtensa-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa*-* \
| ymp-* \
- | z8k-*)
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
@@ -434,6 +468,10 @@ case $basic_machine in
basic_machine=m68k-apollo
os=-bsd
;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
aux)
basic_machine=m68k-apple
os=-aux
@@ -442,10 +480,35 @@ case $basic_machine in
basic_machine=ns32k-sequent
os=-dynix
;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
c90)
basic_machine=c90-cray
os=-unicos
;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
convex-c1)
basic_machine=c1-convex
os=-bsd
@@ -474,8 +537,8 @@ case $basic_machine in
basic_machine=craynv-cray
os=-unicosmp
;;
- cr16c)
- basic_machine=cr16c-unknown
+ cr16)
+ basic_machine=cr16-unknown
os=-elf
;;
crds | unos)
@@ -513,6 +576,10 @@ case $basic_machine in
basic_machine=m88k-motorola
os=-sysv3
;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
djgpp)
basic_machine=i586-pc
os=-msdosdjgpp
@@ -667,6 +734,14 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
m88k-omron*)
basic_machine=m88k-omron
;;
@@ -678,10 +753,17 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
+ microblaze)
+ basic_machine=microblaze-xilinx
+ ;;
mingw32)
basic_machine=i386-pc
os=-mingw32
;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
miniframe)
basic_machine=m68000-convergent
;;
@@ -808,6 +890,14 @@ case $basic_machine in
basic_machine=i860-intel
os=-osf
;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
pbd)
basic_machine=sparc-tti
;;
@@ -909,6 +999,10 @@ case $basic_machine in
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
sei)
basic_machine=mips-sei
os=-seiux
@@ -920,6 +1014,9 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
sh64)
basic_machine=sh64-unknown
;;
@@ -997,17 +1094,14 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
- tic54x | c54x*)
- basic_machine=tic54x-unknown
- os=-coff
- ;;
- tic55x | c55x*)
- basic_machine=tic55x-unknown
- os=-coff
+ # This must be matched before tile*.
+ tilegx*)
+ basic_machine=tilegx-unknown
+ os=-linux-gnu
;;
- tic6x | c6x*)
- basic_machine=tic6x-unknown
- os=-coff
+ tile*)
+ basic_machine=tile-unknown
+ os=-linux-gnu
;;
tx39)
basic_machine=mipstx39-unknown
@@ -1084,6 +1178,10 @@ case $basic_machine in
basic_machine=z8k-unknown
os=-sim
;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
none)
basic_machine=none-none
os=-none
@@ -1122,7 +1220,7 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
- sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
@@ -1172,6 +1270,9 @@ case $os in
# First match some system type aliases
# that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
+ -auroraux)
+ os=-auroraux
+ ;;
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
@@ -1192,10 +1293,11 @@ case $os in
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* \
+ | -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@@ -1204,9 +1306,10 @@ case $os in
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -mingw32* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1214,7 +1317,7 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1344,6 +1447,11 @@ case $os in
-zvmoe)
os=-zvmoe
;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -nacl*)
+ ;;
-none)
;;
*)
@@ -1366,6 +1474,9 @@ else
# system, and we'll never get to this point.
case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
spu-*)
os=-elf
;;
@@ -1381,6 +1492,15 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
+ ;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
@@ -1406,6 +1526,9 @@ case $basic_machine in
m68*-cisco)
os=-aout
;;
+ mep-*)
+ os=-elf
+ ;;
mips*-cisco)
os=-elf
;;
@@ -1535,7 +1658,7 @@ case $basic_machine in
-sunos*)
vendor=sun
;;
- -aix*)
+ -cnk*|-aix*)
vendor=ibm
;;
-beos*)
diff --git a/build/make_nw_export.awk b/build/make_nw_export.awk
index cf44e5b07..b3e948344 100644
--- a/build/make_nw_export.awk
+++ b/build/make_nw_export.awk
@@ -1,33 +1,39 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
# Based on apr's make_export.awk, which is
# based on Ryan Bloom's make_export.pl
+#
BEGIN {
- printf(" ("EXPPREFIX")\n")
+ add_symbol("apr_wait_for_io_or_timeout")
+}
+
+function add_symbol(sym_name) {
+ sub(" ", "", sym_name)
+ exports[++idx] = sym_name
}
# List of functions that we don't support, yet??
#/apr_##name##_set_inherit/{next}
#/apr_##name##_unset_inherit/{next}
-
-function add_symbol (sym_name) {
- if (count) {
- found++
- }
- gsub (/ /, "", sym_name)
- line = line sym_name ",\n"
-
- if (count == 0) {
- printf(" %s", line)
- line = ""
- }
-}
-
/^[ \t]*AP[RUI]?_DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ {
sub("[ \t]*AP[RUI]?_DECLARE[^(]*[(][^)]*[)][ \t]*", "")
sub("[(].*", "")
sub("([^ ]* (^([ \t]*[(])))+", "")
-
add_symbol($0)
next
}
@@ -37,7 +43,6 @@ function add_symbol (sym_name) {
symbol = args[2]
sub("^[ \t]+", "", symbol)
sub("[ \t]+$", "", symbol)
-
add_symbol("ap_hook_" symbol)
add_symbol("ap_hook_get_" symbol)
add_symbol("ap_run_" symbol)
@@ -65,15 +70,37 @@ function add_symbol (sym_name) {
next
}
-/^[ \t]*AP[RUI]?_DECLARE_DATA .*;$/ {
- varname = $NF;
- gsub( /[*;]/, "", varname);
- gsub( /\[.*\]/, "", varname);
- add_symbol(varname);
+/^[ \t]*AP[RUI]?_DECLARE_DATA .*;/ {
+ gsub(/[*;\n\r]/, "", $NF)
+ gsub(/\[.*\]/, "", $NF)
+ add_symbol($NF)
}
END {
- add_symbol("apr_wait_for_io_or_timeout");
-# printf(" %s", line)
+ printf("Added %d symbols to export list.\n", idx) > "/dev/stderr"
+ # sort symbols with shell sort
+ increment = int(idx / 2)
+ while (increment > 0) {
+ for (i = increment+1; i <= idx; i++) {
+ j = i
+ temp = exports[i]
+ while ((j >= increment+1) && (exports[j-increment] > temp)) {
+ exports[j] = exports[j-increment]
+ j -= increment
+ }
+ exports[j] = temp
+ }
+ if (increment == 2)
+ increment = 1
+ else
+ increment = int(increment*5/11)
+ }
+ # print the array
+ printf(" (%s)\n", EXPPREFIX)
+ while (x < idx - 1) {
+ printf(" %s,\n", exports[++x])
+ }
+ printf(" %s\n", exports[++x])
}
+
diff --git a/configure.in b/configure.in
index 76d1bb5fd..0b867ae22 100644
--- a/configure.in
+++ b/configure.in
@@ -482,17 +482,14 @@ case $host in
;;
*mingw*)
OSDIR="win32"
- ac_cv_file__dev_zero="no"
- ac_cv_func_setpgrp_void="no"
- apr_cv_tcp_nodelay_with_cork="no"
enable_threads="system_threads"
- eolstr="\\n"
+ eolstr="\\r\\n"
+ file_as_socket=0
proc_mutex_is_global=1
OBJECTS_PLATFORM='$(OBJECTS_win32)'
;;
*cygwin*)
OSDIR="unix"
- APR_ADDTO(CPPFLAGS,-DCYGWIN)
enable_threads="no"
eolstr="\\n"
;;
@@ -1343,6 +1340,7 @@ AC_SUBST(timeh)
AC_SUBST(unistdh)
AC_SUBST(signalh)
AC_SUBST(sys_waith)
+AC_SUBST(processh)
AC_SUBST(pthreadh)
AC_SUBST(semaphoreh)
AC_SUBST(windowsh)
@@ -1656,11 +1654,20 @@ AC_MSG_RESULT($off_t_value)
# releases did. To be correct, apr_ino_t should have been made an
# ino64_t as apr_off_t is off64_t, but this can't be done now without
# breaking ABI.
-ino_t_value=ino_t
-if test "$ac_cv_sizeof_long" = "4"; then
- APR_CHECK_TYPES_COMPATIBLE(ino_t, unsigned long,
- ino_t_value="unsigned long")
-fi
+
+# Per OS tuning...
+case $host in
+*mingw*)
+ ino_t_value=apr_int64_t
+ ;;
+*)
+ ino_t_value=ino_t
+ if test "$ac_cv_sizeof_long" = "4"; then
+ APR_CHECK_TYPES_COMPATIBLE(ino_t, unsigned long,
+ ino_t_value="unsigned long")
+ fi
+ ;;
+esac
AC_MSG_NOTICE([using $ino_t_value for ino_t])
# Checks for endianness
@@ -2486,13 +2493,23 @@ dnl Check for langinfo support
AC_CHECK_HEADERS(langinfo.h)
AC_CHECK_FUNCS(nl_langinfo)
+dnl ------------------------------ Defaults for some platform nuances
+
dnl Do we have a Win32-centric Unicode FS?
+APR_SETIFNULL(have_unicode_fs, [0])
+AC_SUBST(have_unicode_fs)
-if test -z "$have_unicode_fs"; then
- have_unicode_fs="0"
-fi
+APR_SETIFNULL(apr_has_xthread_files, [0])
+AC_SUBST(apr_has_xthread_files)
-AC_SUBST(have_unicode_fs)
+APR_SETIFNULL(apr_procattr_user_set_requires_password, [0])
+AC_SUBST(apr_procattr_user_set_requires_password)
+
+APR_SETIFNULL(apr_thread_func, [])
+AC_SUBST(apr_thread_func)
+
+APR_SETIFNULL(apr_has_user, [1])
+AC_SUBST(apr_has_user)
dnl ----------------------------- Finalize the variables
diff --git a/file_io/os2/readwrite.c b/file_io/os2/readwrite.c
index d680dcc1c..5c2442c2e 100644
--- a/file_io/os2/readwrite.c
+++ b/file_io/os2/readwrite.c
@@ -140,7 +140,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
apr_thread_mutex_lock(thefile->mutex);
if ( thefile->direction == 0 ) {
- // Position file pointer for writing at the offset we are logically reading from
+ /* Position file pointer for writing at the offset we are logically reading from */
ULONG offset = thefile->filePtr - thefile->dataRead + thefile->bufpos;
if (offset != thefile->filePtr)
DosSetFilePtr(thefile->filedes, offset, FILE_BEGIN, &thefile->filePtr );
@@ -149,7 +149,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
}
while (rc == 0 && size > 0) {
- if (thefile->bufpos == thefile->bufsize) // write buffer is full
+ if (thefile->bufpos == thefile->bufsize) /* write buffer is full */
/* XXX bug; - rc is double-transformed os->apr below */
rc = apr_file_flush(thefile);
diff --git a/file_io/win32/pipe.c b/file_io/win32/pipe.c
index ee3a07fa1..9b566684d 100644
--- a/file_io/win32/pipe.c
+++ b/file_io/win32/pipe.c
@@ -29,6 +29,9 @@
#if APR_HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
+#if APR_HAVE_PROCESS_H
+#include <process.h> /* for getpid() on Win32 */
+#endif
#include "apr_arch_misc.h"
APR_DECLARE(apr_status_t) apr_file_pipe_timeout_set(apr_file_t *thepipe,
@@ -43,8 +46,7 @@ APR_DECLARE(apr_status_t) apr_file_pipe_timeout_set(apr_file_t *thepipe,
return APR_ENOTIMPL;
}
if (timeout && !(thepipe->pOverlapped)) {
- /* Cannot be nonzero if a pipe was opened blocking
- */
+ /* Cannot be nonzero if a pipe was opened blocking */
return APR_EINVAL;
}
thepipe->timeout = timeout;
@@ -82,7 +84,7 @@ APR_DECLARE(apr_status_t) apr_file_pipe_create_ex(apr_file_t **in,
char name[50];
sa.nLength = sizeof(sa);
-
+
#if APR_HAS_UNICODE_FS
IF_WIN_OS_IS_UNICODE
sa.bInheritHandle = FALSE;
@@ -139,10 +141,10 @@ APR_DECLARE(apr_status_t) apr_file_pipe_create_ex(apr_file_t **in,
(*in)->filehand = CreateNamedPipe(name,
dwOpenMode,
dwPipeMode,
- 1, //nMaxInstances,
- 0, //nOutBufferSize,
- 65536, //nInBufferSize,
- 1, //nDefaultTimeOut,
+ 1, /* nMaxInstances, */
+ 0, /* nOutBufferSize, */
+ 65536, /* nInBufferSize, */
+ 1, /* nDefaultTimeOut, */
&sa);
/* Create the write end of the pipe */
@@ -154,14 +156,14 @@ APR_DECLARE(apr_status_t) apr_file_pipe_create_ex(apr_file_t **in,
(*out)->pOverlapped->hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
(*out)->timeout = 0;
}
-
+
(*out)->filehand = CreateFile(name,
- GENERIC_WRITE, // access mode
- 0, // share mode
- &sa, // Security attributes
- OPEN_EXISTING, // dwCreationDisposition
- dwOpenMode, // Pipe attributes
- NULL); // handle to template file
+ GENERIC_WRITE, /* access mode */
+ 0, /* share mode */
+ &sa, /* Security attributes */
+ OPEN_EXISTING, /* dwCreationDisposition */
+ dwOpenMode, /* Pipe attributes */
+ NULL); /* handle to template file */
}
else {
/* Pipes on Win9* are blocking. Live with it. */
@@ -225,3 +227,4 @@ APR_DECLARE(apr_status_t) apr_os_pipe_put(apr_file_t **file,
{
return apr_os_pipe_put_ex(file, thefile, 0, pool);
}
+
diff --git a/file_io/win32/readwrite.c b/file_io/win32/readwrite.c
index 35d3739a1..d0428d23d 100644
--- a/file_io/win32/readwrite.c
+++ b/file_io/win32/readwrite.c
@@ -263,7 +263,7 @@ APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, a
apr_thread_mutex_lock(thefile->mutex);
if (thefile->direction == 0) {
- // Position file pointer for writing at the offset we are logically reading from
+ /* Position file pointer for writing at the offset we are logically reading from */
apr_off_t offset = thefile->filePtr - thefile->dataRead + thefile->bufpos;
DWORD offlo = (DWORD)offset;
DWORD offhi = (DWORD)(offset >> 32);
diff --git a/include/apr.h.in b/include/apr.h.in
index 9f1fb6f99..35fff75c4 100644
--- a/include/apr.h.in
+++ b/include/apr.h.in
@@ -63,10 +63,10 @@
#define __attribute__(__x)
#endif
#define APR_INLINE
-#define APR_HAS_INLINE 0
+#define APR_HAS_INLINE 0
#else
#define APR_INLINE __inline__
-#define APR_HAS_INLINE 1
+#define APR_HAS_INLINE 1
#endif
#define APR_HAVE_ARPA_INET_H @arpa_ineth@
@@ -83,6 +83,7 @@
#define APR_HAVE_NETINET_SCTP_H @netinet_sctph@
#define APR_HAVE_NETINET_SCTP_UIO_H @netinet_sctp_uioh@
#define APR_HAVE_NETINET_TCP_H @netinet_tcph@
+#define APR_HAVE_PROCESS_H @processh@
#define APR_HAVE_PTHREAD_H @pthreadh@
#define APR_HAVE_SEMAPHORE_H @semaphoreh@
#define APR_HAVE_SIGNAL_H @signalh@
@@ -116,8 +117,39 @@
*/
#if APR_HAVE_WINDOWS_H
-#include <windows.h>
+/* If windows.h was already included, our preferences don't matter.
+ * If not, include a restricted set of windows headers to our tastes.
+ */
+#ifndef _WINDOWS_
+
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x0501
+#endif
+
+#ifndef NOUSER
+#define NOUSER
+#endif
+#ifndef NOMCX
+#define NOMCX
#endif
+#ifndef NOIME
+#define NOIME
+#endif
+
+/* Impossible to include winsock2.h after winsock.h, while windows.h
+ * attempts to load winsock. Setting _WINSOCKAPI_ will dodge this.
+ */
+#if APR_HAVE_WINSOCK2_H
+#define _WINSOCKAPI_
+#endif
+
+#include <windows.h>
+#endif /* ndef _WINDOWS_ */
+#endif /* APR_HAVE_WINDOWS_H */
#if APR_HAVE_WINSOCK2_H
#include <winsock2.h>
@@ -238,12 +270,12 @@ extern "C" {
#define APR_HAS_SO_ACCEPTFILTER @acceptfilter@
#define APR_HAS_UNICODE_FS @have_unicode_fs@
#define APR_HAS_PROC_INVOKED @have_proc_invoked@
-#define APR_HAS_USER 1
+#define APR_HAS_USER @apr_has_user@
#define APR_HAS_LARGE_FILES @aprlfs@
-#define APR_HAS_XTHREAD_FILES 0
+#define APR_HAS_XTHREAD_FILES @apr_has_xthread_files@
#define APR_HAS_OS_UUID @osuuid@
-#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0
+#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD @apr_procattr_user_set_requires_password@
/* APR sets APR_FILES_AS_SOCKETS to 1 on systems where it is possible
* to poll on files/pipes.
@@ -380,7 +412,7 @@ typedef apr_uint32_t apr_uintptr_t;
*
* </PRE>
*/
-#define APR_THREAD_FUNC
+#define APR_THREAD_FUNC @apr_thread_func@
/**
* The public APR functions are declared with APR_DECLARE(), so they may
diff --git a/include/apr.hnw b/include/apr.hnw
index 2b2d091e9..d0c77e00e 100644
--- a/include/apr.hnw
+++ b/include/apr.hnw
@@ -25,19 +25,20 @@
* And please, make an effort to stub apr.hw and apr.h.in in the process.
*
* This is the NetWare specific version of apr.h. It is copied from
- * apr.hnw at the start of a NetWare build by prebuildNW.bat.
+ * apr.hnw at the start of a NetWare build by the ./build/NWGNmakefile.
*/
/**
* @file apr.h
* @brief APR Platform Definitions
* @remark This is a generated header generated from include/apr.h.in by
- * ./configure, or copied from include/apr.hw or include/apr.hnw
+ * ./configure, or copied from include/apr.hw or include/apr.hnw
* for Win32 or Netware by those build environments, respectively.
*/
#if defined(NETWARE) || defined(DOXYGEN)
+#undef FD_SETSIZE
#define FD_SETSIZE 1024
#include <sys/types.h>
@@ -48,21 +49,22 @@
#include <stdlib.h>
#include <string.h>
#include <limits.h>
+#include <netware.h>
#include <nks/thread.h>
#include <nks/synch.h>
#include <nks/time.h>
#include <signal.h>
#ifdef USE_WINSOCK
#include <novsock2.h>
+#ifdef NW_BUILD_IPV6
+#include <novtcpip.h>
+#endif
#else
#include <sys/socket.h>
+#include <sys/select.h>
#endif
#include <sys/types.h>
-#ifdef NW_BUILD_IPV6
-#include <novtcpip.h>
-#endif
-
#define _POSIX_THREAD_SAFE_FUNCTIONS 1
#define READDIR_IS_THREAD_SAFE 1
@@ -74,161 +76,161 @@ extern "C" {
/**
* @defgroup apr_platform Platform Definitions
- * @ingroup APR
+ * @ingroup APR
* @{
*/
-#define APR_INLINE
-#define APR_HAS_INLINE 0
+#define APR_INLINE
+#define APR_HAS_INLINE 0
#ifndef __attribute__
#define __attribute__(__x)
#endif
#define ENUM_BITFIELD(e,n,w) signed int n : w
-#define APR_HAVE_CONIO_H 0
-#define APR_HAVE_CRYPT_H 0
-#define APR_HAVE_CTYPE_H 1
-#define APR_HAVE_DIRENT_H 1
-#define APR_HAVE_ERRNO_H 1
-#define APR_HAVE_FCNTL_H 1
-#define APR_HAVE_IO_H 0
-#define APR_HAVE_LIMITS_H 1
+#define APR_HAVE_CONIO_H 0
+#define APR_HAVE_CRYPT_H 0
+#define APR_HAVE_CTYPE_H 1
+#define APR_HAVE_DIRENT_H 1
+#define APR_HAVE_ERRNO_H 1
+#define APR_HAVE_FCNTL_H 1
+#define APR_HAVE_IO_H 0
+#define APR_HAVE_LIMITS_H 1
#ifdef USE_WINSOCK
-#define APR_HAVE_ARPA_INET_H 0
-#define APR_HAVE_NETDB_H 0
-#define APR_HAVE_NETINET_IN_H 0
+#define APR_HAVE_ARPA_INET_H 0
+#define APR_HAVE_NETDB_H 0
+#define APR_HAVE_NETINET_IN_H 0
#else
-#define APR_HAVE_ARPA_INET_H 1
-#define APR_HAVE_NETDB_H 1
-#define APR_HAVE_NETINET_IN_H 1
+#define APR_HAVE_ARPA_INET_H 1
+#define APR_HAVE_NETDB_H 1
+#define APR_HAVE_NETINET_IN_H 1
#endif
-#define APR_HAVE_NETINET_SCTP_H 0
-#define APR_HAVE_NETINET_SCTP_UIO_H 0
-#define APR_HAVE_NETINET_TCP_H 0
-#define APR_HAVE_PTHREAD_H 0
-#define APR_HAVE_SIGNAL_H 1
-#define APR_HAVE_STDARG_H 1
-#define APR_HAVE_STDINT_H 0
-#define APR_HAVE_STDIO_H 1
-#define APR_HAVE_STDLIB_H 1
-#define APR_HAVE_STRING_H 1
-#define APR_HAVE_STRINGS_H 0
-#define APR_HAVE_STRTOLL 1
-#define APR_HAVE_SYS_SENDFILE_H 0
-#define APR_HAVE_SYS_SYSLIMITS_H 0
+#define APR_HAVE_NETINET_SCTP_H 0
+#define APR_HAVE_NETINET_SCTP_UIO_H 0
+#define APR_HAVE_NETINET_TCP_H 0
+#define APR_HAVE_PTHREAD_H 0
+#define APR_HAVE_SIGNAL_H 1
+#define APR_HAVE_STDARG_H 1
+#define APR_HAVE_STDINT_H 0
+#define APR_HAVE_STDIO_H 1
+#define APR_HAVE_STDLIB_H 1
+#define APR_HAVE_STRING_H 1
+#define APR_HAVE_STRINGS_H 0
+#define APR_HAVE_STRTOLL 1
+#define APR_HAVE_SYS_SENDFILE_H 0
+#define APR_HAVE_SYS_SYSLIMITS_H 0
#ifdef USE_WINSOCK
-#define APR_HAVE_SYS_SOCKET_H 0
-#define APR_HAVE_SYS_SOCKIO_H 0
-#define APR_HAVE_SYS_TIME_H 0
+#define APR_HAVE_SYS_SOCKET_H 0
+#define APR_HAVE_SYS_SOCKIO_H 0
+#define APR_HAVE_SYS_UN_H 0
#else
-#define APR_HAVE_SYS_SOCKET_H 1
-#define APR_HAVE_SYS_SOCKIO_H 1
-#define APR_HAVE_SYS_TIME_H 1
+#define APR_HAVE_SYS_SOCKET_H 1
+#define APR_HAVE_SYS_SOCKIO_H 1
+#define APR_HAVE_SYS_UN_H 1
#endif
-#define APR_HAVE_SYS_SIGNAL_H 1
-#define APR_HAVE_SYS_TYPES_H 1
-#define APR_HAVE_SYS_UIO_H 1
-#define APR_HAVE_SYS_UN_H 1
-#define APR_HAVE_SYS_WAIT_H 1
-#define APR_HAVE_TIME_H 1
-#define APR_HAVE_UNISTD_H 1
-
-#define APR_HAVE_SHMEM_MMAP_TMP 0
-#define APR_HAVE_SHMEM_MMAP_SHM 0
-#define APR_HAVE_SHMEM_MMAP_ZERO 0
-#define APR_HAVE_SHMEM_SHMGET_ANON 0
-#define APR_HAVE_SHMEM_SHMGET 0
-#define APR_HAVE_SHMEM_MMAP_ANON 0
-#define APR_HAVE_SHMEM_BEOS 0
-
-#define APR_USE_SHMEM_MMAP_TMP 0
-#define APR_USE_SHMEM_MMAP_SHM 0
-#define APR_USE_SHMEM_MMAP_ZERO 0
-#define APR_USE_SHMEM_SHMGET_ANON 0
-#define APR_USE_SHMEM_SHMGET 0
-#define APR_USE_SHMEM_MMAP_ANON 0
-#define APR_USE_SHMEM_BEOS 0
-
-#define APR_USE_FLOCK_SERIALIZE 0
-#define APR_USE_SYSVSEM_SERIALIZE 0
-#define APR_USE_FCNTL_SERIALIZE 0
-#define APR_USE_PROC_PTHREAD_SERIALIZE 0
-#define APR_USE_PTHREAD_SERIALIZE 0
-
-#define APR_HAS_FLOCK_SERIALIZE 0
-#define APR_HAS_SYSVSEM_SERIALIZE 0
-#define APR_HAS_FCNTL_SERIALIZE 0
-#define APR_HAS_PROC_PTHREAD_SERIALIZE 0
-#define APR_HAS_RWLOCK_SERIALIZE 0
-
-#define APR_HAS_LOCK_CREATE_NP 0
-
-#define APR_PROCESS_LOCK_IS_GLOBAL 1
-
-#define APR_FILE_BASED_SHM 0
-
-#define APR_HAVE_CORKABLE_TCP 0
-#define APR_HAVE_GETRLIMIT 0
-#define APR_HAVE_ICONV 0
-#define APR_HAVE_IN_ADDR 1
-#define APR_HAVE_INET_ADDR 1
-#define APR_HAVE_INET_NETWORK 0
+#define APR_HAVE_SYS_SIGNAL_H 1
+#define APR_HAVE_SYS_TIME_H 1
+#define APR_HAVE_SYS_TYPES_H 1
+#define APR_HAVE_SYS_UIO_H 1
+#define APR_HAVE_SYS_WAIT_H 1
+#define APR_HAVE_TIME_H 1
+#define APR_HAVE_UNISTD_H 1
+
+#define APR_HAVE_SHMEM_MMAP_TMP 0
+#define APR_HAVE_SHMEM_MMAP_SHM 0
+#define APR_HAVE_SHMEM_MMAP_ZERO 0
+#define APR_HAVE_SHMEM_SHMGET_ANON 0
+#define APR_HAVE_SHMEM_SHMGET 0
+#define APR_HAVE_SHMEM_MMAP_ANON 0
+#define APR_HAVE_SHMEM_BEOS 0
+
+#define APR_USE_SHMEM_MMAP_TMP 0
+#define APR_USE_SHMEM_MMAP_SHM 0
+#define APR_USE_SHMEM_MMAP_ZERO 0
+#define APR_USE_SHMEM_SHMGET_ANON 0
+#define APR_USE_SHMEM_SHMGET 0
+#define APR_USE_SHMEM_MMAP_ANON 0
+#define APR_USE_SHMEM_BEOS 0
+
+#define APR_USE_FLOCK_SERIALIZE 0
+#define APR_USE_SYSVSEM_SERIALIZE 0
+#define APR_USE_FCNTL_SERIALIZE 0
+#define APR_USE_PROC_PTHREAD_SERIALIZE 0
+#define APR_USE_PTHREAD_SERIALIZE 0
+
+#define APR_HAS_FLOCK_SERIALIZE 0
+#define APR_HAS_SYSVSEM_SERIALIZE 0
+#define APR_HAS_FCNTL_SERIALIZE 0
+#define APR_HAS_PROC_PTHREAD_SERIALIZE 0
+#define APR_HAS_RWLOCK_SERIALIZE 0
+
+#define APR_HAS_LOCK_CREATE_NP 0
+
+#define APR_PROCESS_LOCK_IS_GLOBAL 1
+
+#define APR_FILE_BASED_SHM 0
+
+#define APR_HAVE_CORKABLE_TCP 0
+#define APR_HAVE_GETRLIMIT 0
+#define APR_HAVE_ICONV 0
+#define APR_HAVE_IN_ADDR 1
+#define APR_HAVE_INET_ADDR 1
+#define APR_HAVE_INET_NETWORK 0
#ifdef NW_BUILD_IPV6
-#define APR_HAVE_IPV6 1
+#define APR_HAVE_IPV6 1
#else
-#define APR_HAVE_IPV6 0
+#define APR_HAVE_IPV6 0
#endif
-#define APR_HAVE_MEMCHR 1
-#define APR_HAVE_MEMMOVE 1
-#define APR_HAVE_SETRLIMIT 0
-#define APR_HAVE_SIGACTION 0
-#define APR_HAVE_SIGSUSPEND 0
-#define APR_HAVE_SIGWAIT 0
-#define APR_HAVE_STRCASECMP 1
-#define APR_HAVE_STRDUP 1
-#define APR_HAVE_STRICMP 1
-#define APR_HAVE_STRNCASECMP 1
-#define APR_HAVE_STRNICMP 1
-#define APR_HAVE_STRSTR 1
-#define APR_HAVE_STRUCT_RLIMIT 0
-#define APR_HAVE_UNION_SEMUN 0
-#define APR_HAVE_SCTP 0
-#define APR_HAVE_IOVEC 1
+#define APR_HAVE_MEMCHR 1
+#define APR_HAVE_MEMMOVE 1
+#define APR_HAVE_SETRLIMIT 0
+#define APR_HAVE_SIGACTION 0
+#define APR_HAVE_SIGSUSPEND 0
+#define APR_HAVE_SIGWAIT 0
+#define APR_HAVE_STRCASECMP 1
+#define APR_HAVE_STRDUP 1
+#define APR_HAVE_STRICMP 1
+#define APR_HAVE_STRNCASECMP 1
+#define APR_HAVE_STRNICMP 1
+#define APR_HAVE_STRSTR 1
+#define APR_HAVE_STRUCT_RLIMIT 0
+#define APR_HAVE_UNION_SEMUN 0
+#define APR_HAVE_SCTP 0
+#define APR_HAVE_IOVEC 1
/* APR Feature Macros */
-#define APR_HAS_SHARED_MEMORY 0
-#define APR_HAS_THREADS 1
-#define APR_HAS_SENDFILE 0
-#define APR_HAS_MMAP 0
-#define APR_HAS_FORK 0
-#define APR_HAS_RANDOM 1
-#define APR_HAS_OTHER_CHILD 0
-#define APR_HAS_DSO 1
-#define APR_HAS_SO_ACCEPTFILTER 0
-#define APR_HAS_UNICODE_FS 0
-#define APR_HAS_PROC_INVOKED 0
-#define APR_HAS_USER 1
-#define APR_HAS_LARGE_FILES 1
-#define APR_HAS_XTHREAD_FILES 0
-#define APR_HAS_OS_UUID 0
+#define APR_HAS_SHARED_MEMORY 0
+#define APR_HAS_THREADS 1
+#define APR_HAS_SENDFILE 0
+#define APR_HAS_MMAP 0
+#define APR_HAS_FORK 0
+#define APR_HAS_RANDOM 1
+#define APR_HAS_OTHER_CHILD 0
+#define APR_HAS_DSO 1
+#define APR_HAS_SO_ACCEPTFILTER 0
+#define APR_HAS_UNICODE_FS 0
+#define APR_HAS_PROC_INVOKED 0
+#define APR_HAS_USER 1
+#define APR_HAS_LARGE_FILES 1
+#define APR_HAS_XTHREAD_FILES 0
+#define APR_HAS_OS_UUID 0
#define APR_PROCATTR_USER_SET_REQUIRES_PASSWORD 0
/* Netware can poll on files/pipes.
*/
-#define APR_FILES_AS_SOCKETS 1
+#define APR_FILES_AS_SOCKETS 1
/* This macro indicates whether or not EBCDIC is the native character set.
*/
-#define APR_CHARSET_EBCDIC 0
+#define APR_CHARSET_EBCDIC 0
/* Is the TCP_NODELAY socket option inherited from listening sockets?
*/
-#define APR_TCP_NODELAY_INHERITED 1
+#define APR_TCP_NODELAY_INHERITED 1
/* Is the O_NONBLOCK flag inherited from listening sockets?
*/
-#define APR_O_NONBLOCK_INHERITED 1
+#define APR_O_NONBLOCK_INHERITED 1
/* Typedefs that APR needs. */
@@ -259,7 +261,7 @@ typedef apr_uint64_t apr_ino_t;
/* Are we big endian? */
/* XXX: Fatal assumption on Alpha platforms */
-#define APR_IS_BIGENDIAN 0
+#define APR_IS_BIGENDIAN 0
#ifdef UNKNOWN_NETWARE_64BIT_FLAG_NEEDED
#define APR_SIZEOF_VOIDP 8
@@ -349,8 +351,8 @@ typedef apr_uint32_t apr_uintptr_t;
#define APR_END_DECLS
#endif
-/**
- * Thread callbacks from APR functions must be declared with APR_THREAD_FUNC,
+/**
+ * Thread callbacks from APR functions must be declared with APR_THREAD_FUNC,
* so that they follow the platform's calling convention.
* @example
*/
@@ -360,7 +362,7 @@ typedef apr_uint32_t apr_uintptr_t;
/**
* The public APR functions are declared with APR_DECLARE(), so they may
- * use the most appropriate calling convention. Public APR functions with
+ * use the most appropriate calling convention. Public APR functions with
* variable arguments must use APR_DECLARE_NONSTD().
*
* @remark Both the declaration and implementations must use the same macro.
@@ -368,20 +370,20 @@ typedef apr_uint32_t apr_uintptr_t;
*/
/** APR_DECLARE(rettype) apr_func(args)
* @see APR_DECLARE_NONSTD @see APR_DECLARE_DATA
- * @remark Note that when APR compiles the library itself, it passes the
- * symbol -DAPR_DECLARE_EXPORT to the compiler on some platforms (e.g. Win32)
+ * @remark Note that when APR compiles the library itself, it passes the
+ * symbol -DAPR_DECLARE_EXPORT to the compiler on some platforms (e.g. Win32)
* to export public symbols from the dynamic library build.\n
* The user must define the APR_DECLARE_STATIC when compiling to target
- * the static APR library on some platforms (e.g. Win32.) The public symbols
+ * the static APR library on some platforms (e.g. Win32.) The public symbols
* are neither exported nor imported when APR_DECLARE_STATIC is defined.\n
* By default, compiling an application and including the APR public
* headers, without defining APR_DECLARE_STATIC, will prepare the code to be
* linked to the dynamic library.
*/
-#define APR_DECLARE(type) type
+#define APR_DECLARE(type) type
/**
- * The public APR functions using variable arguments are declared with
+ * The public APR functions using variable arguments are declared with
* APR_DECLARE_NONSTD(), as they must follow the C language calling convention.
* @see APR_DECLARE @see APR_DECLARE_DATA
* @remark Both the declaration and implementations must use the same macro.
@@ -392,7 +394,7 @@ typedef apr_uint32_t apr_uintptr_t;
#define APR_DECLARE_NONSTD(type) type
/**
- * The public APR variables are declared with AP_MODULE_DECLARE_DATA.
+ * The public APR variables are declared with APR_DECLARE_DATA.
* This assures the appropriate indirection is invoked at compile time.
* @see APR_DECLARE @see APR_DECLARE_NONSTD
* @remark Note that the declaration and implementations use different forms,
diff --git a/include/apr_portable.h b/include/apr_portable.h
index 7e52afc4f..c915fd037 100644
--- a/include/apr_portable.h
+++ b/include/apr_portable.h
@@ -471,6 +471,10 @@ APR_DECLARE(apr_status_t) apr_os_dso_handle_put(apr_dso_handle_t **dso,
APR_DECLARE(apr_status_t) apr_os_dso_handle_get(apr_os_dso_handle_t *dso,
apr_dso_handle_t *aprdso);
+/** @} */
+#endif /* APR_HAS_DSO */
+
+
#if APR_HAS_OS_UUID
/**
* Private: apr-util's apr_uuid module when supported by the platform
@@ -478,9 +482,6 @@ APR_DECLARE(apr_status_t) apr_os_dso_handle_get(apr_os_dso_handle_t *dso,
APR_DECLARE(apr_status_t) apr_os_uuid_get(unsigned char *uuid_data);
#endif
-/** @} */
-#endif /* APR_HAS_DSO */
-
/**
* Get the name of the system default character set.
diff --git a/include/apr_want.h b/include/apr_want.h
index 14fa9d0b4..422431864 100644
--- a/include/apr_want.h
+++ b/include/apr_want.h
@@ -89,19 +89,16 @@
#else
+#ifndef APR_IOVEC_DEFINED
+#define APR_IOVEC_DEFINED
struct iovec
{
char *iov_base;
size_t iov_len;
};
+#endif /* !APR_IOVEC_DEFINED */
-#endif
-
-/* apr_want is included at several layers; redefining APR_HAVE_IOVEC
- * now to ensure that our struct is not introduced several times.
- */
-#undef APR_HAVE_IOVEC
-#define APR_HAVE_IOVEC 1
+#endif /* APR_HAVE_IOVEC */
#undef APR_WANT_IOVEC
#endif
diff --git a/include/arch/netware/apr_arch_file_io.h b/include/arch/netware/apr_arch_file_io.h
index 0676eb278..8bd2a72c7 100644
--- a/include/arch/netware/apr_arch_file_io.h
+++ b/include/arch/netware/apr_arch_file_io.h
@@ -165,6 +165,9 @@ apr_status_t filepath_compare_drive(const char *path1, const char *path2, apr_po
apr_status_t apr_unix_file_cleanup(void *);
apr_status_t apr_unix_child_file_cleanup(void *);
+mode_t apr_unix_perms2mode(apr_fileperms_t perms);
+apr_fileperms_t apr_unix_mode2perms(mode_t mode);
+
apr_status_t apr_file_flush_locked(apr_file_t *thefile);
apr_status_t apr_file_info_get_locked(apr_finfo_t *finfo, apr_int32_t wanted,
apr_file_t *thefile);
diff --git a/include/arch/netware/apr_arch_pre_nw.h b/include/arch/netware/apr_arch_pre_nw.h
index 36d9942c1..7380e1182 100644
--- a/include/arch/netware/apr_arch_pre_nw.h
+++ b/include/arch/netware/apr_arch_pre_nw.h
@@ -1,16 +1,3 @@
-#ifndef __pre_nw__
-#define __pre_nw__
-
-#include <stdint.h>
-
-#ifndef __GNUC__
-#pragma precompile_target "precomp.mch"
-#endif
-
-#define NETWARE
-
-#define N_PLAT_NLM
-
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -26,6 +13,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#ifndef __pre_nw__
+#define __pre_nw__
+
+#include <stdint.h>
+
+#ifndef __GNUC__
+#pragma precompile_target "precomp.mch"
+#endif
+
+#define NETWARE
+
+#define N_PLAT_NLM
+
#define FAR
#define far
@@ -51,16 +51,6 @@
#define __int64 long long
#endif
-/* expat version */
-#define VERSION "expat_1.95.1"
-#define EXPAT_MAJOR_VERSION 1
-#define EXPAT_MINOR_VERSION 95
-#define EXPAT_EDIT 2
-
-#define XML_MAJOR_VERSION EXPAT_MAJOR_VERSION
-#define XML_MINOR_VERSION EXPAT_MINOR_VERSION
-#define XML_MICRO_VERSION EXPAT_EDIT
-
#endif
diff --git a/include/arch/netware/apr_arch_threadproc.h b/include/arch/netware/apr_arch_threadproc.h
index 713ed295a..2fee2c00e 100644
--- a/include/arch/netware/apr_arch_threadproc.h
+++ b/include/arch/netware/apr_arch_threadproc.h
@@ -68,11 +68,13 @@ struct apr_thread_once_t {
unsigned long value;
};
-//struct apr_proc_t {
-// apr_pool_t *pool;
-// pid_t pid;
-// apr_procattr_t *attr;
-//};
+/*
+struct apr_proc_t {
+ apr_pool_t *pool;
+ pid_t pid;
+ apr_procattr_t *attr;
+};
+*/
#endif /* ! THREAD_PROC_H */
diff --git a/include/arch/netware/apr_private.h b/include/arch/netware/apr_private.h
index a4e9b1e78..dbb3d2151 100644
--- a/include/arch/netware/apr_private.h
+++ b/include/arch/netware/apr_private.h
@@ -16,8 +16,8 @@
/*
* Note:
- * This is the windows specific autoconf-like config file
- * which unix would create at build time.
+ * This is the netware-specific autoconf-like config file
+ * which unix creates at ./configure time.
*/
#ifdef NETWARE
@@ -25,10 +25,16 @@
#ifndef APR_PRIVATE_H
#define APR_PRIVATE_H
-/* Include the public APR symbols, include our idea of the 'right'
- * subset of the Windows.h header. This saves us repetition.
+/* Pick up publicly advertised headers and symbols before the
+ * APR internal private headers and symbols
*/
-#include "apr.h"
+#include <apr.h>
+
+/* Pick up privately consumed headers */
+#include <ndkvers.h>
+
+/* Include alloca.h to get compiler-dependent defines */
+#include <alloca.h>
#include <sys/types.h>
#include <stddef.h>
@@ -72,16 +78,13 @@
#define HAVE_GETPASS_R 1
/*
- * check for older NDKs which have only the getpassword() function.
+ * Hack around older NDKs which have only the getpassword() function,
+ * a threadsafe, API-equivilant of getpass_r().
*/
-#include <ndkvers.h>
#if (CURRENT_NDK_THRESHOLD < 709060000)
-#define getpass_r getpassword
+#define getpass_r getpassword
#endif
-/* 64-bit integer conversion function */
-#define APR_INT64_STRFN strtoll
-
/*#define DSO_USE_DLFCN */
#ifdef NW_BUILD_IPV6
@@ -97,8 +100,8 @@
/* 6 is used for SIGTERM on netware */
/* 7 is used for SIGPOLL on netware */
+#if (CURRENT_NDK_THRESHOLD < 306030000)
#define SIGKILL 11
-#define SA_NOCLDSTOP 12
#define SIGALRM 13
#define SIGCHLD 14
#define SIGCONT 15
@@ -111,10 +114,10 @@
#define SIGTTOU 22
#define SIGUSR1 23
#define SIGUSR2 24
-
+#endif
+
#define SIGTRAP 25
#define SIGIOT 26
-#define SIGBUS 27
#define SIGSTKFLT 28
#define SIGURG 29
#define SIGXCPU 30
@@ -124,29 +127,23 @@
#define SIGWINCH 34
#define SIGIO 35
-#if 0
-#define __attribute__(__x)
-
-/* APR COMPATABILITY FUNCTIONS
- * This section should be used to define functions and
- * macros which are need to make Windows features look
- * like POSIX features.
- */
-typedef void (Sigfunc)(int);
+#if (CURRENT_NDK_THRESHOLD < 406230000)
+#undef SA_NOCLDSTOP
+#define SA_NOCLDSTOP 0x00000001
+#endif
+#ifndef SIGBUS
+#define SIGBUS SIGSEGV
#endif
-#define strcasecmp(s1, s2) stricmp(s1, s2)
-#define Sleep(t) delay(t)
-#define lstat(a,b) stat(a,b)
-#define _getch() getcharacter()
+#define _getch getcharacter
-#define SIZEOF_SHORT 2
-#define SIZEOF_INT 4
-#define SIZEOF_LONGLONG 8
-#define SIZEOF_CHAR 1
-#define SIZEOF_SSIZE_T SIZEOF_INT
+#define SIZEOF_SHORT 2
+#define SIZEOF_INT 4
+#define SIZEOF_LONGLONG 8
+#define SIZEOF_CHAR 1
+#define SIZEOF_SSIZE_T SIZEOF_INT
-void netware_pool_proc_cleanup ();
+void netware_pool_proc_cleanup();
/* NLM registration routines for managing which NLMs
are using the library. */
@@ -183,15 +180,21 @@ void* getStatCache();
and can be shared by the library. */
#undef malloc
#define malloc(x) library_malloc(gLibHandle,x)
+#ifndef __MWERKS__
+#define _alloca alloca
+#endif
+
+/* 64-bit integer conversion function */
+#define APR_INT64_STRFN strtoll
#if APR_HAS_LARGE_FILES
-#define APR_OFF_T_STRFN strtoll
+#define APR_OFF_T_STRFN strtoll
#else
-#define APR_OFF_T_STRFN strtol
+#define APR_OFF_T_STRFN strtol
#endif
/* used to check DWORD overflow for 64bit compiles */
-#define APR_DWORD_MAX 0xFFFFFFFFUL
+#define APR_DWORD_MAX 0xFFFFFFFFUL
/*
* Include common private declarations.
diff --git a/include/arch/os2/apr_arch_file_io.h b/include/arch/os2/apr_arch_file_io.h
index 399371237..79a57964e 100644
--- a/include/arch/os2/apr_arch_file_io.h
+++ b/include/arch/os2/apr_arch_file_io.h
@@ -49,12 +49,13 @@ struct apr_file_t {
/* Stuff for buffered mode */
char *buffer;
- apr_size_t bufsize; // Read/Write position in buffer
- apr_size_t bufpos; // Read/Write position in buffer
- unsigned long dataRead; // amount of valid data read into buffer
- int direction; // buffer being used for 0 = read, 1 = write
- unsigned long filePtr; // position in file of handle
- apr_thread_mutex_t *mutex;// mutex semaphore, must be owned to access the above fields
+ apr_size_t bufsize; /* Read/Write position in buffer */
+ apr_size_t bufpos; /* Read/Write position in buffer */
+ unsigned long dataRead; /* amount of valid data read into buffer */
+ int direction; /* buffer being used for 0 = read, 1 = write */
+ unsigned long filePtr; /* position in file of handle */
+ apr_thread_mutex_t *mutex; /* mutex semaphore, must be owned to access
+ the above fields */
};
struct apr_dir_t {
diff --git a/include/arch/win32/apr_arch_file_io.h b/include/arch/win32/apr_arch_file_io.h
index c8c7bdee8..6afaf8fb1 100644
--- a/include/arch/win32/apr_arch_file_io.h
+++ b/include/arch/win32/apr_arch_file_io.h
@@ -155,13 +155,13 @@ apr_status_t more_finfo(apr_finfo_t *finfo, const void *ufile,
* correctly when writing to a file with this flag set TRUE.
*/
-// for apr_poll.c;
+/* for apr_poll.c */
#define filedes filehand
struct apr_file_t {
apr_pool_t *pool;
HANDLE filehand;
- BOOLEAN pipe; // Is this a pipe of a file?
+ BOOLEAN pipe; /* Is this a pipe of a file? */
OVERLAPPED *pOverlapped;
apr_interval_time_t timeout;
apr_int32_t flags;
diff --git a/include/arch/win32/apr_arch_misc.h b/include/arch/win32/apr_arch_misc.h
index 1de496ed6..bdf3a135f 100644
--- a/include/arch/win32/apr_arch_misc.h
+++ b/include/arch/win32/apr_arch_misc.h
@@ -66,7 +66,7 @@ struct apr_other_child_rec_t {
*/
extern int APR_DECLARE_DATA apr_app_init_complete;
-int apr_wastrtoastr(char const * const * *retarr,
+int apr_wastrtoastr(char const * const * *retarr,
wchar_t const * const *arr, int args);
/* Platform specific designation of run time os version.
@@ -74,38 +74,38 @@ int apr_wastrtoastr(char const * const * *retarr,
* export new kernel or winsock functions or behavior.
*/
typedef enum {
- APR_WIN_UNK = 0,
- APR_WIN_UNSUP = 1,
- APR_WIN_95 = 10,
- APR_WIN_95_B = 11,
- APR_WIN_95_OSR2 = 12,
- APR_WIN_98 = 14,
- APR_WIN_98_SE = 16,
- APR_WIN_ME = 18,
-
- APR_WIN_UNICODE = 20, /* Prior versions support only narrow chars */
-
- APR_WIN_CE_3 = 23, /* CE is an odd beast, not supporting */
- /* some pre-NT features, such as the */
- APR_WIN_NT = 30, /* narrow charset APIs (fooA fns), while */
- APR_WIN_NT_3_5 = 35, /* not supporting some NT-family features. */
- APR_WIN_NT_3_51 = 36,
-
- APR_WIN_NT_4 = 40,
- APR_WIN_NT_4_SP2 = 42,
- APR_WIN_NT_4_SP3 = 43,
- APR_WIN_NT_4_SP4 = 44,
- APR_WIN_NT_4_SP5 = 45,
- APR_WIN_NT_4_SP6 = 46,
-
- APR_WIN_2000 = 50,
- APR_WIN_2000_SP1 = 51,
- APR_WIN_2000_SP2 = 52,
- APR_WIN_XP = 60,
- APR_WIN_XP_SP1 = 61,
- APR_WIN_XP_SP2 = 62,
- APR_WIN_2003 = 70,
- APR_WIN_VISTA = 80
+ APR_WIN_UNK = 0,
+ APR_WIN_UNSUP = 1,
+ APR_WIN_95 = 10,
+ APR_WIN_95_B = 11,
+ APR_WIN_95_OSR2 = 12,
+ APR_WIN_98 = 14,
+ APR_WIN_98_SE = 16,
+ APR_WIN_ME = 18,
+
+ APR_WIN_UNICODE = 20, /* Prior versions support only narrow chars */
+
+ APR_WIN_CE_3 = 23, /* CE is an odd beast, not supporting */
+ /* some pre-NT features, such as the */
+ APR_WIN_NT = 30, /* narrow charset APIs (fooA fns), while */
+ APR_WIN_NT_3_5 = 35, /* not supporting some NT-family features. */
+ APR_WIN_NT_3_51 = 36,
+
+ APR_WIN_NT_4 = 40,
+ APR_WIN_NT_4_SP2 = 42,
+ APR_WIN_NT_4_SP3 = 43,
+ APR_WIN_NT_4_SP4 = 44,
+ APR_WIN_NT_4_SP5 = 45,
+ APR_WIN_NT_4_SP6 = 46,
+
+ APR_WIN_2000 = 50,
+ APR_WIN_2000_SP1 = 51,
+ APR_WIN_2000_SP2 = 52,
+ APR_WIN_XP = 60,
+ APR_WIN_XP_SP1 = 61,
+ APR_WIN_XP_SP2 = 62,
+ APR_WIN_2003 = 70,
+ APR_WIN_VISTA = 80
} apr_oslevel_e;
extern APR_DECLARE_DATA apr_oslevel_e apr_os_level;
@@ -172,13 +172,13 @@ static APR_INLINE void* apr_realloc_dbg(void* userData, size_t newSize,
#endif /* ! _MSC_VER */
typedef enum {
- DLL_WINBASEAPI = 0, // kernel32 From WinBase.h
- DLL_WINADVAPI = 1, // advapi32 From WinBase.h
- DLL_WINSOCKAPI = 2, // mswsock From WinSock.h
- DLL_WINSOCK2API = 3, // ws2_32 From WinSock2.h
- DLL_SHSTDAPI = 4, // shell32 From ShellAPI.h
- DLL_NTDLL = 5, // shell32 From our real kernel
- DLL_defined = 6 // must define as last idx_ + 1
+ DLL_WINBASEAPI = 0, /* kernel32 From WinBase.h */
+ DLL_WINADVAPI = 1, /* advapi32 From WinBase.h */
+ DLL_WINSOCKAPI = 2, /* mswsock From WinSock.h */
+ DLL_WINSOCK2API = 3, /* ws2_32 From WinSock2.h */
+ DLL_SHSTDAPI = 4, /* shell32 From ShellAPI.h */
+ DLL_NTDLL = 5, /* shell32 From our real kernel */
+ DLL_defined = 6 /* must define as last idx_ + 1 */
} apr_dlltoken_e;
FARPROC apr_load_dll_func(apr_dlltoken_e fnLib, char *fnName, int ordinal);
@@ -273,8 +273,8 @@ APR_DECLARE_LATE_DLL_FUNC(DLL_WINADVAPI, BOOL, WINAPI, GetNamedSecurityInfoW, 0,
OUT PACL *ppDacl,
OUT PACL *ppSacl,
OUT PSECURITY_DESCRIPTOR *ppSecurityDescriptor),
- (pObjectName, ObjectType, SecurityInfo, ppsidOwner, ppsidGroup,
- ppDacl, ppSacl, ppSecurityDescriptor));
+ (pObjectName, ObjectType, SecurityInfo, ppsidOwner, ppsidGroup,
+ ppDacl, ppSacl, ppSecurityDescriptor));
#define GetNamedSecurityInfoW apr_winapi_GetNamedSecurityInfoW
APR_DECLARE_LATE_DLL_FUNC(DLL_WINADVAPI, BOOL, WINAPI, GetNamedSecurityInfoA, 0, (
@@ -286,8 +286,8 @@ APR_DECLARE_LATE_DLL_FUNC(DLL_WINADVAPI, BOOL, WINAPI, GetNamedSecurityInfoA, 0,
OUT PACL *ppDacl,
OUT PACL *ppSacl,
OUT PSECURITY_DESCRIPTOR *ppSecurityDescriptor),
- (pObjectName, ObjectType, SecurityInfo, ppsidOwner, ppsidGroup,
- ppDacl, ppSacl, ppSecurityDescriptor));
+ (pObjectName, ObjectType, SecurityInfo, ppsidOwner, ppsidGroup,
+ ppDacl, ppSacl, ppSecurityDescriptor));
#define GetNamedSecurityInfoA apr_winapi_GetNamedSecurityInfoA
#undef GetNamedSecurityInfo
#define GetNamedSecurityInfo apr_winapi_GetNamedSecurityInfoA
@@ -301,12 +301,12 @@ APR_DECLARE_LATE_DLL_FUNC(DLL_WINADVAPI, BOOL, WINAPI, GetSecurityInfo, 0, (
OUT PACL *ppDacl,
OUT PACL *ppSacl,
OUT PSECURITY_DESCRIPTOR *ppSecurityDescriptor),
- (handle, ObjectType, SecurityInfo, ppsidOwner, ppsidGroup,
- ppDacl, ppSacl, ppSecurityDescriptor));
+ (handle, ObjectType, SecurityInfo, ppsidOwner, ppsidGroup,
+ ppDacl, ppSacl, ppSecurityDescriptor));
#define GetSecurityInfo apr_winapi_GetSecurityInfo
APR_DECLARE_LATE_DLL_FUNC(DLL_SHSTDAPI, LPWSTR *, WINAPI, CommandLineToArgvW, 0, (
- LPCWSTR lpCmdLine,
+ LPCWSTR lpCmdLine,
int *pNumArgs),
(lpCmdLine, pNumArgs));
#define CommandLineToArgvW apr_winapi_CommandLineToArgvW
@@ -435,3 +435,4 @@ APR_DECLARE_LATE_DLL_FUNC(DLL_WINBASEAPI, BOOL, WINAPI, Process32NextW, 0, (
#endif /* !defined(_WIN32_WCE) */
#endif /* ! MISC_H */
+
diff --git a/locks/netware/thread_rwlock.c b/locks/netware/thread_rwlock.c
index d0bf3ddf3..f971aefd4 100644
--- a/locks/netware/thread_rwlock.c
+++ b/locks/netware/thread_rwlock.c
@@ -34,12 +34,12 @@ APR_DECLARE(apr_status_t) apr_thread_rwlock_create(apr_thread_rwlock_t **rwlock,
{
apr_thread_rwlock_t *new_rwlock = NULL;
- NXHierarchy_t hierarchy = 1; //for libc NKS NXRwLockAlloc
- NXLockInfo_t *info; //for libc NKS NXRwLockAlloc
+ NXHierarchy_t hierarchy = 1; /* for libc NKS NXRwLockAlloc */
+ NXLockInfo_t *info; /* for libc NKS NXRwLockAlloc */
new_rwlock = (apr_thread_rwlock_t *)apr_pcalloc(pool, sizeof(apr_thread_rwlock_t));
-
- if(new_rwlock ==NULL) {
+
+ if(new_rwlock ==NULL) {
return APR_ENOMEM;
}
new_rwlock->pool = pool;
diff --git a/locks/os2/proc_mutex.c b/locks/os2/proc_mutex.c
index 5a4935635..0f3a564ef 100644
--- a/locks/os2/proc_mutex.c
+++ b/locks/os2/proc_mutex.c
@@ -32,7 +32,7 @@ static char *fixed_name(const char *fname, apr_pool_t *pool)
if (fname == NULL)
semname = NULL;
else {
- // Semaphores don't live in the file system, fix up the name
+ /* Semaphores don't live in the file system, fix up the name */
while (*fname == '/' || *fname == '\\') {
fname++;
}
diff --git a/misc/netware/libprews.c b/misc/netware/libprews.c
index 624bf22cf..6e37ccf1d 100644
--- a/misc/netware/libprews.c
+++ b/misc/netware/libprews.c
@@ -16,12 +16,10 @@
#include <netware.h>
#include <library.h>
#include <nks/synch.h>
-#ifdef USE_WINSOCK
-#include "novsock2.h"
-#endif
#include "apr_pools.h"
#include "apr_private.h"
+#include "apr_arch_internal_time.h"
/* library-private data...*/
diff --git a/misc/netware/start.c b/misc/netware/start.c
index 1e5708d1f..76817d96c 100644
--- a/misc/netware/start.c
+++ b/misc/netware/start.c
@@ -22,8 +22,20 @@
#include "apr_arch_misc.h" /* for WSAHighByte / WSALowByte */
#include "apr_arch_proc_mutex.h" /* for apr_proc_mutex_unix_setup_lock() */
#include "apr_arch_internal_time.h"
+#include "apr_ldap.h" /* for apr_ldap_rebind_init() */
#ifdef USE_WINSOCK
+/* Prototypes missing from older NDKs */
+int WSAStartupRTags(WORD wVersionRequested,
+ LPWSADATA lpWSAData,
+ rtag_t WSAStartupRTag,
+ rtag_t WSPSKTRTag,
+ rtag_t lookUpServiceBeginRTag,
+ rtag_t WSAEventRTag,
+ rtag_t WSPCPRTag);
+
+int WSACleanupRTag(rtag_t rTag);
+
/*
** Resource tag signatures for using NetWare WinSock 2. These will no longer
** be needed by anyone once the new WSAStartupWithNlmHandle() is available
@@ -38,7 +50,6 @@
int (*WSAStartupWithNLMHandle)( WORD version, LPWSADATA data, void *handle ) = NULL;
int (*WSACleanupWithNLMHandle)( void *handle ) = NULL;
-apr_status_t apr_ldap_rebind_init(apr_pool_t *pool);
static int wsa_startup_with_handle (WORD wVersionRequested, LPWSADATA data, void *handle)
{
@@ -124,7 +135,6 @@ APR_DECLARE(apr_status_t) apr_app_initialize(int *argc,
APR_DECLARE(apr_status_t) apr_initialize(void)
{
apr_pool_t *pool;
- int err;
void *nlmhandle = getnlmhandle();
/* Register the NLM as using APR. If it is already
@@ -144,15 +154,18 @@ APR_DECLARE(apr_status_t) apr_initialize(void)
apr_pool_tag(pool, "apr_initilialize");
#ifdef USE_WINSOCK
- err = RegisterAppWithWinSock (nlmhandle);
-
- if (err) {
- return err;
+ {
+ int err;
+ if ((err = RegisterAppWithWinSock (nlmhandle))) {
+ return err;
+ }
}
#endif
apr_signal_init(pool);
+#if APR_HAS_LDAP
apr_ldap_rebind_init(pool);
+#endif
return APR_SUCCESS;
}
diff --git a/network_io/unix/sockets.c b/network_io/unix/sockets.c
index 5552460ed..93f2632b8 100644
--- a/network_io/unix/sockets.c
+++ b/network_io/unix/sockets.c
@@ -338,18 +338,18 @@ apr_status_t apr_socket_connect(apr_socket_t *sock, apr_sockaddr_t *sa)
#endif /* SO_ERROR */
}
- if (rc == -1 && errno != EISCONN) {
- return errno;
- }
if (memcmp(sa->ipaddr_ptr, generic_inaddr_any, sa->ipaddr_len)) {
/* A real remote address was passed in. If the unspecified
* address was used, the actual remote addr will have to be
* determined using getpeername() if required. */
- /* ### this should probably be a structure copy + fixup as per
- * _accept()'s handling of local_addr */
- sock->remote_addr = sa;
sock->remote_addr_unknown = 0;
+
+ /* Copy the address structure details in. */
+ sock->remote_addr->sa = sa->sa;
+ sock->remote_addr->salen = sa->salen;
+ /* Adjust ipaddr_ptr et al. */
+ apr_sockaddr_vars_set(sock->remote_addr, sa->family, sa->port);
}
if (sock->local_addr->port == 0) {
@@ -364,6 +364,11 @@ apr_status_t apr_socket_connect(apr_socket_t *sock, apr_sockaddr_t *sa)
*/
sock->local_interface_unknown = 1;
}
+
+ if (rc == -1 && errno != EISCONN) {
+ return errno;
+ }
+
#ifndef HAVE_POLL
sock->connected=1;
#endif
diff --git a/network_io/win32/sockopt.c b/network_io/win32/sockopt.c
index c8e670fa7..b654e8b40 100644
--- a/network_io/win32/sockopt.c
+++ b/network_io/win32/sockopt.c
@@ -20,7 +20,7 @@
#include "apr_strings.h"
#include <string.h>
-apr_status_t soblock(SOCKET sd)
+static apr_status_t soblock(SOCKET sd)
{
u_long zero = 0;
@@ -30,7 +30,7 @@ apr_status_t soblock(SOCKET sd)
return APR_SUCCESS;
}
-apr_status_t sononblock(SOCKET sd)
+static apr_status_t sononblock(SOCKET sd)
{
u_long one = 1;
diff --git a/passwd/apr_getpass.c b/passwd/apr_getpass.c
index bc153df60..a07041b66 100644
--- a/passwd/apr_getpass.c
+++ b/passwd/apr_getpass.c
@@ -34,9 +34,13 @@
#include <unistd.h>
#endif
#if APR_HAVE_CONIO_H
+#ifdef _MSC_VER
#pragma warning(disable: 4032)
#include <conio.h>
#pragma warning(default: 4032)
+#else
+#include <conio.h>
+#endif
#endif
#if APR_HAVE_STDLIB_H
#include <stdlib.h>
@@ -49,8 +53,12 @@
#endif
/* Disable getpass() support when PASS_MAX is defined and is "small",
- * for an arbitrary definition of "small". */
-#if defined(HAVE_GETPASS) && defined(PASS_MAX) && PASS_MAX < 32
+ * for an arbitrary definition of "small".
+ * HP-UX truncates passwords (PR49496) so we disable getpass() for
+ * this platform too.
+ */
+#if defined(HAVE_GETPASS) && \
+ (defined(PASS_MAX) && PASS_MAX < 32) || defined(__hpux) || defined(__hpux__)
#undef HAVE_GETPASS
#endif
diff --git a/test/NWGNUaprtest b/test/NWGNUaprtest
index 56228e43e..0dbc0e658 100644
--- a/test/NWGNUaprtest
+++ b/test/NWGNUaprtest
@@ -8,7 +8,7 @@
#
ifndef EnvironmentDefined
-include $(APR_WORK)\build\NWGNUhead.inc
+include $(APR_WORK)/build/NWGNUhead.inc
endif
#
@@ -122,12 +122,12 @@ NLM_STACK_SIZE = 524288
#
# If this is specified it will be used by the link '-entry' directive
#
-NLM_ENTRY_SYM = _LibCPrelude
+NLM_ENTRY_SYM =
#
# If this is specified it will be used by the link '-exit' directive
#
-NLM_EXIT_SYM = _LibCPostlude
+NLM_EXIT_SYM =
#
# If this is specified it will be used by the link '-check' directive
@@ -223,7 +223,7 @@ FILES_nlm_objs = \
# These will be added as a library command in the link.opt file.
#
FILES_nlm_libs = \
- libcpre.o \
+ $(PRELUDE) \
$(EOLIST)
#
@@ -254,7 +254,7 @@ FILE_nlm_copyright =
# Any additional imports go here
#
FILES_nlm_Ximports = \
- @$(APR)/aprlib.imp \
+ @aprlib.imp \
@libc.imp \
@netware.imp \
$(EOLIST)
@@ -282,7 +282,7 @@ 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)
+# correct place. (See $(APR_WORK)/build/NWGNUhead.inc for examples)
#
install :: nlms FORCE
@@ -296,6 +296,6 @@ install :: nlms FORCE
# in this makefile
#
-include $(APR_WORK)\build\NWGNUtail.inc
+include $(APRBUILD)/NWGNUtail.inc
diff --git a/test/NWGNUechod b/test/NWGNUechod
index c05f016ae..c58a952e1 100644
--- a/test/NWGNUechod
+++ b/test/NWGNUechod
@@ -123,12 +123,12 @@ NLM_STACK_SIZE =
#
# If this is specified it will be used by the link '-entry' directive
#
-NLM_ENTRY_SYM = _LibCPrelude
+NLM_ENTRY_SYM =
#
# If this is specified it will be used by the link '-exit' directive
#
-NLM_EXIT_SYM = _LibCPostlude
+NLM_EXIT_SYM =
#
# If this is specified it will be used by the link '-check' directive
@@ -209,7 +209,7 @@ FILE_nlm_copyright =
# Any additional imports go here
#
FILES_nlm_Ximports = \
- @$(APR)/aprlib.imp \
+ @aprlib.imp \
@libc.imp \
$(EOLIST)
diff --git a/test/NWGNUglobalmutexchild b/test/NWGNUglobalmutexchild
index 06f586d9c..d361033f8 100644
--- a/test/NWGNUglobalmutexchild
+++ b/test/NWGNUglobalmutexchild
@@ -8,7 +8,7 @@
#
ifndef EnvironmentDefined
-include $(APR_WORK)\build\NWGNUhead.inc
+include $(APR_WORK)/build/NWGNUhead.inc
endif
#
@@ -125,12 +125,12 @@ NLM_STACK_SIZE =
#
# If this is specified it will be used by the link '-entry' directive
#
-NLM_ENTRY_SYM = _LibCPrelude
+NLM_ENTRY_SYM =
#
# If this is specified it will be used by the link '-exit' directive
#
-NLM_EXIT_SYM = _LibCPostlude
+NLM_EXIT_SYM =
#
# If this is specified it will be used by the link '-check' directive
@@ -179,7 +179,7 @@ FILES_nlm_objs = \
# These will be added as a library command in the link.opt file.
#
FILES_nlm_libs = \
- libcpre.o \
+ $(PRELUDE) \
$(EOLIST)
#
@@ -210,7 +210,7 @@ FILE_nlm_copyright =
# Any additional imports go here
#
FILES_nlm_Ximports = \
- @$(APR)/aprlib.imp \
+ @aprlib.imp \
@libc.imp \
$(EOLIST)
@@ -237,7 +237,7 @@ 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)
+# correct place. (See $(APR_WORK)/build/NWGNUhead.inc for examples)
#
install :: nlms FORCE
@@ -250,5 +250,5 @@ install :: nlms FORCE
# in this makefile
#
-include $(APR_WORK)\build\NWGNUtail.inc
+include $(APRBUILD)/NWGNUtail.inc
diff --git a/test/NWGNUmakefile b/test/NWGNUmakefile
index d2f8b0ce5..b9ebfaf27 100644
--- a/test/NWGNUmakefile
+++ b/test/NWGNUmakefile
@@ -10,7 +10,7 @@ SUBDIRS = \
# paths to tools
#
-include $(APR_WORK)\build\NWGNUhead.inc
+include $(APR_WORK)/build/NWGNUhead.inc
#
# build this level's files
@@ -41,10 +41,10 @@ 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)
+# correct place. (See $(APR_WORK)/build/NWGNUhead.inc for examples)
#
install :: nlms FORCE
- copy $(OBJDIR)\*.nlm $(INSTALLBASE)
+ $(call COPY,$(OBJDIR)/*.nlm,$(INSTALLBASE))
#
# Any specialized rules here
@@ -55,5 +55,5 @@ install :: nlms FORCE
# in this makefile
#
-include $(APR_WORK)\build\NWGNUtail.inc
+include $(APRBUILD)/NWGNUtail.inc
diff --git a/test/NWGNUmod_test b/test/NWGNUmod_test
index ae52bce54..6381f90b4 100644
--- a/test/NWGNUmod_test
+++ b/test/NWGNUmod_test
@@ -8,7 +8,7 @@
#
ifndef EnvironmentDefined
-include $(APR_WORK)\build\NWGNUhead.inc
+include $(APR_WORK)/build/NWGNUhead.inc
endif
#
@@ -125,12 +125,12 @@ NLM_STACK_SIZE =
#
# If this is specified it will be used by the link '-entry' directive
#
-NLM_ENTRY_SYM = _LibCPrelude
+NLM_ENTRY_SYM =
#
# If this is specified it will be used by the link '-exit' directive
#
-NLM_EXIT_SYM = _LibCPostlude
+NLM_EXIT_SYM =
#
# If this is specified it will be used by the link '-check' directive
@@ -179,7 +179,7 @@ FILES_nlm_objs = \
# These will be added as a library command in the link.opt file.
#
FILES_nlm_libs = \
- libcpre.o \
+ $(PRELUDE) \
$(EOLIST)
#
@@ -210,7 +210,7 @@ FILE_nlm_copyright =
# Any additional imports go here
#
FILES_nlm_Ximports = \
- @$(APR)/aprlib.imp \
+ @aprlib.imp \
@libc.imp \
$(EOLIST)
@@ -239,7 +239,7 @@ 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)
+# correct place. (See $(APR_WORK)/build/NWGNUhead.inc for examples)
#
install :: nlms FORCE
@@ -252,5 +252,5 @@ install :: nlms FORCE
# in this makefile
#
-include $(APR_WORK)\build\NWGNUtail.inc
+include $(APRBUILD)/NWGNUtail.inc
diff --git a/test/NWGNUproc_child b/test/NWGNUproc_child
index 174ad5e03..757989359 100644
--- a/test/NWGNUproc_child
+++ b/test/NWGNUproc_child
@@ -8,7 +8,7 @@
#
ifndef EnvironmentDefined
-include $(APR_WORK)\build\NWGNUhead.inc
+include $(APR_WORK)/build/NWGNUhead.inc
endif
#
@@ -125,12 +125,12 @@ NLM_STACK_SIZE =
#
# If this is specified it will be used by the link '-entry' directive
#
-NLM_ENTRY_SYM = _LibCPrelude
+NLM_ENTRY_SYM =
#
# If this is specified it will be used by the link '-exit' directive
#
-NLM_EXIT_SYM = _LibCPostlude
+NLM_EXIT_SYM =
#
# If this is specified it will be used by the link '-check' directive
@@ -179,7 +179,7 @@ FILES_nlm_objs = \
# These will be added as a library command in the link.opt file.
#
FILES_nlm_libs = \
- libcpre.o \
+ $(PRELUDE) \
$(EOLIST)
#
@@ -210,7 +210,7 @@ FILE_nlm_copyright =
# Any additional imports go here
#
FILES_nlm_Ximports = \
- @$(APR)/aprlib.imp \
+ @aprlib.imp \
@libc.imp \
$(EOLIST)
@@ -237,7 +237,7 @@ 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)
+# correct place. (See $(APR_WORK)/build/NWGNUhead.inc for examples)
#
install :: nlms FORCE
@@ -250,5 +250,5 @@ install :: nlms FORCE
# in this makefile
#
-include $(APR_WORK)\build\NWGNUtail.inc
+include $(APRBUILD)/NWGNUtail.inc
diff --git a/test/NWGNUreadchild b/test/NWGNUreadchild
index 7c4b9a6f2..a184328e4 100644
--- a/test/NWGNUreadchild
+++ b/test/NWGNUreadchild
@@ -8,7 +8,7 @@
#
ifndef EnvironmentDefined
-include $(APR_WORK)\build\NWGNUhead.inc
+include $(APR_WORK)/build/NWGNUhead.inc
endif
#
@@ -125,12 +125,12 @@ NLM_STACK_SIZE =
#
# If this is specified it will be used by the link '-entry' directive
#
-NLM_ENTRY_SYM = _LibCPrelude
+NLM_ENTRY_SYM =
#
# If this is specified it will be used by the link '-exit' directive
#
-NLM_EXIT_SYM = _LibCPostlude
+NLM_EXIT_SYM =
#
# If this is specified it will be used by the link '-check' directive
@@ -179,7 +179,7 @@ FILES_nlm_objs = \
# These will be added as a library command in the link.opt file.
#
FILES_nlm_libs = \
- libcpre.o \
+ $(PRELUDE) \
$(EOLIST)
#
@@ -210,7 +210,7 @@ FILE_nlm_copyright =
# Any additional imports go here
#
FILES_nlm_Ximports = \
- @$(APR)/aprlib.imp \
+ @aprlib.imp \
@libc.imp \
$(EOLIST)
@@ -237,7 +237,7 @@ 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)
+# correct place. (See $(APR_WORK)/build/NWGNUhead.inc for examples)
#
install :: nlms FORCE
@@ -250,5 +250,5 @@ install :: nlms FORCE
# in this makefile
#
-include $(APR_WORK)\build\NWGNUtail.inc
+include $(APRBUILD)/NWGNUtail.inc
diff --git a/test/NWGNUsockchild b/test/NWGNUsockchild
index d0a97cbe5..0f00f2c8f 100644
--- a/test/NWGNUsockchild
+++ b/test/NWGNUsockchild
@@ -8,7 +8,7 @@
#
ifndef EnvironmentDefined
-include $(APR_WORK)\build\NWGNUhead.inc
+include $(APR_WORK)/build/NWGNUhead.inc
endif
#
@@ -125,12 +125,12 @@ NLM_STACK_SIZE =
#
# If this is specified it will be used by the link '-entry' directive
#
-NLM_ENTRY_SYM = _LibCPrelude
+NLM_ENTRY_SYM =
#
# If this is specified it will be used by the link '-exit' directive
#
-NLM_EXIT_SYM = _LibCPostlude
+NLM_EXIT_SYM =
#
# If this is specified it will be used by the link '-check' directive
@@ -179,7 +179,7 @@ FILES_nlm_objs = \
# These will be added as a library command in the link.opt file.
#
FILES_nlm_libs = \
- libcpre.o \
+ $(PRELUDE) \
$(EOLIST)
#
@@ -210,7 +210,7 @@ FILE_nlm_copyright =
# Any additional imports go here
#
FILES_nlm_Ximports = \
- @$(APR)/aprlib.imp \
+ @aprlib.imp \
@libc.imp \
$(EOLIST)
@@ -237,7 +237,7 @@ 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)
+# correct place. (See $(APR_WORK)/build/NWGNUhead.inc for examples)
#
install :: nlms FORCE
@@ -250,5 +250,5 @@ install :: nlms FORCE
# in this makefile
#
-include $(APR_WORK)\build\NWGNUtail.inc
+include $(APRBUILD)/NWGNUtail.inc
diff --git a/test/NWGNUsockperf b/test/NWGNUsockperf
index 82baa6bd6..398669697 100644
--- a/test/NWGNUsockperf
+++ b/test/NWGNUsockperf
@@ -123,12 +123,12 @@ NLM_STACK_SIZE =
#
# If this is specified it will be used by the link '-entry' directive
#
-NLM_ENTRY_SYM = _LibCPrelude
+NLM_ENTRY_SYM =
#
# If this is specified it will be used by the link '-exit' directive
#
-NLM_EXIT_SYM = _LibCPostlude
+NLM_EXIT_SYM =
#
# If this is specified it will be used by the link '-check' directive
@@ -209,7 +209,7 @@ FILE_nlm_copyright =
# Any additional imports go here
#
FILES_nlm_Ximports = \
- @$(APR)/aprlib.imp \
+ @aprlib.imp \
@libc.imp \
$(EOLIST)
diff --git a/test/NWGNUtestatmc b/test/NWGNUtestatmc
index 10782fda0..c3f3af2be 100644
--- a/test/NWGNUtestatmc
+++ b/test/NWGNUtestatmc
@@ -8,7 +8,7 @@
#
ifndef EnvironmentDefined
-include $(APR_WORK)\build\NWGNUhead.inc
+include $(APR_WORK)/build/NWGNUhead.inc
endif
#
@@ -122,12 +122,12 @@ NLM_STACK_SIZE =
#
# If this is specified it will be used by the link '-entry' directive
#
-NLM_ENTRY_SYM = _LibCPrelude
+NLM_ENTRY_SYM =
#
# If this is specified it will be used by the link '-exit' directive
#
-NLM_EXIT_SYM = _LibCPostlude
+NLM_EXIT_SYM =
#
# If this is specified it will be used by the link '-check' directive
@@ -177,7 +177,7 @@ FILES_nlm_objs = \
# These will be added as a library command in the link.opt file.
#
FILES_nlm_libs = \
- libcpre.o \
+ $(PRELUDE) \
$(EOLIST)
#
@@ -208,7 +208,7 @@ FILE_nlm_copyright =
# Any additional imports go here
#
FILES_nlm_Ximports = \
- @$(APR)/aprlib.imp \
+ @aprlib.imp \
@libc.imp \
@netware.imp \
$(EOLIST)
@@ -236,7 +236,7 @@ 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)
+# correct place. (See $(APR_WORK)/build/NWGNUhead.inc for examples)
#
install :: nlms FORCE
@@ -250,5 +250,5 @@ install :: nlms FORCE
# in this makefile
#
-include $(APR_WORK)\build\NWGNUtail.inc
+include $(APRBUILD)/NWGNUtail.inc
diff --git a/test/NWGNUtryread b/test/NWGNUtryread
index 12cdac3ba..726934704 100644
--- a/test/NWGNUtryread
+++ b/test/NWGNUtryread
@@ -8,7 +8,7 @@
#
ifndef EnvironmentDefined
-include $(APR_WORK)\build\NWGNUhead.inc
+include $(APR_WORK)/build/NWGNUhead.inc
endif
#
@@ -125,12 +125,12 @@ NLM_STACK_SIZE =
#
# If this is specified it will be used by the link '-entry' directive
#
-NLM_ENTRY_SYM = _LibCPrelude
+NLM_ENTRY_SYM =
#
# If this is specified it will be used by the link '-exit' directive
#
-NLM_EXIT_SYM = _LibCPostlude
+NLM_EXIT_SYM =
#
# If this is specified it will be used by the link '-check' directive
@@ -179,7 +179,7 @@ FILES_nlm_objs = \
# These will be added as a library command in the link.opt file.
#
FILES_nlm_libs = \
- libcpre.o \
+ $(PRELUDE) \
$(EOLIST)
#
@@ -210,7 +210,7 @@ FILE_nlm_copyright =
# Any additional imports go here
#
FILES_nlm_Ximports = \
- @$(APR)/aprlib.imp \
+ @aprlib.imp \
@libc.imp \
$(EOLIST)
@@ -237,7 +237,7 @@ 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)
+# correct place. (See $(APR_WORK)/build/NWGNUhead.inc for examples)
#
install :: nlms FORCE
@@ -250,5 +250,5 @@ install :: nlms FORCE
# in this makefile
#
-include $(APR_WORK)\build\NWGNUtail.inc
+include $(APRBUILD)/NWGNUtail.inc
diff --git a/test/nw_misc.c b/test/nw_misc.c
index d00ef0e00..8e94598ac 100644
--- a/test/nw_misc.c
+++ b/test/nw_misc.c
@@ -1,3 +1,4 @@
+#include <stdio.h>
#include <stdlib.h>
#include <netware.h>
#include <screen.h>
diff --git a/test/testsock.c b/test/testsock.c
index 50aef5c2b..41239d0e9 100644
--- a/test/testsock.c
+++ b/test/testsock.c
@@ -267,16 +267,20 @@ static void test_get_addr(abts_case *tc, void *data)
apr_status_t rv;
apr_socket_t *ld, *sd, *cd;
apr_sockaddr_t *sa, *ca;
+ apr_pool_t *subp;
char *a, *b;
- ld = setup_socket(tc);
+ APR_ASSERT_SUCCESS(tc, "create subpool", apr_pool_create(&subp, p));
+
+ if ((ld = setup_socket(tc)) != APR_SUCCESS)
+ return;
APR_ASSERT_SUCCESS(tc,
"get local address of bound socket",
apr_socket_addr_get(&sa, APR_LOCAL, ld));
rv = apr_socket_create(&cd, sa->family, SOCK_STREAM,
- APR_PROTO_TCP, p);
+ APR_PROTO_TCP, subp);
APR_ASSERT_SUCCESS(tc, "create client socket", rv);
APR_ASSERT_SUCCESS(tc, "enable non-block mode",
@@ -302,7 +306,7 @@ static void test_get_addr(abts_case *tc, void *data)
}
APR_ASSERT_SUCCESS(tc, "accept connection",
- apr_socket_accept(&sd, ld, p));
+ apr_socket_accept(&sd, ld, subp));
{
/* wait for writability */
@@ -322,18 +326,38 @@ static void test_get_addr(abts_case *tc, void *data)
APR_ASSERT_SUCCESS(tc, "get local address of server socket",
apr_socket_addr_get(&sa, APR_LOCAL, sd));
-
APR_ASSERT_SUCCESS(tc, "get remote address of client socket",
apr_socket_addr_get(&ca, APR_REMOTE, cd));
-
- a = apr_psprintf(p, "%pI", sa);
- b = apr_psprintf(p, "%pI", ca);
+ /* Test that the pool of the returned sockaddr objects exactly
+ * match the socket. */
+ ABTS_PTR_EQUAL(tc, subp, sa->pool);
+ ABTS_PTR_EQUAL(tc, subp, ca->pool);
+
+ /* Check equivalence. */
+ a = apr_psprintf(p, "%pI fam=%d", sa, sa->family);
+ b = apr_psprintf(p, "%pI fam=%d", ca, ca->family);
ABTS_STR_EQUAL(tc, a, b);
+
+ /* Check pool of returned sockaddr, as above. */
+ APR_ASSERT_SUCCESS(tc, "get local address of client socket",
+ apr_socket_addr_get(&sa, APR_LOCAL, cd));
+ APR_ASSERT_SUCCESS(tc, "get remote address of server socket",
+ apr_socket_addr_get(&ca, APR_REMOTE, sd));
+
+ /* Check equivalence. */
+ a = apr_psprintf(p, "%pI fam=%d", sa, sa->family);
+ b = apr_psprintf(p, "%pI fam=%d", ca, ca->family);
+ ABTS_STR_EQUAL(tc, a, b);
+
+ ABTS_PTR_EQUAL(tc, subp, sa->pool);
+ ABTS_PTR_EQUAL(tc, subp, ca->pool);
apr_socket_close(cd);
apr_socket_close(sd);
apr_socket_close(ld);
+
+ apr_pool_destroy(subp);
}
abts_suite *testsock(abts_suite *suite)
diff --git a/threadproc/netware/proc.c b/threadproc/netware/proc.c
index 026ca6fd7..d2404a821 100644
--- a/threadproc/netware/proc.c
+++ b/threadproc/netware/proc.c
@@ -26,7 +26,7 @@
*/
static apr_file_t no_file = { NULL, -1, };
-apr_status_t apr_netware_proc_cleanup(void *theproc)
+static apr_status_t apr_netware_proc_cleanup(void *theproc)
{
apr_proc_t *proc = theproc;
int exit_int;
@@ -448,8 +448,10 @@ APR_DECLARE(apr_status_t) apr_proc_wait(apr_proc_t *proc,
return errno;
}
-APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr, apr_int32_t what,
- struct rlimit *limit)
+#if APR_HAVE_STRUCT_RLIMIT
+APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr,
+ apr_int32_t what,
+ struct rlimit *limit)
{
switch(what) {
case APR_LIMIT_CPU:
@@ -459,13 +461,15 @@ APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr, apr_int32
#else
return APR_ENOTIMPL;
#endif
+
case APR_LIMIT_MEM:
-#if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM) || defined(RLIMIT_AS)
+#if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS)
attr->limit_mem = limit;
break;
#else
return APR_ENOTIMPL;
#endif
+
case APR_LIMIT_NPROC:
#ifdef RLIMIT_NPROC
attr->limit_nproc = limit;
@@ -473,9 +477,19 @@ APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr, apr_int32
#else
return APR_ENOTIMPL;
#endif
+
+ case APR_LIMIT_NOFILE:
+#ifdef RLIMIT_NOFILE
+ attr->limit_nofile = limit;
+ break;
+#else
+ return APR_ENOTIMPL;
+#endif
+
}
return APR_SUCCESS;
}
+#endif /* APR_HAVE_STRUCT_RLIMIT */
APR_DECLARE(apr_status_t) apr_procattr_user_set(apr_procattr_t *attr,
const char *username,
diff --git a/threadproc/netware/signals.c b/threadproc/netware/signals.c
index bc660af7d..c744da5c5 100644
--- a/threadproc/netware/signals.c
+++ b/threadproc/netware/signals.c
@@ -15,7 +15,6 @@
*/
#include "apr_arch_threadproc.h"
-#include <nks/thread.h>
#include "apr_private.h"
#include "apr_pools.h"
#include "apr_signal.h"
@@ -64,12 +63,12 @@ static void *signal_thread_func(void *signal_handler)
return NULL;
}
+#if (APR_HAVE_SIGWAIT || APR_HAVE_SIGSUSPEND)
APR_DECLARE(apr_status_t) apr_setup_signal_thread(void)
{
- int rv = 0;
-
- return rv;
+ return 0;
}
+#endif /* (APR_HAVE_SIGWAIT || APR_HAVE_SIGSUSPEND) */
APR_DECLARE(apr_status_t) apr_signal_block(int signum)
{
diff --git a/threadproc/netware/thread.c b/threadproc/netware/thread.c
index 4b5d930a0..e1a46e6e2 100644
--- a/threadproc/netware/thread.c
+++ b/threadproc/netware/thread.c
@@ -41,7 +41,7 @@ apr_status_t apr_threadattr_create(apr_threadattr_t **new,
apr_status_t apr_threadattr_detach_set(apr_threadattr_t *attr,apr_int32_t on)
{
attr->detach = on;
- return APR_SUCCESS;
+ return APR_SUCCESS;
}
apr_status_t apr_threadattr_detach_get(apr_threadattr_t *attr)
@@ -71,21 +71,21 @@ static void *dummy_worker(void *opaque)
}
apr_status_t apr_thread_create(apr_thread_t **new,
- apr_threadattr_t *attr,
- apr_thread_start_t func,
- void *data,
- apr_pool_t *pool)
+ apr_threadattr_t *attr,
+ apr_thread_start_t func,
+ void *data,
+ apr_pool_t *pool)
{
apr_status_t stat;
long flags = NX_THR_BIND_CONTEXT;
- char threadName[NX_MAX_OBJECT_NAME_LEN+1];
+ char threadName[NX_MAX_OBJECT_NAME_LEN+1];
size_t stack_size = APR_DEFAULT_STACK_SIZE;
if (attr && attr->thread_name) {
strncpy (threadName, attr->thread_name, NX_MAX_OBJECT_NAME_LEN);
}
else {
- sprintf(threadName, "APR_thread %04ld", ++thread_count);
+ sprintf(threadName, "APR_thread %04ld", ++thread_count);
}
/* An original stack size of 0 will allow NXCreateThread() to
@@ -117,27 +117,26 @@ apr_status_t apr_thread_create(apr_thread_t **new,
}
(*new)->ctx = NXContextAlloc(
- /* void(*start_routine)(void *arg)*/(void (*)(void *)) dummy_worker,
- /* void *arg */ (*new),
- /* int priority */ NX_PRIO_MED,
- /* NXSize_t stackSize */ stack_size,
- /* long flags */ NX_CTX_NORMAL,
- /* int *error */ &stat);
-
-
- stat = NXContextSetName(
- /* NXContext_t ctx */ (*new)->ctx,
- /* const char *name */ threadName);
-
- stat = NXThreadCreate(
- /* NXContext_t context */ (*new)->ctx,
- /* long flags */ flags,
- /* NXThreadId_t *thread_id */ &(*new)->td);
-
- if(stat==0)
- return APR_SUCCESS;
+ /* void(*start_routine)(void *arg) */ (void (*)(void *)) dummy_worker,
+ /* void *arg */ (*new),
+ /* int priority */ NX_PRIO_MED,
+ /* NXSize_t stackSize */ stack_size,
+ /* long flags */ NX_CTX_NORMAL,
+ /* int *error */ &stat);
+
+ stat = NXContextSetName(
+ /* NXContext_t ctx */ (*new)->ctx,
+ /* const char *name */ threadName);
+
+ stat = NXThreadCreate(
+ /* NXContext_t context */ (*new)->ctx,
+ /* long flags */ flags,
+ /* NXThreadId_t *thread_id */ &(*new)->td);
+
+ if (stat == 0)
+ return APR_SUCCESS;
- return(stat);// if error
+ return(stat); /* if error */
}
apr_os_thread_t apr_os_thread_current()
diff --git a/threadproc/unix/proc.c b/threadproc/unix/proc.c
index 283706cfb..b5e4dd47c 100644
--- a/threadproc/unix/proc.c
+++ b/threadproc/unix/proc.c
@@ -667,6 +667,7 @@ APR_DECLARE(apr_status_t) apr_proc_wait(apr_proc_t *proc,
return errno;
}
+#if APR_HAVE_STRUCT_RLIMIT
APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr,
apr_int32_t what,
struct rlimit *limit)
@@ -681,7 +682,7 @@ APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr,
#endif
case APR_LIMIT_MEM:
-#if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM) || defined(RLIMIT_AS)
+#if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS)
attr->limit_mem = limit;
break;
#else
@@ -708,3 +709,5 @@ APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr,
return APR_SUCCESS;
}
+#endif /* APR_HAVE_STRUCT_RLIMIT */
+