Assembla home | Assembla project page
 

root/BePorts/trunk/dev-libs/apr/apr-0.9.x.diff

Revision 48, 74.2 kB (checked in by andreasf, 5 months ago)

Disabled some more BeOS workarounds.

  • network_io/unix/sockopt.c

    old new  
    2121static apr_status_t soblock(int sd) 
    2222{ 
    2323/* BeOS uses setsockopt at present for non blocking... */ 
    24 #ifndef BEOS 
     24#if !defined(BEOS) || defined(__HAIKU__) 
    2525    int fd_flags; 
    2626 
    2727    fd_flags = fcntl(sd, F_GETFL, 0); 
     
    4747 
    4848static apr_status_t sononblock(int sd) 
    4949{ 
    50 #ifndef BEOS 
     50#if !defined(BEOS) || defined(__HAIKU__) 
    5151    int fd_flags; 
    5252 
    5353    fd_flags = fcntl(sd, F_GETFL, 0); 
     
    221221         * As it can't be turned off we might as well check if they're asking 
    222222         * for it to be turned on! 
    223223         */ 
    224 #ifdef BEOS 
     224#if defined(BEOS) && !defined(__HAIKU__) 
    225225        if (on == 1) 
    226226            return APR_SUCCESS; 
    227227        else 
  • network_io/unix/sockaddr.c

    old new  
    458458    apr_sockaddr_t *prev_sa; 
    459459    int curaddr; 
    460460#if APR_HAS_THREADS && !defined(GETHOSTBYNAME_IS_THREAD_SAFE) && \ 
    461     defined(HAVE_GETHOSTBYNAME_R) && !defined(BEOS) 
     461    defined(HAVE_GETHOSTBYNAME_R) && !defined(BEOS) // CHECKME 
    462462#ifdef GETHOSTBYNAME_R_HOSTENT_DATA 
    463463    struct hostent_data hd; 
    464464#else 
     
    489489    } 
    490490    else { 
    491491#if APR_HAS_THREADS && !defined(GETHOSTBYNAME_IS_THREAD_SAFE) && \ 
    492     defined(HAVE_GETHOSTBYNAME_R) && !defined(BEOS) 
     492    defined(HAVE_GETHOSTBYNAME_R) && !defined(BEOS) // CHECKME 
    493493#if defined(GETHOSTBYNAME_R_HOSTENT_DATA) 
    494494        /* AIX, HP/UX, D/UX et alia */ 
    495495        gethostbyname_r(hostname, &hs, &hd); 
     
    560560 
    561561    if ((masked = flags & (APR_IPV4_ADDR_OK | APR_IPV6_ADDR_OK))) { 
    562562        if (!hostname || 
    563             family != AF_UNSPEC || 
     563            family != APR_UNSPEC || 
    564564            masked == (APR_IPV4_ADDR_OK | APR_IPV6_ADDR_OK)) { 
    565565            return APR_EINVAL; 
    566566        } 
     
    656656    return APR_SUCCESS; 
    657657#else 
    658658#if APR_HAS_THREADS && !defined(GETHOSTBYADDR_IS_THREAD_SAFE) && \ 
    659     defined(HAVE_GETHOSTBYADDR_R) && !defined(BEOS) 
     659    defined(HAVE_GETHOSTBYADDR_R) && !defined(BEOS) // CHECKME 
    660660#ifdef GETHOSTBYNAME_R_HOSTENT_DATA 
    661661    struct hostent_data hd; 
    662662#else 
  • network_io/unix/sockets.c

    old new  
    2121#include "apr_portable.h" 
    2222#include "apr_arch_inherit.h" 
    2323 
    24 #if defined(BEOS) && !defined(BEOS_BONE) 
     24#if defined(BEOS) && !defined(BEOS_BONE) && !defined(__HAIKU__) 
    2525#define close closesocket 
    2626#endif 
    2727 
     
    4747    apr_sockaddr_vars_set(sock->local_addr, family, 0); 
    4848    apr_sockaddr_vars_set(sock->remote_addr, family, 0); 
    4949    sock->netmask = 0; 
    50 #if defined(BEOS) && !defined(BEOS_BONE) 
     50#if defined(BEOS) && !defined(BEOS_BONE) && !defined(__HAIKU__) 
    5151    /* BeOS pre-BONE has TCP_NODELAY on by default and it can't be 
    5252     * switched off! 
    5353     */ 
  • network_io/beos/sendrecv.c

    old new  
    1515 */ 
    1616 
    1717#include "apr_private.h" 
    18 #if BEOS_BONE /* BONE uses the unix code - woohoo */ 
     18#if BEOS_BONE || defined(__HAIKU__) /* BONE uses the unix code - woohoo */ 
    1919#include "../unix/sendrecv.c" 
    2020#else 
    2121#include "apr_arch_networkio.h" 
  • include/arch/unix/apr_arch_file_io.h

    old new  
    6868#include <kernel/OS.h> 
    6969#endif 
    7070 
    71 #if BEOS_BONE 
     71#if defined(__HAIKU__) 
     72# include <sys/socket.h> 
     73#elif BEOS_BONE 
    7274# ifndef BONE7 
    7375  /* prior to BONE/7 fd_set & select were defined in sys/socket.h */ 
    7476#  include <sys/socket.h> 
  • include/apr_errno.h

    old new  
    11551155/** operation would block */ 
    11561156#if !defined(EWOULDBLOCK) || !defined(EAGAIN) 
    11571157#define APR_STATUS_IS_EAGAIN(s)         ((s) == APR_EAGAIN) 
     1158#elif BEOS 
     1159#define APR_STATUS_IS_EAGAIN(s)         ((s) == APR_EAGAIN) 
    11581160#elif (EWOULDBLOCK == EAGAIN) 
    11591161#define APR_STATUS_IS_EAGAIN(s)         ((s) == APR_EAGAIN) 
    11601162#else 
  • configure.in

    old new  
    219219dnl otherwise. 
    220220 
    221221case $host in 
    222     *os390
     222    *os390|*-haiku*
    223223        if test "$ac_test_CFLAGS" != set; then 
    224224           APR_REMOVEFROM(CFLAGS,-g) 
    225225        fi 
     
    403403             ;; 
    404404       esac 
    405405       ;; 
     406   *haiku*) 
     407       OSDIR="beos" 
     408       APR_ADDTO(CPPFLAGS,-DBEOS) 
     409       enable_threads="system_threads" 
     410       eolstr="\\n" 
     411       proc_mutex_is_global=1 
     412       file_as_socket="1" 
     413       ;; 
    406414   *os390) 
    407415       OSDIR="os390" 
    408416       eolstr="\\n" 
     
    12741282       ssize_t_fmt='#define APR_SSIZE_T_FMT "ld"' 
    12751283       size_t_fmt='#define APR_SIZE_T_FMT "lu"' 
    12761284       ;; 
    1277     *beos*
     1285    *beos*|*haiku*
    12781286        ssize_t_fmt='#define APR_SSIZE_T_FMT "ld"' 
    12791287        size_t_fmt='#define APR_SIZE_T_FMT "ld"' 
    12801288        ;; 
  • misc/unix/errorcodes.c

    old new  
    343343 * the prototype publically (doh!), so to avoid a build warning 
    344344 * we add a suitable prototype here. 
    345345 */ 
    346 #if defined(BEOS) 
     346#if defined(BEOS) && !defined(__HAIKU__) 
    347347const char *strerror_r(apr_status_t, char *, apr_size_t); 
    348348#endif 
    349349 
  • threadproc/beos/proc.c

    old new  
    365365} 
    366366 
    367367APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr, apr_int32_t what,  
    368                                                   void *limit) 
     368#ifdef APR_HAVE_STRUCT_RLIMIT 
     369                                                  struct rlimit 
     370#else 
     371                                                  void 
     372#endif 
     373                                                  *limit) 
    369374{ 
    370375    return APR_ENOTIMPL; 
    371376} 
  • build/config.guess

    old new  
    11#! /bin/sh 
    22# Attempt to guess a canonical system name. 
    33#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 
    4 #   2000, 2001, 2002, 2004 Free Software Foundation, Inc. 
     4#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 
     5#   Free Software Foundation, Inc. 
    56 
    6 timestamp='2002-03-20
     7timestamp='2008-01-08
    78 
    89# This file is free software; you can redistribute it and/or modify it 
    910# under the terms of the GNU General Public License as published by 
     
    1718# 
    1819# You should have received a copy of the GNU General Public License 
    1920# along with this program; if not, write to the Free Software 
    20 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
     21# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 
     22# 02110-1301, USA. 
    2123# 
    2224# As a special exception to the GNU General Public License, if you 
    2325# distribute this file as part of a program that contains a 
    2426# configuration script generated by Autoconf, you may include it under 
    2527# the same distribution terms that you use for the rest of that program. 
    2628 
    27 ##################################################################### 
    28 # This file contains changes for Apache, clearly marked below. 
    29 # These changes are hereby donated to the public domain. 
    30 ##################################################################### 
    3129 
    3230# Originally written by Per Bothner <per@bothner.com>. 
    3331# Please send patches to <config-patches@gnu.org>.  Submit a context 
     
    5856GNU config.guess ($timestamp) 
    5957 
    6058Originally written by Per Bothner. 
    61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 
    62 Free Software Foundation, Inc. 
     59Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 
     602002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 
    6361 
    6462This is free software; see the source for copying conditions.  There is NO 
    6563warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 
     
    7169while test $# -gt 0 ; do 
    7270  case $1 in 
    7371    --time-stamp | --time* | -t ) 
    74        echo "$timestamp" ; exit 0 ;; 
     72       echo "$timestamp" ; exit ;; 
    7573    --version | -v ) 
    76        echo "$version" ; exit 0 ;; 
     74       echo "$version" ; exit ;; 
    7775    --help | --h* | -h ) 
    78        echo "$usage"; exit 0 ;; 
     76       echo "$usage"; exit ;; 
    7977    -- )     # Stop option processing 
    8078       shift; break ;; 
    8179    - ) # Use stdin as input. 
     
    9391  exit 1 
    9492fi 
    9593 
     94trap 'exit 1' 1 2 15 
    9695 
    97 dummy=dummy-$$ 
    98 trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 
     96# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 
     97# compiler to aid in system detection is discouraged as it requires 
     98# temporary files to be created and, as you can see below, it is a 
     99# headache to deal with in a portable fashion. 
    99100 
    100 # CC_FOR_BUILD -- compiler used by this script. 
    101101# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 
    102102# use `HOST_CC' if defined, but it is deprecated. 
    103103 
    104 set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in 
    105  ,,)    echo "int dummy(){}" > $dummy.c ; 
     104# Portable tmp directory creation inspired by the Autoconf team. 
     105 
     106set_cc_for_build=' 
     107trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 
     108trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 
     109: ${TMPDIR=/tmp} ; 
     110 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 
     111 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 
     112 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 
     113 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 
     114dummy=$tmp/dummy ; 
     115tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 
     116case $CC_FOR_BUILD,$HOST_CC,$CC in 
     117 ,,)    echo "int x;" > $dummy.c ; 
    106118        for c in cc gcc c89 c99 ; do 
    107           ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; 
    108           if test $? = 0 ; then 
     119          if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 
    109120             CC_FOR_BUILD="$c"; break ; 
    110121          fi ; 
    111122        done ; 
    112         rm -f $dummy.c $dummy.o $dummy.rel ; 
    113123        if test x"$CC_FOR_BUILD" = x ; then 
    114124          CC_FOR_BUILD=no_compiler_found ; 
    115125        fi 
    116126        ;; 
    117127 ,,*)   CC_FOR_BUILD=$CC ;; 
    118128 ,*,*)  CC_FOR_BUILD=$HOST_CC ;; 
    119 esac
     129esac ; set_cc_for_build= ;
    120130 
    121131# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 
    122132# (ghazi@noc.rutgers.edu 1994-08-24) 
     
    147157        UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 
    148158            /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 
    149159        case "${UNAME_MACHINE_ARCH}" in 
     160            armeb) machine=armeb-unknown ;; 
    150161            arm*) machine=arm-unknown ;; 
    151162            sh3el) machine=shl-unknown ;; 
    152163            sh3eb) machine=sh-unknown ;; 
     164            sh5el) machine=sh5le-unknown ;; 
    153165            *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 
    154166        esac 
    155167        # The Operating System including object format, if it has switched 
     
    172184                ;; 
    173185        esac 
    174186        # The OS release 
    175         release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 
     187        # Debian GNU/NetBSD machines have a different userland, and 
     188        # thus, need a distinct triplet. However, they do not need 
     189        # kernel version information, so it can be replaced with a 
     190        # suitable tag, in the style of linux-gnu. 
     191        case "${UNAME_VERSION}" in 
     192            Debian*) 
     193                release='-gnu' 
     194                ;; 
     195            *) 
     196                release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 
     197                ;; 
     198        esac 
    176199        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 
    177200        # contains redundant information, the shorter form: 
    178201        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 
    179202        echo "${machine}-${os}${release}" 
    180         exit 0 ;; 
    181     amiga:OpenBSD:*:*) 
    182         echo m68k-unknown-openbsd${UNAME_RELEASE} 
    183         exit 0 ;; 
    184     arc:OpenBSD:*:*) 
    185         echo mipsel-unknown-openbsd${UNAME_RELEASE} 
    186         exit 0 ;; 
    187     hp300:OpenBSD:*:*) 
    188         echo m68k-unknown-openbsd${UNAME_RELEASE} 
    189         exit 0 ;; 
    190     mac68k:OpenBSD:*:*) 
    191         echo m68k-unknown-openbsd${UNAME_RELEASE} 
    192         exit 0 ;; 
    193     macppc:OpenBSD:*:*) 
    194         echo powerpc-unknown-openbsd${UNAME_RELEASE} 
    195         exit 0 ;; 
    196     mvme68k:OpenBSD:*:*) 
    197         echo m68k-unknown-openbsd${UNAME_RELEASE} 
    198         exit 0 ;; 
    199     mvme88k:OpenBSD:*:*) 
    200         echo m88k-unknown-openbsd${UNAME_RELEASE} 
    201         exit 0 ;; 
    202     mvmeppc:OpenBSD:*:*) 
    203         echo powerpc-unknown-openbsd${UNAME_RELEASE} 
    204         exit 0 ;; 
    205     pmax:OpenBSD:*:*) 
    206         echo mipsel-unknown-openbsd${UNAME_RELEASE} 
    207         exit 0 ;; 
    208     sgi:OpenBSD:*:*) 
    209         echo mipseb-unknown-openbsd${UNAME_RELEASE} 
    210         exit 0 ;; 
    211     sun3:OpenBSD:*:*) 
    212         echo m68k-unknown-openbsd${UNAME_RELEASE} 
    213         exit 0 ;; 
    214     wgrisc:OpenBSD:*:*) 
    215         echo mipsel-unknown-openbsd${UNAME_RELEASE} 
    216         exit 0 ;; 
     203        exit ;; 
    217204    *:OpenBSD:*:*) 
    218         echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} 
    219         exit 0 ;; 
     205        UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 
     206        echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 
     207        exit ;; 
     208    *:ekkoBSD:*:*) 
     209        echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 
     210        exit ;; 
     211    *:SolidBSD:*:*) 
     212        echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 
     213        exit ;; 
     214    macppc:MirBSD:*:*) 
     215        echo powerpc-unknown-mirbsd${UNAME_RELEASE} 
     216        exit ;; 
     217    *:MirBSD:*:*) 
     218        echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 
     219        exit ;; 
    220220    alpha:OSF1:*:*) 
    221         if test $UNAME_RELEASE = "V4.0"; then 
     221        case $UNAME_RELEASE in 
     222        *4.0) 
    222223                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 
    223         fi 
     224                ;; 
     225        *5.*) 
     226                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 
     227                ;; 
     228        esac 
     229        # According to Compaq, /usr/sbin/psrinfo has been available on 
     230        # OSF/1 and Tru64 systems produced since 1995.  I hope that 
     231        # covers most systems running today.  This code pipes the CPU 
     232        # types through head -n 1, so we only detect the type of CPU 0. 
     233        ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1` 
     234        case "$ALPHA_CPU_TYPE" in 
     235            "EV4 (21064)") 
     236                UNAME_MACHINE="alpha" ;; 
     237            "EV4.5 (21064)") 
     238                UNAME_MACHINE="alpha" ;; 
     239            "LCA4 (21066/21068)") 
     240                UNAME_MACHINE="alpha" ;; 
     241            "EV5 (21164)") 
     242                UNAME_MACHINE="alphaev5" ;; 
     243            "EV5.6 (21164A)") 
     244                UNAME_MACHINE="alphaev56" ;; 
     245            "EV5.6 (21164PC)") 
     246                UNAME_MACHINE="alphapca56" ;; 
     247            "EV5.7 (21164PC)") 
     248                UNAME_MACHINE="alphapca57" ;; 
     249            "EV6 (21264)") 
     250                UNAME_MACHINE="alphaev6" ;; 
     251            "EV6.7 (21264A)") 
     252                UNAME_MACHINE="alphaev67" ;; 
     253            "EV6.8CB (21264C)") 
     254                UNAME_MACHINE="alphaev68" ;; 
     255            "EV6.8AL (21264B)") 
     256                UNAME_MACHINE="alphaev68" ;; 
     257            "EV6.8CX (21264D)") 
     258                UNAME_MACHINE="alphaev68" ;; 
     259            "EV6.9A (21264/EV69A)") 
     260                UNAME_MACHINE="alphaev69" ;; 
     261            "EV7 (21364)") 
     262                UNAME_MACHINE="alphaev7" ;; 
     263            "EV7.9 (21364A)") 
     264                UNAME_MACHINE="alphaev79" ;; 
     265        esac 
     266        # A Pn.n version is a patched version. 
    224267        # A Vn.n version is a released version. 
    225268        # A Tn.n version is a released field test version. 
    226269        # A Xn.n version is an unreleased experimental baselevel. 
    227270        # 1.2 uses "1.2" for uname -r. 
    228         cat <<EOF >$dummy.s 
    229         .data 
    230 \$Lformat: 
    231         .byte 37,100,45,37,120,10,0     # "%d-%x\n" 
    232  
    233         .text 
    234         .globl main 
    235         .align 4 
    236         .ent main 
    237 main: 
    238         .frame \$30,16,\$26,0 
    239         ldgp \$29,0(\$27) 
    240         .prologue 1 
    241         .long 0x47e03d80 # implver \$0 
    242         lda \$2,-1 
    243         .long 0x47e20c21 # amask \$2,\$1 
    244         lda \$16,\$Lformat 
    245         mov \$0,\$17 
    246         not \$1,\$18 
    247         jsr \$26,printf 
    248         ldgp \$29,0(\$26) 
    249         mov 0,\$16 
    250         jsr \$26,exit 
    251         .end main 
    252 EOF 
    253         eval $set_cc_for_build 
    254         $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null 
    255         if test "$?" = 0 ; then 
    256                 case `./$dummy` in 
    257                         0-0) 
    258                                 UNAME_MACHINE="alpha" 
    259                                 ;; 
    260                         1-0) 
    261                                 UNAME_MACHINE="alphaev5" 
    262                                 ;; 
    263                         1-1) 
    264                                 UNAME_MACHINE="alphaev56" 
    265                                 ;; 
    266                         1-101) 
    267                                 UNAME_MACHINE="alphapca56" 
    268                                 ;; 
    269                         2-303) 
    270                                 UNAME_MACHINE="alphaev6" 
    271                                 ;; 
    272                         2-307) 
    273                                 UNAME_MACHINE="alphaev67" 
    274                                 ;; 
    275                         2-1307) 
    276                                 UNAME_MACHINE="alphaev68" 
    277                                 ;; 
    278                 esac 
    279         fi 
    280         rm -f $dummy.s $dummy 
    281         echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 
    282         exit 0 ;; 
     271        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 
     272        exit ;; 
    283273    Alpha\ *:Windows_NT*:*) 
    284274        # How do we know it's Interix rather than the generic POSIX subsystem? 
    285275        # Should we change UNAME_MACHINE based on the output of uname instead 
    286276        # of the specific Alpha model? 
    287277        echo alpha-pc-interix 
    288         exit 0 ;; 
     278        exit ;; 
    289279    21064:Windows_NT:50:3) 
    290280        echo alpha-dec-winnt3.5 
    291         exit 0 ;; 
     281        exit ;; 
    292282    Amiga*:UNIX_System_V:4.0:*) 
    293283        echo m68k-unknown-sysv4 
    294         exit 0;; 
     284        exit ;; 
    295285    *:[Aa]miga[Oo][Ss]:*:*) 
    296286        echo ${UNAME_MACHINE}-unknown-amigaos 
    297         exit 0 ;; 
     287        exit ;; 
    298288    *:[Mm]orph[Oo][Ss]:*:*) 
    299289        echo ${UNAME_MACHINE}-unknown-morphos 
    300         exit 0 ;; 
    301 ######################### 
    302 # Apache changes 
    303 
    304 #   *:OS/390:*:*) 
    305 #      echo i370-ibm-openedition 
    306 #      exit 0 ;; 
    307     *:OS390:*:* | *:OS/390:*:*) 
    308        echo s390-ibm-os390 
    309        exit 0 ;;  
    310     *:OS400:*:* | *:OS/400:*:*)  
    311        echo as400-ibm-os400 
    312        exit 0 ;; 
    313     *:OS/2:*:*) 
    314        echo "i386-pc-os2_emx" 
    315        exit 0;; 
    316 
    317 # end Apache changes 
    318 ######################### 
     290        exit ;; 
    319291    *:OS/390:*:*) 
    320292        echo i370-ibm-openedition 
    321         exit 0 ;; 
     293        exit ;; 
     294    *:z/VM:*:*) 
     295        echo s390-ibm-zvmoe 
     296        exit ;; 
     297    *:OS400:*:*) 
     298        echo powerpc-ibm-os400 
     299        exit ;; 
    322300    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 
    323301        echo arm-acorn-riscix${UNAME_RELEASE} 
    324         exit 0;; 
     302        exit ;; 
     303    arm:riscos:*:*|arm:RISCOS:*:*) 
     304        echo arm-unknown-riscos 
     305        exit ;; 
    325306    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 
    326307        echo hppa1.1-hitachi-hiuxmpp 
    327         exit 0;; 
     308        exit ;; 
    328309    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 
    329310        # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 
    330311        if test "`(/bin/universe) 2>/dev/null`" = att ; then 
     
    332313        else 
    333314                echo pyramid-pyramid-bsd 
    334315        fi 
    335         exit 0 ;; 
     316        exit ;; 
    336317    NILE*:*:*:dcosx) 
    337318        echo pyramid-pyramid-svr4 
    338         exit 0 ;; 
     319        exit ;; 
     320    DRS?6000:unix:4.0:6*) 
     321        echo sparc-icl-nx6 
     322        exit ;; 
     323    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 
     324        case `/usr/bin/uname -p` in 
     325            sparc) echo sparc-icl-nx7; exit ;; 
     326        esac ;; 
    339327    sun4H:SunOS:5.*:*) 
    340328        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 
    341         exit 0 ;; 
     329        exit ;; 
    342330    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 
    343331        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 
    344         exit 0 ;; 
    345     i86pc:SunOS:5.*:*
     332        exit ;; 
     333    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*
    346334        echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 
    347         exit 0 ;; 
     335        exit ;; 
    348336    sun4*:SunOS:6*:*) 
    349337        # According to config.sub, this is the proper way to canonicalize 
    350338        # SunOS6.  Hard to guess exactly what SunOS6 will be like, but 
    351339        # it's likely to be more like Solaris than SunOS4. 
    352340        echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 
    353         exit 0 ;; 
     341        exit ;; 
    354342    sun4*:SunOS:*:*) 
    355343        case "`/usr/bin/arch -k`" in 
    356344            Series*|S4*) 
     
    359347        esac 
    360348        # Japanese Language versions have a version number like `4.1.3-JL'. 
    361349        echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 
    362         exit 0 ;; 
     350        exit ;; 
    363351    sun3*:SunOS:*:*) 
    364352        echo m68k-sun-sunos${UNAME_RELEASE} 
    365         exit 0 ;; 
     353        exit ;; 
    366354    sun*:*:4.2BSD:*) 
    367355        UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 
    368356        test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 
     
    374362                echo sparc-sun-sunos${UNAME_RELEASE} 
    375363                ;; 
    376364        esac 
    377         exit 0 ;; 
     365        exit ;; 
    378366    aushp:SunOS:*:*) 
    379367        echo sparc-auspex-sunos${UNAME_RELEASE} 
    380         exit 0 ;; 
     368        exit ;; 
    381369    # The situation for MiNT is a little confusing.  The machine name 
    382370    # can be virtually everything (everything which is not 
    383371    # "atarist" or "atariste" at least should have a processor 
     
    388376    # be no problem. 
    389377    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 
    390378        echo m68k-atari-mint${UNAME_RELEASE} 
    391         exit 0 ;; 
     379        exit ;; 
    392380    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 
    393381        echo m68k-atari-mint${UNAME_RELEASE} 
    394         exit 0 ;; 
     382        exit ;; 
    395383    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 
    396384        echo m68k-atari-mint${UNAME_RELEASE} 
    397         exit 0 ;; 
     385        exit ;; 
    398386    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 
    399387        echo m68k-milan-mint${UNAME_RELEASE} 
    400         exit 0 ;; 
     388        exit ;; 
    401389    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 
    402390        echo m68k-hades-mint${UNAME_RELEASE} 
    403         exit 0 ;; 
     391        exit ;; 
    404392    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 
    405393        echo m68k-unknown-mint${UNAME_RELEASE} 
    406         exit 0 ;; 
     394        exit ;; 
     395    m68k:machten:*:*) 
     396        echo m68k-apple-machten${UNAME_RELEASE} 
     397        exit ;; 
    407398    powerpc:machten:*:*) 
    408399        echo powerpc-apple-machten${UNAME_RELEASE} 
    409         exit 0 ;; 
     400        exit ;; 
    410401    RISC*:Mach:*:*) 
    411402        echo mips-dec-mach_bsd4.3 
    412         exit 0 ;; 
     403        exit ;; 
    413404    RISC*:ULTRIX:*:*) 
    414405        echo mips-dec-ultrix${UNAME_RELEASE} 
    415         exit 0 ;; 
     406        exit ;; 
    416407    VAX*:ULTRIX*:*:*) 
    417408        echo vax-dec-ultrix${UNAME_RELEASE} 
    418         exit 0 ;; 
     409        exit ;; 
    419410    2020:CLIX:*:* | 2430:CLIX:*:*) 
    420411        echo clipper-intergraph-clix${UNAME_RELEASE} 
    421         exit 0 ;; 
     412        exit ;; 
    422413    mips:*:*:UMIPS | mips:*:*:RISCos) 
    423414        eval $set_cc_for_build 
    424415        sed 's/^        //' << EOF >$dummy.c 
     
    442433          exit (-1); 
    443434        } 
    444435EOF 
    445         $CC_FOR_BUILD $dummy.c -o $dummy \ 
    446           && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ 
    447           && rm -f $dummy.c $dummy && exit 0 
    448         rm -f $dummy.c $dummy 
     436        $CC_FOR_BUILD -o $dummy $dummy.c && 
     437          dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 
     438          SYSTEM_NAME=`$dummy $dummyarg` && 
     439            { echo "$SYSTEM_NAME"; exit; } 
    449440        echo mips-mips-riscos${UNAME_RELEASE} 
    450         exit 0 ;; 
     441        exit ;; 
    451442    Motorola:PowerMAX_OS:*:*) 
    452443        echo powerpc-motorola-powermax 
    453         exit 0 ;; 
     444        exit ;; 
     445    Motorola:*:4.3:PL8-*) 
     446        echo powerpc-harris-powermax 
     447        exit ;; 
     448    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 
     449        echo powerpc-harris-powermax 
     450        exit ;; 
    454451    Night_Hawk:Power_UNIX:*:*) 
    455452        echo powerpc-harris-powerunix 
    456         exit 0 ;; 
     453        exit ;; 
    457454    m88k:CX/UX:7*:*) 
    458455        echo m88k-harris-cxux7 
    459         exit 0 ;; 
     456        exit ;; 
    460457    m88k:*:4*:R4*) 
    461458        echo m88k-motorola-sysv4 
    462         exit 0 ;; 
     459        exit ;; 
    463460    m88k:*:3*:R3*) 
    464461        echo m88k-motorola-sysv3 
    465         exit 0 ;; 
     462        exit ;; 
    466463    AViiON:dgux:*:*) 
    467464        # DG/UX returns AViiON for all architectures 
    468465        UNAME_PROCESSOR=`/usr/bin/uname -p` 
     
    478475        else 
    479476            echo i586-dg-dgux${UNAME_RELEASE} 
    480477        fi 
    481         exit 0 ;; 
     478        exit ;; 
    482479    M88*:DolphinOS:*:*) # DolphinOS (SVR3) 
    483480        echo m88k-dolphin-sysv3 
    484         exit 0 ;; 
     481        exit ;; 
    485482    M88*:*:R3*:*) 
    486483        # Delta 88k system running SVR3 
    487484        echo m88k-motorola-sysv3 
    488         exit 0 ;; 
     485        exit ;; 
    489486    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 
    490487        echo m88k-tektronix-sysv3 
    491         exit 0 ;; 
     488        exit ;; 
    492489    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 
    493490        echo m68k-tektronix-bsd 
    494         exit 0 ;; 
     491        exit ;; 
    495492    *:IRIX*:*:*) 
    496493        echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 
    497         exit 0 ;; 
     494        exit ;; 
    498495    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 
    499         echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id 
    500         exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX ' 
     496        echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id 
     497        exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX ' 
    501498    i*86:AIX:*:*) 
    502499        echo i386-ibm-aix 
    503         exit 0 ;; 
     500        exit ;; 
    504501    ia64:AIX:*:*) 
    505502        if [ -x /usr/bin/oslevel ] ; then 
    506503                IBM_REV=`/usr/bin/oslevel` 
     
    508505                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 
    509506        fi 
    510507        echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 
    511         exit 0 ;; 
     508        exit ;; 
    512509    *:AIX:2:3) 
    513510        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 
    514511                eval $set_cc_for_build 
     
    523520                        exit(0); 
    524521                        } 
    525522EOF 
    526                 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 
    527                 rm -f $dummy.c $dummy 
    528                 echo rs6000-ibm-aix3.2.5 
     523                if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 
     524                then 
     525                        echo "$SYSTEM_NAME" 
     526                else 
     527                        echo rs6000-ibm-aix3.2.5 
     528                fi 
    529529        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 
    530530                echo rs6000-ibm-aix3.2.4 
    531531        else 
    532532                echo rs6000-ibm-aix3.2 
    533533        fi 
    534         exit 0 ;; 
    535     *:AIX:*:[45]) 
     534        exit ;; 
     535    *:AIX:*:[456]) 
    536536        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 
    537537        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 
    538538                IBM_ARCH=rs6000 
     
    545545                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 
    546546        fi 
    547547        echo ${IBM_ARCH}-ibm-aix${IBM_REV} 
    548         exit 0 ;; 
     548        exit ;; 
    549549    *:AIX:*:*) 
    550550        echo rs6000-ibm-aix 
    551         exit 0 ;; 
     551        exit ;; 
    552552    ibmrt:4.4BSD:*|romp-ibm:BSD:*) 
    553553        echo romp-ibm-bsd4.4 
    554         exit 0 ;; 
     554        exit ;; 
    555555    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and 
    556556        echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to 
    557         exit 0 ;;                           # report: romp-ibm BSD 4.3 
     557        exit ;;                             # report: romp-ibm BSD 4.3 
    558558    *:BOSX:*:*) 
    559559        echo rs6000-bull-bosx 
    560         exit 0 ;; 
     560        exit ;; 
    561561    DPX/2?00:B.O.S.:*:*) 
    562562        echo m68k-bull-sysv3 
    563         exit 0 ;; 
     563        exit ;; 
    564564    9000/[34]??:4.3bsd:1.*:*) 
    565565        echo m68k-hp-bsd 
    566         exit 0 ;; 
     566        exit ;; 
    567567    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 
    568568        echo m68k-hp-bsd4.4 
    569         exit 0 ;; 
     569        exit ;; 
    570570    9000/[34678]??:HP-UX:*:*) 
    571571        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 
    572572        case "${UNAME_MACHINE}" in 
     
    622622                  exit (0); 
    623623              } 
    624624EOF 
    625                     (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy` 
    626                     if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi 
    627                     rm -f $dummy.c $dummy 
     625                    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 
     626                    test -z "$HP_ARCH" && HP_ARCH=hppa 
    628627                fi ;; 
    629628        esac 
     629        if [ ${HP_ARCH} = "hppa2.0w" ] 
     630        then 
     631            eval $set_cc_for_build 
     632 
     633            # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 
     634            # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler 
     635            # generating 64-bit code.  GNU and HP use different nomenclature: 
     636            # 
     637            # $ CC_FOR_BUILD=cc ./config.guess 
     638            # => hppa2.0w-hp-hpux11.23 
     639            # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 
     640            # => hppa64-hp-hpux11.23 
     641 
     642            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 
     643                grep __LP64__ >/dev/null 
     644            then 
     645                HP_ARCH="hppa2.0w" 
     646            else 
     647                HP_ARCH="hppa64" 
     648            fi 
     649        fi 
    630650        echo ${HP_ARCH}-hp-hpux${HPUX_REV} 
    631         exit 0 ;; 
     651        exit ;; 
    632652    ia64:HP-UX:*:*) 
    633653        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 
    634654        echo ia64-hp-hpux${HPUX_REV} 
    635         exit 0 ;; 
     655        exit ;; 
    636656    3050*:HI-UX:*:*) 
    637657        eval $set_cc_for_build 
    638658        sed 's/^        //' << EOF >$dummy.c 
     
    660680          exit (0); 
    661681        } 
    662682EOF 
    663         $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 
    664         rm -f $dummy.c $dummy 
     683        $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 
     684               { echo "$SYSTEM_NAME"; exit; } 
    665685        echo unknown-hitachi-hiuxwe2 
    666         exit 0 ;; 
     686        exit ;; 
    667687    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 
    668688        echo hppa1.1-hp-bsd 
    669         exit 0 ;; 
     689        exit ;; 
    670690    9000/8??:4.3bsd:*:*) 
    671691        echo hppa1.0-hp-bsd 
    672         exit 0 ;; 
     692        exit ;; 
    673693    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 
    674694        echo hppa1.0-hp-mpeix 
    675         exit 0 ;; 
     695        exit ;; 
    676696    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 
    677697        echo hppa1.1-hp-osf 
    678         exit 0 ;; 
     698        exit ;; 
    679699    hp8??:OSF1:*:*) 
    680700        echo hppa1.0-hp-osf 
    681         exit 0 ;; 
     701        exit ;; 
    682702    i*86:OSF1:*:*) 
    683703        if [ -x /usr/sbin/sysversion ] ; then 
    684704            echo ${UNAME_MACHINE}-unknown-osf1mk 
    685705        else 
    686706            echo ${UNAME_MACHINE}-unknown-osf1 
    687707        fi 
    688         exit 0 ;; 
     708        exit ;; 
    689709    parisc*:Lites*:*:*) 
    690710        echo hppa1.1-hp-lites 
    691         exit 0 ;; 
     711        exit ;; 
    692712    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 
    693713        echo c1-convex-bsd 
    694         exit 0 ;; 
     714        exit ;; 
    695715    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 
    696716        if getsysinfo -f scalar_acc 
    697717        then echo c32-convex-bsd 
    698718        else echo c2-convex-bsd 
    699719        fi 
    700         exit 0 ;; 
     720        exit ;; 
    701721    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 
    702722        echo c34-convex-bsd 
    703         exit 0 ;; 
     723        exit ;; 
    704724    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 
    705725        echo c38-convex-bsd 
    706         exit 0 ;; 
     726        exit ;; 
    707727    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 
    708728        echo c4-convex-bsd 
    709         exit 0 ;; 
     729        exit ;; 
    710730    CRAY*Y-MP:*:*:*) 
    711731        echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 
    712         exit 0 ;; 
     732        exit ;; 
    713733    CRAY*[A-Z]90:*:*:*) 
    714734        echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 
    715735        | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 
    716736              -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 
    717737              -e 's/\.[^.]*$/.X/' 
    718         exit 0 ;; 
     738        exit ;; 
    719739    CRAY*TS:*:*:*) 
    720740        echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 
    721         exit 0 ;; 
    722     CRAY*T3D:*:*:*) 
    723         echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 
    724         exit 0 ;; 
     741        exit ;; 
    725742    CRAY*T3E:*:*:*) 
    726743        echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 
    727         exit 0 ;; 
     744        exit ;;&n