From e7e6eb2c18e26020d6406dcfbb5c1ddb622436c4 Mon Sep 17 00:00:00 2001 From: Ruediger Pluem Date: Fri, 20 Aug 2010 15:05:30 +0000 Subject: Merge r793193 from trunk: Fix apr_socket_addr_get() in combination with async connects, for the APR_LOCAL case. Before it would return 0.0.0.0:0, instead of the actual local address/port. TODO: Fix win32 in a similar fashion; though maybe it's better to assume the local address is unknown by default... * network_io/unix/sockets.c (apr_socket_connect): Move address determination, or rather determining that the local address is unknown, to before returning because of e.g. EINPROGRESS. Submitted by: striker Reviewed by: rpluem git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@987536 13f79535-47bb-0310-9956-ffa450edef68 --- network_io/unix/sockets.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/network_io/unix/sockets.c b/network_io/unix/sockets.c index 5552460ed..bb5e220f9 100644 --- a/network_io/unix/sockets.c +++ b/network_io/unix/sockets.c @@ -338,9 +338,6 @@ 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 @@ -364,6 +361,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 -- cgit v1.2.1 From 79c6255b54e8633587f93cabbf7d937979b66abd Mon Sep 17 00:00:00 2001 From: Ruediger Pluem Date: Fri, 20 Aug 2010 15:17:05 +0000 Subject: Merge r983618 from trunk: * network_io/unix/sockets.c (apr_socket_connect): Copy the remote address by value rather than by reference. This ensures that the sockaddr object returned by apr_socket_addr_get is allocated from the same pool as the socket object itself, as apr_socket_accept does; avoiding any potential lifetime mismatches. * test/testsock.c (test_get_addr): Enhance test case to cover this. PR: 49713 Submitted by: jorton Reviewed by: rpluem git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@987541 13f79535-47bb-0310-9956-ffa450edef68 --- network_io/unix/sockets.c | 9 ++++++--- test/testsock.c | 35 +++++++++++++++++++++++++++++------ 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/network_io/unix/sockets.c b/network_io/unix/sockets.c index bb5e220f9..93f2632b8 100644 --- a/network_io/unix/sockets.c +++ b/network_io/unix/sockets.c @@ -343,10 +343,13 @@ apr_status_t apr_socket_connect(apr_socket_t *sock, apr_sockaddr_t *sa) /* 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) { diff --git a/test/testsock.c b/test/testsock.c index 50aef5c2b..e8d3acb22 100644 --- a/test/testsock.c +++ b/test/testsock.c @@ -267,8 +267,11 @@ 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; + APR_ASSERT_SUCCESS(tc, "create subpool", apr_pool_create(&subp, p)); + ld = setup_socket(tc); APR_ASSERT_SUCCESS(tc, @@ -276,7 +279,7 @@ static void test_get_addr(abts_case *tc, void *data) 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 +305,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 +325,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) -- cgit v1.2.1 From 3eceb544cf72f293ab7671e280ecd2aacaa0d2d2 Mon Sep 17 00:00:00 2001 From: Rainer Jung Date: Wed, 29 Sep 2010 15:43:24 +0000 Subject: Update config.guess and config.sub from http://git.savannah.gnu.org/cgit/config.git. Use same version which has been put into 1.4, 1.5 and trunk branches. Apply to 1.3 apr branch as well, because 1.3 apr-util releases might be "buildconf" against apr 1.3. Then apr-util and expat pull those outdated files in from apr. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1002688 13f79535-47bb-0310-9956-ffa450edef68 --- build/config.guess | 296 +++++++++++++++++++++++++++-------------------------- build/config.sub | 215 +++++++++++++++++++++++++++++--------- 2 files changed, 318 insertions(+), 193 deletions(-) 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 . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# Originally written by Per Bothner. Please send patches (context +# diff format) to 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 - #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 . 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 ." 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*) -- cgit v1.2.1 From db678fa7b86fc9b267d4b2b23d3370ea101aa5d4 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Fri, 1 Oct 2010 02:22:53 +0000 Subject: fixed NetWare expat build. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1003357 13f79535-47bb-0310-9956-ffa450edef68 --- build/NWGNUmakefile | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/build/NWGNUmakefile b/build/NWGNUmakefile index baf03d2fe..4e03f82c1 100644 --- a/build/NWGNUmakefile +++ b/build/NWGNUmakefile @@ -22,8 +22,7 @@ FILES_prebuild_headers = \ $(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 \ + $(APRUTIL)/xml/expat/lib/expat_config.h \ $(EOLIST) nlms :: $(APR)/aprlib.imp @@ -73,10 +72,6 @@ $(APRUTIL)/xml/expat/lib/%.h: $(subst /,\,$(APRUTIL))\xml\expat\lib\%.hnw @echo Creating $(subst /,\,$@) $(CP) $< $(subst /,\,$(APRUTIL))\xml\expat\lib\$(@F) -$(APRUTIL)/xml/expat/lib/%.h: $(subst /,\,$(APRUTIL))\xml\expat\lib\%.h.in - @echo Creating $(subst /,\,$@) - $(CP) $< $(subst /,\,$(APRUTIL))\xml\expat\lib\$(@F) - # # You can use this target if all that is needed is to copy files to the # installation area @@ -94,8 +89,7 @@ clean :: $(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 /,\,$(APRUTIL))\xml\expat\lib\expat_config.h $(DEL) $(subst /,\,$(APRUTIL))\xml\expat\lib\expat_config.h $(CHK) $(subst /,\,$(APR))\aprlib.imp $(DEL) $(subst /,\,$(APR))\aprlib.imp # -- cgit v1.2.1 From d1b21f6520d2522a7836b406764dfb77301c014a Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Tue, 5 Oct 2010 04:48:45 +0000 Subject: Resolve an irritating segv for those of us who deliberately have listeners on port 8021. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1004523 13f79535-47bb-0310-9956-ffa450edef68 --- test/testsock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/testsock.c b/test/testsock.c index e8d3acb22..41239d0e9 100644 --- a/test/testsock.c +++ b/test/testsock.c @@ -272,7 +272,8 @@ static void test_get_addr(abts_case *tc, void *data) APR_ASSERT_SUCCESS(tc, "create subpool", apr_pool_create(&subp, p)); - ld = setup_socket(tc); + if ((ld = setup_socket(tc)) != APR_SUCCESS) + return; APR_ASSERT_SUCCESS(tc, "get local address of bound socket", -- cgit v1.2.1 From 7da03333d870afa4d6a2f4bbb25a8e8257111c80 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Sat, 9 Oct 2010 19:00:22 +0000 Subject: Minor NetWare makefile fixes. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1006213 13f79535-47bb-0310-9956-ffa450edef68 --- NWGNUmakefile | 16 ++++++++++++++++ build/NWGNUenvironment.inc | 10 +++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/NWGNUmakefile b/NWGNUmakefile index 2a327981a..787e0b0a7 100644 --- a/NWGNUmakefile +++ b/NWGNUmakefile @@ -1,3 +1,19 @@ +# +# 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 # diff --git a/build/NWGNUenvironment.inc b/build/NWGNUenvironment.inc index f620594a4..7542a1f21 100644 --- a/build/NWGNUenvironment.inc +++ b/build/NWGNUenvironment.inc @@ -234,14 +234,14 @@ endif INSTALLBASE := $(INSTALL)\$(BASEDIR) INSTDEVDIRS := \ - $(INSTDIRS) \ + $(INSTDIRS) \ $(INSTALLBASE) \ $(INSTALLBASE)\include \ $(INSTALLBASE)\lib \ INSTDIRS += \ $(INSTALLBASE) \ - + else INSTALLBASE := $(INSTALL)\apr @@ -254,7 +254,7 @@ INSTDEVDIRS := \ INSTDIRS += \ $(INSTALLBASE) \ -endif +endif # # Declare Command and tool macros here @@ -289,9 +289,9 @@ CHKNOT = $(CMD) if not exist # APR = $(APR_WORK) -APRTEST = $(APR_WORK)/test +APRTEST = $(APR)/test APRUTIL = $(APU_WORK) -APULDAP = $(APU_WORK)/ldap +APULDAP = $(APRUTIL)/ldap XML = $(APRUTIL)/xml # -- cgit v1.2.1 From 626e54d1fa134bb909a594dfda9fe08f7fee03bc Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Sun, 17 Oct 2010 20:50:57 +0000 Subject: April 3, 2010 is when the site was updated to point to 1.3.12, after a drawn out release/mirror cycle git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1023575 13f79535-47bb-0310-9956-ffa450edef68 --- STATUS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1 From ce35ba817ce6b8c8881c2dc21ab44d5dd9674885 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Wed, 8 Dec 2010 17:16:58 +0000 Subject: Fixed NetWare signal defines to match with newer NDKs. Also fixed some comments and indents (sync'd with APR 1.5.x). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1043532 13f79535-47bb-0310-9956-ffa450edef68 --- include/arch/netware/apr_private.h | 75 ++++++++++++++++++++------------------ 1 file changed, 39 insertions(+), 36 deletions(-) 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 + +/* Pick up privately consumed headers */ +#include + +/* Include alloca.h to get compiler-dependent defines */ +#include #include #include @@ -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 #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. -- cgit v1.2.1 From 674a0b477fe3b2c0b4eec96b63483da40b7952a1 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Sat, 25 Dec 2010 13:54:05 +0000 Subject: Removed define obsolete since r93260. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1052786 13f79535-47bb-0310-9956-ffa450edef68 --- build/apr_hints.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/apr_hints.m4 b/build/apr_hints.m4 index a11ae0268..2dcc9559d 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]) -- cgit v1.2.1 From 69696e22bd4258a9a998b8df728157db9b62a20b Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Sat, 25 Dec 2010 14:41:59 +0000 Subject: Removed stuff defined in expat.h; moved license to top. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1052791 13f79535-47bb-0310-9956-ffa450edef68 --- include/arch/netware/apr_arch_pre_nw.h | 36 ++++++++++++---------------------- 1 file changed, 13 insertions(+), 23 deletions(-) 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 - -#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 + +#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 -- cgit v1.2.1 From 316c1d41ff1845cc6fcc4ce85e33a1055eded616 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Fri, 18 Feb 2011 11:37:42 +0000 Subject: Axed C++ comments and tabs. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1071970 13f79535-47bb-0310-9956-ffa450edef68 --- build/aplibtool.c | 6 +- file_io/os2/readwrite.c | 4 +- file_io/win32/pipe.c | 28 ++++----- file_io/win32/readwrite.c | 2 +- include/arch/netware/apr_arch_threadproc.h | 12 ++-- include/arch/os2/apr_arch_file_io.h | 13 ++-- include/arch/win32/apr_arch_file_io.h | 4 +- include/arch/win32/apr_arch_misc.h | 95 +++++++++++++++--------------- locks/os2/proc_mutex.c | 2 +- threadproc/netware/thread.c | 53 ++++++++--------- 10 files changed, 111 insertions(+), 108 deletions(-) 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/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..0c12fdafa 100644 --- a/file_io/win32/pipe.c +++ b/file_io/win32/pipe.c @@ -43,8 +43,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 +81,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 +138,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 +153,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 +224,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/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/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/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/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() -- cgit v1.2.1 From 836784b068cd85bbefa8231a27200d4720c3a0f0 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Fri, 18 Feb 2011 12:15:34 +0000 Subject: Disable getpass() for HP-UX platform (PR49496). Reported by rajeshkc yahoo.com. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1071978 13f79535-47bb-0310-9956-ffa450edef68 --- passwd/apr_getpass.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/passwd/apr_getpass.c b/passwd/apr_getpass.c index bc153df60..91a3f7008 100644 --- a/passwd/apr_getpass.c +++ b/passwd/apr_getpass.c @@ -49,8 +49,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 -- cgit v1.2.1 From 3788c4984df08d8494f14220243a622397056186 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Sat, 26 Feb 2011 10:46:16 +0000 Subject: Axed C++ comments and tabs. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1074822 13f79535-47bb-0310-9956-ffa450edef68 --- locks/netware/thread_rwlock.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; -- cgit v1.2.1 From 94ff72f6523a3eb070b78e216c5f1afff6eae87f Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Wed, 2 Mar 2011 16:21:26 +0000 Subject: Added require prototypes conditionally to CFLAGS for NetWare. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1076277 13f79535-47bb-0310-9956-ffa450edef68 --- build/NWGNUenvironment.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/NWGNUenvironment.inc b/build/NWGNUenvironment.inc index 7542a1f21..a025d0b3a 100644 --- a/build/NWGNUenvironment.inc +++ b/build/NWGNUenvironment.inc @@ -164,6 +164,10 @@ 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 -- cgit v1.2.1 From 40c61f3fee82067a96a16257ec2cc9a5741407b8 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Wed, 2 Mar 2011 22:19:23 +0000 Subject: Commented NetWare build debug output which breaks make 3.82. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1076435 13f79535-47bb-0310-9956-ffa450edef68 --- build/NWGNUtail.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/NWGNUtail.inc b/build/NWGNUtail.inc index 2179a5673..1acf6271d 100644 --- a/build/NWGNUtail.inc +++ b/build/NWGNUtail.inc @@ -7,7 +7,7 @@ # If we are going to create an nlm, make sure we have assigned variables to # use during the link. # -echo NLM_NAME=$(NLM_NAME) +#echo NLM_NAME=$(NLM_NAME) ifndef NLM_NAME NLM_NAME = $(TARGET_nlm) endif -- cgit v1.2.1 From 992d102932d1b28e963cf2ff3a808a738144a465 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Thu, 10 Mar 2011 00:07:06 +0000 Subject: Added missing prototypes for NetWare. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1080063 13f79535-47bb-0310-9956-ffa450edef68 --- include/arch/netware/apr_arch_file_io.h | 3 +++ misc/netware/libprews.c | 1 + 2 files changed, 4 insertions(+) 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/misc/netware/libprews.c b/misc/netware/libprews.c index 624bf22cf..82b3eca8c 100644 --- a/misc/netware/libprews.c +++ b/misc/netware/libprews.c @@ -22,6 +22,7 @@ #include "apr_pools.h" #include "apr_private.h" +#include "apr_arch_internal_time.h" /* library-private data...*/ -- cgit v1.2.1 From bf809685d8095ceb83f8e2fc2bd7daa98e3b776d Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Thu, 10 Mar 2011 00:48:05 +0000 Subject: Fixed compilation when APR_HAVE_STRUCT_RLIMIT=0. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1080074 13f79535-47bb-0310-9956-ffa450edef68 --- threadproc/netware/proc.c | 20 +++++++++++++++++--- threadproc/unix/proc.c | 5 ++++- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/threadproc/netware/proc.c b/threadproc/netware/proc.c index 026ca6fd7..533d774e1 100644 --- a/threadproc/netware/proc.c +++ b/threadproc/netware/proc.c @@ -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/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 */ + -- cgit v1.2.1 From 51950c49f7f5c7283bf0a46a3b364d359608185c Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Thu, 10 Mar 2011 00:59:42 +0000 Subject: Fixed NetWare prototype warnings. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1080082 13f79535-47bb-0310-9956-ffa450edef68 --- threadproc/netware/proc.c | 2 +- threadproc/netware/signals.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/threadproc/netware/proc.c b/threadproc/netware/proc.c index 533d774e1..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; 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 #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) { -- cgit v1.2.1 From d499847f049caf9c106f77e14f18d2d1c34d1d9b Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Thu, 10 Mar 2011 01:33:24 +0000 Subject: Fixed some NetWare compiler warnings. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1080096 13f79535-47bb-0310-9956-ffa450edef68 --- misc/netware/start.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) 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; } -- cgit v1.2.1 From c477de4c9d640a0e6d5dee32614b68c2dd8a7041 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Thu, 10 Mar 2011 02:10:14 +0000 Subject: Added missing include paths for added apr_ldap.h. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1080104 13f79535-47bb-0310-9956-ffa450edef68 --- NWGNUmakefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NWGNUmakefile b/NWGNUmakefile index 787e0b0a7..7205d0825 100644 --- a/NWGNUmakefile +++ b/NWGNUmakefile @@ -47,7 +47,9 @@ XINCDIRS += \ $(APR)/include/arch/unix \ $(APR)/memory/unix \ $(APR)/random/unix \ + $(APRUTIL)/include \ $(APRUTIL)/xml \ + $(LDAPSDK)/inc \ $(EOLIST) # -- cgit v1.2.1 From beab94eaa5297943f3c7594aff5308f7167099c2 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Thu, 10 Mar 2011 02:17:06 +0000 Subject: Make functions static (backport r991753). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1080106 13f79535-47bb-0310-9956-ffa450edef68 --- network_io/win32/sockopt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -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; -- cgit v1.2.1 From 54d824269c29b54f82d16bfdb18b005299b51d56 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Thu, 10 Mar 2011 16:42:22 +0000 Subject: Fixed NetWare apr.h defines and formatting. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1080271 13f79535-47bb-0310-9956-ffa450edef68 --- include/apr.hnw | 277 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 139 insertions(+), 138 deletions(-) diff --git a/include/apr.hnw b/include/apr.hnw index 2b2d091e9..5de28994a 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 @@ -54,15 +55,15 @@ #include #ifdef USE_WINSOCK #include +#ifdef NW_BUILD_IPV6 +#include +#endif #else #include +#include #endif #include -#ifdef NW_BUILD_IPV6 -#include -#endif - #define _POSIX_THREAD_SAFE_FUNCTIONS 1 #define READDIR_IS_THREAD_SAFE 1 @@ -74,161 +75,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 +260,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 +350,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 +361,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 +369,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 +393,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, -- cgit v1.2.1 From 78f929c6c52cfd9750abf6b1ba779f86f8460c07 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Fri, 18 Mar 2011 01:08:15 +0000 Subject: NetWare build overhaul in order to compile on Linux. Backport of all recent changes to trunk. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1082778 13f79535-47bb-0310-9956-ffa450edef68 --- NWGNUmakefile | 76 ++++++------ build/NWGNUenvironment.inc | 166 ++++++++++++++----------- build/NWGNUhead.inc | 64 +++++----- build/NWGNUmakefile | 95 ++++++--------- build/NWGNUtail.inc | 297 ++++++++++++++++++++++++++------------------- build/make_nw_export.awk | 2 +- test/NWGNUaprtest | 14 +-- test/NWGNUechod | 6 +- test/NWGNUglobalmutexchild | 14 +-- test/NWGNUmakefile | 8 +- test/NWGNUmod_test | 14 +-- test/NWGNUproc_child | 14 +-- test/NWGNUreadchild | 14 +-- test/NWGNUsockchild | 14 +-- test/NWGNUsockperf | 6 +- test/NWGNUtestatmc | 14 +-- test/NWGNUtryread | 14 +-- test/nw_misc.c | 1 + 18 files changed, 443 insertions(+), 390 deletions(-) diff --git a/NWGNUmakefile b/NWGNUmakefile index 7205d0825..404e75cfe 100644 --- a/NWGNUmakefile +++ b/NWGNUmakefile @@ -23,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 @@ -47,8 +54,8 @@ XINCDIRS += \ $(APR)/include/arch/unix \ $(APR)/memory/unix \ $(APR)/random/unix \ - $(APRUTIL)/include \ - $(APRUTIL)/xml \ + $(APU)/include \ + $(APU)/xml \ $(LDAPSDK)/inc \ $(EOLIST) @@ -136,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 = @@ -148,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 @@ -163,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 @@ -203,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) # @@ -267,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 @@ -363,32 +370,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 # @@ -397,7 +404,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 @@ -406,15 +413,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\$($@ + @echo $(DL)GEN $@$(DL) + $(AWK) -v EXPPREFIX=APR$(VERSION_MAJMIN) -f $^ | $(SORT) >$@ -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)/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) +%.h: %.hnw + @echo $(DL)Creating $@$(DL) + $(call COPY,$<,$@) -$(APRUTIL)/xml/expat/lib/%.h: $(subst /,\,$(APRUTIL))\xml\expat\lib\%.hnw - @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_config.h $(DEL) $(subst /,\,$(APRUTIL))\xml\expat\lib\expat_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 1acf6271d..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/make_nw_export.awk b/build/make_nw_export.awk index cf44e5b07..239e88298 100644 --- a/build/make_nw_export.awk +++ b/build/make_nw_export.awk @@ -65,7 +65,7 @@ function add_symbol (sym_name) { next } -/^[ \t]*AP[RUI]?_DECLARE_DATA .*;$/ { +/^[ \t]*AP[RUI]?_DECLARE_DATA .*;/ { varname = $NF; gsub( /[*;]/, "", varname); gsub( /\[.*\]/, "", varname); 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 #include #include #include -- cgit v1.2.1 From 369bacc024067290d3b8d78b819f704f8ce41086 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Sat, 19 Mar 2011 03:13:19 +0000 Subject: Removed libprews.o from aprlib. This file should only be linked into the NLM, and not be a member of the static lib. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1083137 13f79535-47bb-0310-9956-ffa450edef68 --- NWGNUmakefile | 1 - 1 file changed, 1 deletion(-) diff --git a/NWGNUmakefile b/NWGNUmakefile index 404e75cfe..dbadf5546 100644 --- a/NWGNUmakefile +++ b/NWGNUmakefile @@ -323,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 \ -- cgit v1.2.1 From ca669f00c300df8b1630ffe952d20c45d252b731 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Mon, 21 Mar 2011 19:35:24 +0000 Subject: Backport of blocking MSVC pragmas (r892909). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1083914 13f79535-47bb-0310-9956-ffa450edef68 --- passwd/apr_getpass.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/passwd/apr_getpass.c b/passwd/apr_getpass.c index 91a3f7008..a07041b66 100644 --- a/passwd/apr_getpass.c +++ b/passwd/apr_getpass.c @@ -34,9 +34,13 @@ #include #endif #if APR_HAVE_CONIO_H +#ifdef _MSC_VER #pragma warning(disable: 4032) #include #pragma warning(default: 4032) +#else +#include +#endif #endif #if APR_HAVE_STDLIB_H #include -- cgit v1.2.1 From f22871178e640c3acf23be2f401cbda13085393c Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Mon, 21 Mar 2011 23:08:04 +0000 Subject: Fixed issue when compiling serf due to odd defines. The NetWare winsock2 header defines accept which breaks compilation of serf lib, therefore we now undef. Also removed obsolete include of novsock2.h in libprews.c. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1084016 13f79535-47bb-0310-9956-ffa450edef68 --- include/apr.hnw | 5 +++++ misc/netware/libprews.c | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/apr.hnw b/include/apr.hnw index 5de28994a..765280ff6 100644 --- a/include/apr.hnw +++ b/include/apr.hnw @@ -55,6 +55,11 @@ #include #ifdef USE_WINSOCK #include +/* The NetWare Winsock2 header novsock2.h has macros which define + * accept and connect, but these clash with serf, so we undef them + */ +#undef accept +#undef connect #ifdef NW_BUILD_IPV6 #include #endif diff --git a/misc/netware/libprews.c b/misc/netware/libprews.c index 82b3eca8c..6e37ccf1d 100644 --- a/misc/netware/libprews.c +++ b/misc/netware/libprews.c @@ -16,9 +16,6 @@ #include #include #include -#ifdef USE_WINSOCK -#include "novsock2.h" -#endif #include "apr_pools.h" #include "apr_private.h" -- cgit v1.2.1 From 6e0aa3519924abba7233f14fd7ee6064164dcd23 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Tue, 22 Mar 2011 01:23:11 +0000 Subject: Reverted undef hack from r1084016 - needs more testing. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1084046 13f79535-47bb-0310-9956-ffa450edef68 --- include/apr.hnw | 5 ----- 1 file changed, 5 deletions(-) diff --git a/include/apr.hnw b/include/apr.hnw index 765280ff6..5de28994a 100644 --- a/include/apr.hnw +++ b/include/apr.hnw @@ -55,11 +55,6 @@ #include #ifdef USE_WINSOCK #include -/* The NetWare Winsock2 header novsock2.h has macros which define - * accept and connect, but these clash with serf, so we undef them - */ -#undef accept -#undef connect #ifdef NW_BUILD_IPV6 #include #endif -- cgit v1.2.1 From 57ead8c26ca4319d5b19651192ad03498a68b7af Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Wed, 23 Mar 2011 11:24:36 +0000 Subject: Use the ComSpec environment var. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1084541 13f79535-47bb-0310-9956-ffa450edef68 --- build/NWGNUenvironment.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build/NWGNUenvironment.inc b/build/NWGNUenvironment.inc index 35c33b2bf..85c71492c 100644 --- a/build/NWGNUenvironment.inc +++ b/build/NWGNUenvironment.inc @@ -163,12 +163,11 @@ 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)) -ECHONL = cmd /c echo. 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)) -ECHONL = command /c echo. 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) -- cgit v1.2.1 From 1916c8e6a2807fd326d5421cca1abc0fa8ec487e Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Fri, 25 Mar 2011 16:45:00 +0000 Subject: Added blocking for MSVC pragma. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1085462 13f79535-47bb-0310-9956-ffa450edef68 --- atomic/win32/apr_atomic.c | 2 ++ 1 file changed, 2 insertions(+) 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) { -- cgit v1.2.1 From cb738f24882f5a042f6377a92ce8ff69d73a561c Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Fri, 25 Mar 2011 16:55:59 +0000 Subject: Added prototype for getpid. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1085469 13f79535-47bb-0310-9956-ffa450edef68 --- file_io/win32/pipe.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/file_io/win32/pipe.c b/file_io/win32/pipe.c index 0c12fdafa..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 #endif +#if APR_HAVE_PROCESS_H +#include /* for getpid() on Win32 */ +#endif #include "apr_arch_misc.h" APR_DECLARE(apr_status_t) apr_file_pipe_timeout_set(apr_file_t *thepipe, -- cgit v1.2.1 From 36d465ce32a7d36b4d27e0b48fc7c4b6ec723778 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Sat, 26 Mar 2011 06:24:48 +0000 Subject: Moved apr_os_uuid_get prototype out of APR_HAS_DSO block. This avoids a missing prototype warning since the function's C code gets compiled independent of APR_HAS_DSO. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1085655 13f79535-47bb-0310-9956-ffa450edef68 --- include/apr_portable.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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. -- cgit v1.2.1 From f59b2a8ebf9b3b7910f203bb0e8698edaf9bf100 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Sat, 26 Mar 2011 07:06:18 +0000 Subject: Fixed process.h detection with configure builds. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1085660 13f79535-47bb-0310-9956-ffa450edef68 --- configure.in | 1 + include/apr.h.in | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 76d1bb5fd..b8193e019 100644 --- a/configure.in +++ b/configure.in @@ -1343,6 +1343,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) diff --git a/include/apr.h.in b/include/apr.h.in index 9f1fb6f99..c77429ce6 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@ -- cgit v1.2.1 From bd0dd9d3d456559c65fbae6646714529d4083036 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Sun, 27 Mar 2011 13:57:28 +0000 Subject: Set APR_HAS_OS_UUID=1 for Windows builds. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1085937 13f79535-47bb-0310-9956-ffa450edef68 --- configure.in | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.in b/configure.in index b8193e019..58ec60254 100644 --- a/configure.in +++ b/configure.in @@ -485,6 +485,7 @@ case $host in ac_cv_file__dev_zero="no" ac_cv_func_setpgrp_void="no" apr_cv_tcp_nodelay_with_cork="no" + apr_cv_osuuid="yes" enable_threads="system_threads" eolstr="\\n" proc_mutex_is_global=1 -- cgit v1.2.1 From 3ddd6951f327d22b84ed953ed2a458ad797ee855 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Sun, 27 Mar 2011 16:00:39 +0000 Subject: Revert r1085937 per Jeff's suggestion. Such defines should go into build/apr_hints.m4. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1085974 13f79535-47bb-0310-9956-ffa450edef68 --- configure.in | 1 - 1 file changed, 1 deletion(-) diff --git a/configure.in b/configure.in index 58ec60254..b8193e019 100644 --- a/configure.in +++ b/configure.in @@ -485,7 +485,6 @@ case $host in ac_cv_file__dev_zero="no" ac_cv_func_setpgrp_void="no" apr_cv_tcp_nodelay_with_cork="no" - apr_cv_osuuid="yes" enable_threads="system_threads" eolstr="\\n" proc_mutex_is_global=1 -- cgit v1.2.1 From 2b5f66c31ee7ef707e7fb04c28c575885ac4a5a5 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Sun, 27 Mar 2011 16:58:30 +0000 Subject: Moved platform-specific stuff to build/apr_hints.m4. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1085987 13f79535-47bb-0310-9956-ffa450edef68 --- build/apr_hints.m4 | 22 +++++++++++++++------- configure.in | 7 ++----- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/build/apr_hints.m4 b/build/apr_hints.m4 index 2dcc9559d..667a9e70a 100644 --- a/build/apr_hints.m4 +++ b/build/apr_hints.m4 @@ -451,13 +451,21 @@ dnl # Not a problem in 10.20. Otherwise, who knows? 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]) + 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]) + ;; esac fi diff --git a/configure.in b/configure.in index b8193e019..3a1b056ea 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" ;; -- cgit v1.2.1 From e3e81da330cce738f24fe5e2debebb8e0e00613e Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Mon, 28 Mar 2011 05:32:20 +0000 Subject: Fixed protection of our own struct iovec define. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1086125 13f79535-47bb-0310-9956-ffa450edef68 --- include/apr_want.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) 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 -- cgit v1.2.1 From 6217ed4e04edee682ba0b7637b2a9d6843f3695b Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Tue, 29 Mar 2011 12:57:36 +0000 Subject: Backport some configure magic from HEAD. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1086571 13f79535-47bb-0310-9956-ffa450edef68 --- configure.in | 18 ++++++++++++++---- include/apr.h.in | 8 ++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/configure.in b/configure.in index 3a1b056ea..2c36ede92 100644 --- a/configure.in +++ b/configure.in @@ -2484,13 +2484,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/include/apr.h.in b/include/apr.h.in index c77429ce6..1ff814ed6 100644 --- a/include/apr.h.in +++ b/include/apr.h.in @@ -239,12 +239,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. @@ -381,7 +381,7 @@ typedef apr_uint32_t apr_uintptr_t; * * */ -#define APR_THREAD_FUNC +#define APR_THREAD_FUNC @apr_thread_func@ /** * The public APR functions are declared with APR_DECLARE(), so they may -- cgit v1.2.1 From f3c4053057406d416aa9eeb985fdb35c33183106 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Tue, 29 Mar 2011 13:38:21 +0000 Subject: NetWare awk export script fixes and cleanup. Remove trailing line endings with Linux builds; sync'd add_symbol function with HEAD and moved to top; added License header where missing. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1086579 13f79535-47bb-0310-9956-ffa450edef68 --- build/make_nw_export.awk | 53 ++++++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/build/make_nw_export.awk b/build/make_nw_export.awk index 239e88298..32a1399e0 100644 --- a/build/make_nw_export.awk +++ b/build/make_nw_export.awk @@ -1,33 +1,40 @@ +# 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") + printf(" (%s)\n", EXPPREFIX) +} + +function add_symbol(sym_name) { + found++ + sub(" ", "", sym_name) + printf(" %s,\n", 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 +44,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) @@ -66,14 +72,13 @@ function add_symbol (sym_name) { } /^[ \t]*AP[RUI]?_DECLARE_DATA .*;/ { - varname = $NF; - gsub( /[*;]/, "", varname); - gsub( /\[.*\]/, "", varname); - add_symbol(varname); + gsub(/[*;\n\r]/, "", $NF) + gsub(/\[.*\]/, "", $NF) + add_symbol($NF) } - END { - add_symbol("apr_wait_for_io_or_timeout"); -# printf(" %s", line) + add_symbol("apr_wait_for_io_or_timeout"); +# printf("\n\n#found: %d symbols.\n", found) } + -- cgit v1.2.1 From 3d9bdb7e4c866b7484f4b169f6090534ceee1c5a Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Tue, 29 Mar 2011 14:37:37 +0000 Subject: Backport some more configure magic from HEAD (r1083242). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1086600 13f79535-47bb-0310-9956-ffa450edef68 --- build/apr_hints.m4 | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/build/apr_hints.m4 b/build/apr_hints.m4 index 667a9e70a..cd79a1359 100644 --- a/build/apr_hints.m4 +++ b/build/apr_hints.m4 @@ -440,17 +440,6 @@ 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(CPPFLAGS, [-DWIN32]) APR_ADDTO(LDFLAGS, [-Wl,--enable-auto-import,--subsystem,console]) APR_SETIFNULL(have_unicode_fs, [1]) @@ -465,6 +454,18 @@ dnl # Not a problem in 10.20. Otherwise, who knows? 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 -- cgit v1.2.1 From 084b6f6f16a7d0873918714162883833c1afc4cb Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Tue, 29 Mar 2011 15:25:00 +0000 Subject: Backport Windows apr.h.in stuff from HEAD (r892148). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1086625 13f79535-47bb-0310-9956-ffa450edef68 --- include/apr.h.in | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/include/apr.h.in b/include/apr.h.in index 1ff814ed6..35fff75c4 100644 --- a/include/apr.h.in +++ b/include/apr.h.in @@ -117,8 +117,39 @@ */ #if APR_HAVE_WINDOWS_H -#include +/* 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 +#endif /* ndef _WINDOWS_ */ +#endif /* APR_HAVE_WINDOWS_H */ #if APR_HAVE_WINSOCK2_H #include -- cgit v1.2.1 From ddd44da6fd55ee6bf4e6a32618c41eadde91995c Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Tue, 29 Mar 2011 15:38:00 +0000 Subject: Added __MSVCRT__ for MinGW builds. This is required to get the prototype for _beginthreadex(). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1086631 13f79535-47bb-0310-9956-ffa450edef68 --- build/apr_hints.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/apr_hints.m4 b/build/apr_hints.m4 index cd79a1359..7e297067d 100644 --- a/build/apr_hints.m4 +++ b/build/apr_hints.m4 @@ -440,7 +440,7 @@ dnl # Not a problem in 10.20. Otherwise, who knows? APR_ADDTO(CPPFLAGS, [-DCYGWIN]) ;; *mingw*) - APR_ADDTO(CPPFLAGS, [-DWIN32]) + 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]) -- cgit v1.2.1 From 07b7277e3b6fa6b0bdc462c965b4055fc8af0d05 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Tue, 29 Mar 2011 15:49:27 +0000 Subject: Fixed apr_ino_t typedef for MinGW builds. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1086633 13f79535-47bb-0310-9956-ffa450edef68 --- configure.in | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/configure.in b/configure.in index 2c36ede92..0b867ae22 100644 --- a/configure.in +++ b/configure.in @@ -1654,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 -- cgit v1.2.1 From 12dc2c7c87faded6cc948ed1b377d774c46f4f68 Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Fri, 1 Apr 2011 00:29:34 +0000 Subject: Removed dependency on sort command for export list. Added a shell sort function to the NetWare export script which is only few ms slower than the external sort command; this makes the export list now identical on all build platforms. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1087521 13f79535-47bb-0310-9956-ffa450edef68 --- build/NWGNUenvironment.inc | 1 - build/NWGNUmakefile | 2 +- build/make_nw_export.awk | 34 ++++++++++++++++++++++++++++------ 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/build/NWGNUenvironment.inc b/build/NWGNUenvironment.inc index 85c71492c..c15e003b4 100644 --- a/build/NWGNUenvironment.inc +++ b/build/NWGNUenvironment.inc @@ -144,7 +144,6 @@ LIB = mwldnlm -type library -w nocmdline # Setup build tools AWK = awk -SORT = sort # # Declare Command and tool macros here diff --git a/build/NWGNUmakefile b/build/NWGNUmakefile index fe757174a..980b4d5a0 100644 --- a/build/NWGNUmakefile +++ b/build/NWGNUmakefile @@ -29,7 +29,7 @@ nlms :: $(APR)/aprlib.imp $(APR)/aprlib.imp : make_nw_export.awk nw_export.i @echo $(DL)GEN $@$(DL) - $(AWK) -v EXPPREFIX=APR$(VERSION_MAJMIN) -f $^ | $(SORT) >$@ + $(AWK) -v EXPPREFIX=APR$(VERSION_MAJMIN) -f $^ >$@ nw_export.i : nw_export.inc $(APU)/build/nw_apu_export.inc $(FILES_prebuild_headers) cc.opt @echo $(DL)GEN $@$(DL) diff --git a/build/make_nw_export.awk b/build/make_nw_export.awk index 32a1399e0..b3e948344 100644 --- a/build/make_nw_export.awk +++ b/build/make_nw_export.awk @@ -13,18 +13,17 @@ # 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(" (%s)\n", EXPPREFIX) + add_symbol("apr_wait_for_io_or_timeout") } function add_symbol(sym_name) { - found++ sub(" ", "", sym_name) - printf(" %s,\n", sym_name) + exports[++idx] = sym_name } # List of functions that we don't support, yet?? @@ -77,8 +76,31 @@ function add_symbol(sym_name) { add_symbol($NF) } + END { - add_symbol("apr_wait_for_io_or_timeout"); -# printf("\n\n#found: %d symbols.\n", found) + 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]) } -- cgit v1.2.1 From 3f98c47ee05485163dc0f366ed73eaae26e3e56a Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Sat, 2 Apr 2011 22:31:46 +0000 Subject: Added another Netware header for prototypes. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1088166 13f79535-47bb-0310-9956-ffa450edef68 --- include/apr.hnw | 1 + 1 file changed, 1 insertion(+) diff --git a/include/apr.hnw b/include/apr.hnw index 5de28994a..d0c77e00e 100644 --- a/include/apr.hnw +++ b/include/apr.hnw @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include -- cgit v1.2.1 From 023259c8332bbb9ae7f2c4c932d0c7c0b4a98e4f Mon Sep 17 00:00:00 2001 From: Guenter Knauf Date: Sun, 3 Apr 2011 03:06:09 +0000 Subject: Added header to catch export symbols. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.3.x@1088201 13f79535-47bb-0310-9956-ffa450edef68 --- build/NWGNUmakefile | 1 + 1 file changed, 1 insertion(+) diff --git a/build/NWGNUmakefile b/build/NWGNUmakefile index 980b4d5a0..68fff198b 100644 --- a/build/NWGNUmakefile +++ b/build/NWGNUmakefile @@ -45,6 +45,7 @@ cc.opt : NWGNUmakefile $(APR_WORK)/build/NWGNUenvironment.inc $(APR_WORK)/build/ @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)" "" -- cgit v1.2.1