Ticket #2041: ruby_on_haiku_06_04_2008.diff

File ruby_on_haiku_06_04_2008.diff, 61.6 KB (added by oco, 16 years ago)
  • process.c

     
    3030#include <time.h>
    3131#include <ctype.h>
    3232
     33#ifdef __HAIKU__
     34# include <sys/resource.h>
     35#endif
     36
    3337#ifndef EXIT_SUCCESS
    3438#define EXIT_SUCCESS 0
    3539#endif
  • ext/syslog/syslog.c

     
    224224    return INT2FIX(LOG_MASK(FIX2INT(pri)));
    225225}
    226226
     227#ifdef __HAIKU__
     228#define LOG_UPTO(pri) ((1 << ((pri) + 1)) - 1)
     229#endif
     230
    227231static VALUE mSyslogConstants_LOG_UPTO(VALUE klass, VALUE pri)
    228232{
    229233    return INT2FIX(LOG_UPTO(FIX2INT(pri)));
  • ext/socket/getaddrinfo.c

     
    4242#include <sys/types.h>
    4343#if !defined(_WIN32) && !defined(__VMS)
    4444#include <sys/param.h>
    45 #if defined(__BEOS__)
     45#if defined(__BEOS__) && !defined(__HAIKU__)
    4646# include <net/socket.h>
    4747#else
    4848# include <sys/socket.h>
     
    199199
    200200#define ERR(err) { error = (err); goto bad; }
    201201
     202/*
    202203#if defined __UCLIBC__
    203204const
    204205#endif
     
    210211        ecode = EAI_MAX;
    211212    return (char *)ai_errlist[ecode];
    212213}
     214*/
    213215
    214216void
    215217freeaddrinfo(ai)
  • ext/socket/extconf.rb

     
    3838end
    3939
    4040ipv6 = false
    41 default_ipv6 = /cygwin/ !~ RUBY_PLATFORM
     41default_ipv6 = /cygwin|beos|haiku/ !~ RUBY_PLATFORM
    4242if enable_config("ipv6", default_ipv6)
    4343  if checking_for("ipv6") {try_link(<<EOF)}
    4444#include <sys/types.h>
  • ext/socket/socket.c

     
    2626#endif
    2727
    2828#ifndef _WIN32
    29 #if defined(__BEOS__)
     29#if defined(__BEOS__) && !defined(__HAIKU__)
    3030# include <net/socket.h>
    3131#else
    3232# include <sys/socket.h>
     
    40434043#endif
    40444044#ifdef AF_UNIX
    40454045    sock_define_const("AF_UNIX", AF_UNIX);
     4046#endif
     4047#ifdef PF_UNIX
    40464048    sock_define_const("PF_UNIX", PF_UNIX);
    40474049#endif
    40484050#ifdef AF_AX25
     
    40514053#endif
    40524054#ifdef AF_IPX
    40534055    sock_define_const("AF_IPX", AF_IPX);
     4056#endif
     4057#ifdef PF_IPX
    40544058    sock_define_const("PF_IPX", PF_IPX);
    40554059#endif
    40564060#ifdef AF_APPLETALK
    40574061    sock_define_const("AF_APPLETALK", AF_APPLETALK);
     4062#endif
     4063#ifdef PF_APPLETALK
    40584064    sock_define_const("PF_APPLETALK", PF_APPLETALK);
    40594065#endif
    40604066#ifdef AF_UNSPEC
  • ext/socket/addrinfo.h

     
    103103#define AI_CANONNAME    0x00000002 /* fill ai_canonname */
    104104#define AI_NUMERICHOST  0x00000004 /* prevent name resolution */
    105105/* valid flags for addrinfo */
     106#ifndef __HAIKU__
    106107#define AI_MASK     (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST)
     108#endif
    107109
    108110#define AI_ALL      0x00000100 /* IPv6 and IPv4-mapped (with AI_V4MAPPED) */
    109111#define AI_V4MAPPED_CFG 0x00000200 /* accept IPv4-mapped if kernel supports */
     
    159161#if defined __UCLIBC__
    160162const
    161163#endif
     164#ifndef __HAIKU__
    162165extern char *gai_strerror __P((int));
     166#endif
    163167
    164168/* In case there is no definition of offsetof() provided - though any proper
    165169Standard C system should have one. */
  • ext/socket/getnameinfo.c

     
    3838#include <stdio.h>
    3939#include <sys/types.h>
    4040#ifndef _WIN32
    41 #if defined(__BEOS__)
     41#if defined(__BEOS__) && !defined(__HAIKU__)
    4242# include <net/socket.h>
    4343#else
    4444# include <sys/socket.h>
     
    110110#define ENI_FAMILY  5
    111111#define ENI_SALEN   6
    112112
     113#ifdef __HAIKU__
     114#define HAVE_INET_NTOP
     115#endif
     116
    113117#ifndef HAVE_INET_NTOP
    114118static const char *
    115119inet_ntop(af, addr, numaddr, numaddr_len)
  • configure.in

     
    404404        ac_cv_func_setitimer=no
    405405        ;;
    406406beos*)      ac_cv_func_link=no;;
    407 cygwin*)    ;;
     407haiku*)     ac_cv_func_link=no;;
     408cygwin*)    rb_cv_have_daylight=no
     409        ac_cv_var_tzname=no
     410        ac_cv_func__setjmp=no
     411        ac_cv_func_setitimer=no
     412        ;;
    408413mingw*)     if test "$with_winsock2" = yes; then
    409414          LIBS="-lws2_32 $LIBS"
    410415        else
     
    527532  #ifdef HAVE_SYS_TIME_H
    528533  # include <sys/time.h>
    529534  #endif
     535  #ifdef __HAIKU__
     536  #define HAVE_SYS_RESOURCE_H
     537  #endif
    530538  #ifdef HAVE_SYS_RESOURCE_H
    531539  # include <sys/resource.h>
    532540  #endif
     
    11031111    openstep*)  CCDLFLAGS="$CCDLFLAGS -fno-common";;
    11041112    rhapsody*)  CCDLFLAGS="$CCDLFLAGS -fno-common";;
    11051113    darwin*)    CCDLFLAGS="$CCDLFLAGS -fno-common";;
    1106     human*|bsdi*|beos*|cygwin*|mingw*|aix*|interix*) ;;
     1114    human*|bsdi*|beos*|haiku*|cygwin*|mingw*|aix*|interix*) ;;
    11071115    *) CCDLFLAGS="$CCDLFLAGS -fPIC";;
    11081116    esac
    11091117  else
     
    12251233            esac
    12261234            : ${LIBPATHENV=LIBRARY_PATH}
    12271235            rb_cv_dlopen=yes ;;
     1236    haiku*)         case "$target_cpu" in
     1237              powerpc*)
     1238                : ${LDSHARED="ld -xms"}
     1239                DLDFLAGS="$DLDFLAGS "'-export Init_$(TARGET) -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o'
     1240                            ;;
     1241              i586*)
     1242                : ${LDSHARED="ld -shared"}
     1243                DLDFLAGS="$DLDFLAGS -L/boot/develop/lib/x86 -lbe -lroot"
     1244                ;;
     1245            esac
     1246            : ${LIBPATHENV=LIBRARY_PATH}
     1247            rb_cv_dlopen=yes ;;
    12281248    nto-qnx*)   DLDFLAGS="$DLDFLAGS -L/lib -L/usr/lib -L/usr/local/lib"
    12291249            : ${LDSHARED='ld -Bshareable -x'}
    12301250            LDFLAGS="$LDFLAGS -L/lib -L/usr/lib -L/usr/local/lib"
     
    14181438SOLIBS=
    14191439
    14201440case "$target_os" in
    1421   cygwin*|mingw*|beos*|openstep*|nextstep*|rhapsody*|darwin*|os2-emx*)
     1441  cygwin*|mingw*|beos*|haiku*|openstep*|nextstep*|rhapsody*|darwin*|os2-emx*)
    14221442    : ${DLDLIBS=""}
    14231443    ;;
    14241444  *)
     
    15011521        ;;
    15021522    esac
    15031523    ;;
     1524    haiku*)
     1525    case "$target_cpu" in
     1526    powerpc*)
     1527        LIBRUBY_DLDFLAGS='-f ruby.exp -lnet -lbe -lroot glue-noinit.a init_term_dyn.o start_dyn.o'
     1528        ;;
     1529    esac
     1530    ;;
    15041531    darwin*)
    15051532    LIBRUBY_SO='lib$(RUBY_SO_NAME).$(MAJOR).$(MINOR).$(TEENY).dylib'
    15061533    LIBRUBY_LDSHARED='cc -dynamiclib -undefined suppress -flat_namespace'
     
    15851612        ;;
    15861613    esac
    15871614    ;;
     1615    haiku*)
     1616    case "$target_cpu" in
     1617    powerpc*)
     1618        CFLAGS="$CFLAGS -relax_pointers"
     1619        ;;
     1620    esac
     1621    ;;
    15881622    cygwin*|mingw*)
    15891623    case "$target_os" in
    15901624    cygwin*)
  • io.c

     
    8383
    8484extern void Init_File _((void));
    8585
    86 #ifdef __BEOS__
     86#ifdef __HAIKU__
     87#include <sys/socket.h>
    8788# ifndef NOFILE
    8889#  define NOFILE (OPEN_MAX)
    8990# endif
    90 #include <net/socket.h>
     91#else
     92# ifdef __BEOS__
     93#  ifndef NOFILE
     94#   define NOFILE (OPEN_MAX)
     95#  endif
     96# include <net/socket.h>
     97# endif
    9198#endif
    9299
    93100#include "util.h"
  • config.guess

     
    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, 2003 Free Software Foundation, Inc.
     4#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
     5#   Free Software Foundation, Inc.
    56
    6 timestamp='2004-06-11'
     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
     29
    2730# Originally written by Per Bothner <per@bothner.com>.
    2831# Please send patches to <config-patches@gnu.org>.  Submit a context
    2932# diff and a properly formatted ChangeLog entry.
     
    5356GNU config.guess ($timestamp)
    5457
    5558Originally written by Per Bothner.
    56 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
    57 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.
    5861
    5962This is free software; see the source for copying conditions.  There is NO
    6063warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
     
    6669while test $# -gt 0 ; do
    6770  case $1 in
    6871    --time-stamp | --time* | -t )
    69        echo "$timestamp" ; exit 0 ;;
     72       echo "$timestamp" ; exit ;;
    7073    --version | -v )
    71        echo "$version" ; exit 0 ;;
     74       echo "$version" ; exit ;;
    7275    --help | --h* | -h )
    73        echo "$usage"; exit 0 ;;
     76       echo "$usage"; exit ;;
    7477    -- )     # Stop option processing
    7578       shift; break ;;
    7679    - ) # Use stdin as input.
     
    104107trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
    105108trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
    106109: ${TMPDIR=/tmp} ;
    107  { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
     110 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
    108111 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
    109112 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
    110113 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
     
    123126    ;;
    124127 ,,*)   CC_FOR_BUILD=$CC ;;
    125128 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
    126 esac ;'
     129esac ; set_cc_for_build= ;'
    127130
    128131# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
    129132# (ghazi@noc.rutgers.edu 1994-08-24)
     
    158161        arm*) machine=arm-unknown ;;
    159162        sh3el) machine=shl-unknown ;;
    160163        sh3eb) machine=sh-unknown ;;
     164        sh5el) machine=sh5le-unknown ;;
    161165        *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
    162166    esac
    163167    # The Operating System including object format, if it has switched
     
    196200    # contains redundant information, the shorter form:
    197201    # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
    198202    echo "${machine}-${os}${release}"
    199     exit 0 ;;
    200     amd64:OpenBSD:*:*)
    201     echo x86_64-unknown-openbsd${UNAME_RELEASE}
    202     exit 0 ;;
    203     amiga:OpenBSD:*:*)
    204     echo m68k-unknown-openbsd${UNAME_RELEASE}
    205     exit 0 ;;
    206     arc:OpenBSD:*:*)
    207     echo mipsel-unknown-openbsd${UNAME_RELEASE}
    208     exit 0 ;;
    209     cats:OpenBSD:*:*)
    210     echo arm-unknown-openbsd${UNAME_RELEASE}
    211     exit 0 ;;
    212     hp300:OpenBSD:*:*)
    213     echo m68k-unknown-openbsd${UNAME_RELEASE}
    214     exit 0 ;;
    215     luna88k:OpenBSD:*:*)
    216         echo m88k-unknown-openbsd${UNAME_RELEASE}
    217     exit 0 ;;
    218     mac68k:OpenBSD:*:*)
    219     echo m68k-unknown-openbsd${UNAME_RELEASE}
    220     exit 0 ;;
    221     macppc:OpenBSD:*:*)
    222     echo powerpc-unknown-openbsd${UNAME_RELEASE}
    223     exit 0 ;;
    224     mvme68k:OpenBSD:*:*)
    225     echo m68k-unknown-openbsd${UNAME_RELEASE}
    226     exit 0 ;;
    227     mvme88k:OpenBSD:*:*)
    228     echo m88k-unknown-openbsd${UNAME_RELEASE}
    229     exit 0 ;;
    230     mvmeppc:OpenBSD:*:*)
    231     echo powerpc-unknown-openbsd${UNAME_RELEASE}
    232     exit 0 ;;
    233     pmax:OpenBSD:*:*)
    234     echo mipsel-unknown-openbsd${UNAME_RELEASE}
    235     exit 0 ;;
    236     sgi:OpenBSD:*:*)
    237     echo mipseb-unknown-openbsd${UNAME_RELEASE}
    238     exit 0 ;;
    239     sun3:OpenBSD:*:*)
    240     echo m68k-unknown-openbsd${UNAME_RELEASE}
    241     exit 0 ;;
    242     wgrisc:OpenBSD:*:*)
    243     echo mipsel-unknown-openbsd${UNAME_RELEASE}
    244     exit 0 ;;
     203    exit ;;
    245204    *:OpenBSD:*:*)
    246     echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
    247     exit 0 ;;
     205    UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
     206    echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
     207    exit ;;
    248208    *:ekkoBSD:*:*)
    249209    echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
    250     exit 0 ;;
     210    exit ;;
     211    *:SolidBSD:*:*)
     212    echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
     213    exit ;;
    251214    macppc:MirBSD:*:*)
    252     echo powerppc-unknown-mirbsd${UNAME_RELEASE}
    253     exit 0 ;;
     215    echo powerpc-unknown-mirbsd${UNAME_RELEASE}
     216    exit ;;
    254217    *:MirBSD:*:*)
    255218    echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
    256     exit 0 ;;
     219    exit ;;
    257220    alpha:OSF1:*:*)
    258221    case $UNAME_RELEASE in
    259222    *4.0)
     
    306269    # A Xn.n version is an unreleased experimental baselevel.
    307270    # 1.2 uses "1.2" for uname -r.
    308271    echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
    309     exit 0 ;;
    310     Alpha*:OpenVMS:*:*)
    311     echo alpha-hp-vms
    312     exit 0 ;;
     272    exit ;;
    313273    Alpha\ *:Windows_NT*:*)
    314274    # How do we know it's Interix rather than the generic POSIX subsystem?
    315275    # Should we change UNAME_MACHINE based on the output of uname instead
    316276    # of the specific Alpha model?
    317277    echo alpha-pc-interix
    318     exit 0 ;;
     278    exit ;;
    319279    21064:Windows_NT:50:3)
    320280    echo alpha-dec-winnt3.5
    321     exit 0 ;;
     281    exit ;;
    322282    Amiga*:UNIX_System_V:4.0:*)
    323283    echo m68k-unknown-sysv4
    324     exit 0;;
     284    exit ;;
    325285    *:[Aa]miga[Oo][Ss]:*:*)
    326286    echo ${UNAME_MACHINE}-unknown-amigaos
    327     exit 0 ;;
     287    exit ;;
    328288    *:[Mm]orph[Oo][Ss]:*:*)
    329289    echo ${UNAME_MACHINE}-unknown-morphos
    330     exit 0 ;;
     290    exit ;;
    331291    *:OS/390:*:*)
    332292    echo i370-ibm-openedition
    333     exit 0 ;;
     293    exit ;;
     294    *:z/VM:*:*)
     295    echo s390-ibm-zvmoe
     296    exit ;;
    334297    *:OS400:*:*)
    335298        echo powerpc-ibm-os400
    336     exit 0 ;;
     299    exit ;;
    337300    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
    338301    echo arm-acorn-riscix${UNAME_RELEASE}
    339     exit 0;;
     302    exit ;;
     303    arm:riscos:*:*|arm:RISCOS:*:*)
     304    echo arm-unknown-riscos
     305    exit ;;
    340306    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
    341307    echo hppa1.1-hitachi-hiuxmpp
    342     exit 0;;
     308    exit ;;
    343309    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
    344310    # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
    345311    if test "`(/bin/universe) 2>/dev/null`" = att ; then
     
    347313    else
    348314        echo pyramid-pyramid-bsd
    349315    fi
    350     exit 0 ;;
     316    exit ;;
    351317    NILE*:*:*:dcosx)
    352318    echo pyramid-pyramid-svr4
    353     exit 0 ;;
     319    exit ;;
    354320    DRS?6000:unix:4.0:6*)
    355321    echo sparc-icl-nx6
    356     exit 0 ;;
    357     DRS?6000:UNIX_SV:4.2*:7*)
     322    exit ;;
     323    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
    358324    case `/usr/bin/uname -p` in
    359         sparc) echo sparc-icl-nx7 && exit 0 ;;
     325        sparc) echo sparc-icl-nx7; exit ;;
    360326    esac ;;
    361327    sun4H:SunOS:5.*:*)
    362328    echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    363     exit 0 ;;
     329    exit ;;
    364330    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
    365331    echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    366     exit 0 ;;
    367     i86pc:SunOS:5.*:*)
     332    exit ;;
     333    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
    368334    echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    369     exit 0 ;;
     335    exit ;;
    370336    sun4*:SunOS:6*:*)
    371337    # According to config.sub, this is the proper way to canonicalize
    372338    # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
    373339    # it's likely to be more like Solaris than SunOS4.
    374340    echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    375     exit 0 ;;
     341    exit ;;
    376342    sun4*:SunOS:*:*)
    377343    case "`/usr/bin/arch -k`" in
    378344        Series*|S4*)
     
    381347    esac
    382348    # Japanese Language versions have a version number like `4.1.3-JL'.
    383349    echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
    384     exit 0 ;;
     350    exit ;;
    385351    sun3*:SunOS:*:*)
    386352    echo m68k-sun-sunos${UNAME_RELEASE}
    387     exit 0 ;;
     353    exit ;;
    388354    sun*:*:4.2BSD:*)
    389355    UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
    390356    test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
     
    396362        echo sparc-sun-sunos${UNAME_RELEASE}
    397363        ;;
    398364    esac
    399     exit 0 ;;
     365    exit ;;
    400366    aushp:SunOS:*:*)
    401367    echo sparc-auspex-sunos${UNAME_RELEASE}
    402     exit 0 ;;
     368    exit ;;
    403369    # The situation for MiNT is a little confusing.  The machine name
    404370    # can be virtually everything (everything which is not
    405371    # "atarist" or "atariste" at least should have a processor
     
    410376    # be no problem.
    411377    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
    412378        echo m68k-atari-mint${UNAME_RELEASE}
    413     exit 0 ;;
     379    exit ;;
    414380    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
    415381    echo m68k-atari-mint${UNAME_RELEASE}
    416         exit 0 ;;
     382        exit ;;
    417383    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
    418384        echo m68k-atari-mint${UNAME_RELEASE}
    419     exit 0 ;;
     385    exit ;;
    420386    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
    421387        echo m68k-milan-mint${UNAME_RELEASE}
    422         exit 0 ;;
     388        exit ;;
    423389    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
    424390        echo m68k-hades-mint${UNAME_RELEASE}
    425         exit 0 ;;
     391        exit ;;
    426392    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
    427393        echo m68k-unknown-mint${UNAME_RELEASE}
    428         exit 0 ;;
     394        exit ;;
    429395    m68k:machten:*:*)
    430396    echo m68k-apple-machten${UNAME_RELEASE}
    431     exit 0 ;;
     397    exit ;;
    432398    powerpc:machten:*:*)
    433399    echo powerpc-apple-machten${UNAME_RELEASE}
    434     exit 0 ;;
     400    exit ;;
    435401    RISC*:Mach:*:*)
    436402    echo mips-dec-mach_bsd4.3
    437     exit 0 ;;
     403    exit ;;
    438404    RISC*:ULTRIX:*:*)
    439405    echo mips-dec-ultrix${UNAME_RELEASE}
    440     exit 0 ;;
     406    exit ;;
    441407    VAX*:ULTRIX*:*:*)
    442408    echo vax-dec-ultrix${UNAME_RELEASE}
    443     exit 0 ;;
     409    exit ;;
    444410    2020:CLIX:*:* | 2430:CLIX:*:*)
    445411    echo clipper-intergraph-clix${UNAME_RELEASE}
    446     exit 0 ;;
     412    exit ;;
    447413    mips:*:*:UMIPS | mips:*:*:RISCos)
    448414    eval $set_cc_for_build
    449415    sed 's/^    //' << EOF >$dummy.c
     
    467433      exit (-1);
    468434    }
    469435EOF
    470     $CC_FOR_BUILD -o $dummy $dummy.c \
    471       && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
    472       && exit 0
     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; }
    473440    echo mips-mips-riscos${UNAME_RELEASE}
    474     exit 0 ;;
     441    exit ;;
    475442    Motorola:PowerMAX_OS:*:*)
    476443    echo powerpc-motorola-powermax
    477     exit 0 ;;
     444    exit ;;
    478445    Motorola:*:4.3:PL8-*)
    479446    echo powerpc-harris-powermax
    480     exit 0 ;;
     447    exit ;;
    481448    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
    482449    echo powerpc-harris-powermax
    483     exit 0 ;;
     450    exit ;;
    484451    Night_Hawk:Power_UNIX:*:*)
    485452    echo powerpc-harris-powerunix
    486     exit 0 ;;
     453    exit ;;
    487454    m88k:CX/UX:7*:*)
    488455    echo m88k-harris-cxux7
    489     exit 0 ;;
     456    exit ;;
    490457    m88k:*:4*:R4*)
    491458    echo m88k-motorola-sysv4
    492     exit 0 ;;
     459    exit ;;
    493460    m88k:*:3*:R3*)
    494461    echo m88k-motorola-sysv3
    495     exit 0 ;;
     462    exit ;;
    496463    AViiON:dgux:*:*)
    497464        # DG/UX returns AViiON for all architectures
    498465        UNAME_PROCESSOR=`/usr/bin/uname -p`
     
    508475    else
    509476        echo i586-dg-dgux${UNAME_RELEASE}
    510477    fi
    511     exit 0 ;;
     478    exit ;;
    512479    M88*:DolphinOS:*:*) # DolphinOS (SVR3)
    513480    echo m88k-dolphin-sysv3
    514     exit 0 ;;
     481    exit ;;
    515482    M88*:*:R3*:*)
    516483    # Delta 88k system running SVR3
    517484    echo m88k-motorola-sysv3
    518     exit 0 ;;
     485    exit ;;
    519486    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
    520487    echo m88k-tektronix-sysv3
    521     exit 0 ;;
     488    exit ;;
    522489    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
    523490    echo m68k-tektronix-bsd
    524     exit 0 ;;
     491    exit ;;
    525492    *:IRIX*:*:*)
    526493    echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
    527     exit 0 ;;
     494    exit ;;
    528495    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
    529     echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
    530     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 '
    531498    i*86:AIX:*:*)
    532499    echo i386-ibm-aix
    533     exit 0 ;;
     500    exit ;;
    534501    ia64:AIX:*:*)
    535502    if [ -x /usr/bin/oslevel ] ; then
    536503        IBM_REV=`/usr/bin/oslevel`
     
    538505        IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
    539506    fi
    540507    echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
    541     exit 0 ;;
     508    exit ;;
    542509    *:AIX:2:3)
    543510    if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
    544511        eval $set_cc_for_build
     
    553520            exit(0);
    554521            }
    555522EOF
    556         $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
    557         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
    558529    elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
    559530        echo rs6000-ibm-aix3.2.4
    560531    else
    561532        echo rs6000-ibm-aix3.2
    562533    fi
    563     exit 0 ;;
    564     *:AIX:*:[45])
     534    exit ;;
     535    *:AIX:*:[456])
    565536    IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
    566537    if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
    567538        IBM_ARCH=rs6000
     
    574545        IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
    575546    fi
    576547    echo ${IBM_ARCH}-ibm-aix${IBM_REV}
    577     exit 0 ;;
     548    exit ;;
    578549    *:AIX:*:*)
    579550    echo rs6000-ibm-aix
    580     exit 0 ;;
     551    exit ;;
    581552    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
    582553    echo romp-ibm-bsd4.4
    583     exit 0 ;;
     554    exit ;;
    584555    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
    585556    echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
    586     exit 0 ;;                           # report: romp-ibm BSD 4.3
     557    exit ;;                             # report: romp-ibm BSD 4.3
    587558    *:BOSX:*:*)
    588559    echo rs6000-bull-bosx
    589     exit 0 ;;
     560    exit ;;
    590561    DPX/2?00:B.O.S.:*:*)
    591562    echo m68k-bull-sysv3
    592     exit 0 ;;
     563    exit ;;
    593564    9000/[34]??:4.3bsd:1.*:*)
    594565    echo m68k-hp-bsd
    595     exit 0 ;;
     566    exit ;;
    596567    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
    597568    echo m68k-hp-bsd4.4
    598     exit 0 ;;
     569    exit ;;
    599570    9000/[34678]??:HP-UX:*:*)
    600571    HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
    601572    case "${UNAME_MACHINE}" in
     
    657628    esac
    658629    if [ ${HP_ARCH} = "hppa2.0w" ]
    659630    then
    660         # avoid double evaluation of $set_cc_for_build
    661         test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
    662         if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
     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
    663644        then
    664645        HP_ARCH="hppa2.0w"
    665646        else
     
    667648        fi
    668649    fi
    669650    echo ${HP_ARCH}-hp-hpux${HPUX_REV}
    670     exit 0 ;;
     651    exit ;;
    671652    ia64:HP-UX:*:*)
    672653    HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
    673654    echo ia64-hp-hpux${HPUX_REV}
    674     exit 0 ;;
     655    exit ;;
    675656    3050*:HI-UX:*:*)
    676657    eval $set_cc_for_build
    677658    sed 's/^    //' << EOF >$dummy.c
     
    699680      exit (0);
    700681    }
    701682EOF
    702     $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
     683    $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
     684        { echo "$SYSTEM_NAME"; exit; }
    703685    echo unknown-hitachi-hiuxwe2
    704     exit 0 ;;
     686    exit ;;
    705687    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
    706688    echo hppa1.1-hp-bsd
    707     exit 0 ;;
     689    exit ;;
    708690    9000/8??:4.3bsd:*:*)
    709691    echo hppa1.0-hp-bsd
    710     exit 0 ;;
     692    exit ;;
    711693    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
    712694    echo hppa1.0-hp-mpeix
    713     exit 0 ;;
     695    exit ;;
    714696    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
    715697    echo hppa1.1-hp-osf
    716     exit 0 ;;
     698    exit ;;
    717699    hp8??:OSF1:*:*)
    718700    echo hppa1.0-hp-osf
    719     exit 0 ;;
     701    exit ;;
    720702    i*86:OSF1:*:*)
    721703    if [ -x /usr/sbin/sysversion ] ; then
    722704        echo ${UNAME_MACHINE}-unknown-osf1mk
    723705    else
    724706        echo ${UNAME_MACHINE}-unknown-osf1
    725707    fi
    726     exit 0 ;;
     708    exit ;;
    727709    parisc*:Lites*:*:*)
    728710    echo hppa1.1-hp-lites
    729     exit 0 ;;
     711    exit ;;
    730712    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
    731713    echo c1-convex-bsd
    732         exit 0 ;;
     714        exit ;;
    733715    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
    734716    if getsysinfo -f scalar_acc
    735717    then echo c32-convex-bsd
    736718    else echo c2-convex-bsd
    737719    fi
    738         exit 0 ;;
     720        exit ;;
    739721    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
    740722    echo c34-convex-bsd
    741         exit 0 ;;
     723        exit ;;
    742724    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
    743725    echo c38-convex-bsd
    744         exit 0 ;;
     726        exit ;;
    745727    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
    746728    echo c4-convex-bsd
    747         exit 0 ;;
     729        exit ;;
    748730    CRAY*Y-MP:*:*:*)
    749731    echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    750     exit 0 ;;
     732    exit ;;
    751733    CRAY*[A-Z]90:*:*:*)
    752734    echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
    753735    | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
    754736          -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
    755737          -e 's/\.[^.]*$/.X/'
    756     exit 0 ;;
     738    exit ;;
    757739    CRAY*TS:*:*:*)
    758740    echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    759     exit 0 ;;
     741    exit ;;
    760742    CRAY*T3E:*:*:*)
    761743    echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    762     exit 0 ;;
     744    exit ;;
    763745    CRAY*SV1:*:*:*)
    764746    echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    765     exit 0 ;;
     747    exit ;;
    766748    *:UNICOS/mp:*:*)
    767     echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    768     exit 0 ;;
     749    echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     750    exit ;;
    769751    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
    770752    FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
    771753        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
    772754        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
    773755        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    774         exit 0 ;;
     756        exit ;;
    775757    5000:UNIX_System_V:4.*:*)
    776758        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
    777759        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
    778760        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    779     exit 0 ;;
     761    exit ;;
    780762    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
    781763    echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
    782     exit 0 ;;
     764    exit ;;
    783765    sparc*:BSD/OS:*:*)
    784766    echo sparc-unknown-bsdi${UNAME_RELEASE}
    785     exit 0 ;;
     767    exit ;;
    786768    *:BSD/OS:*:*)
    787769    echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
    788     exit 0 ;;
     770    exit ;;
    789771    *:FreeBSD:*:*)
    790     # Determine whether the default compiler uses glibc.
    791     eval $set_cc_for_build
    792     sed 's/^    //' << EOF >$dummy.c
    793     #include <features.h>
    794     #if __GLIBC__ >= 2
    795     LIBC=gnu
    796     #else
    797     LIBC=
    798     #endif
    799 EOF
    800     eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
    801     # GNU/KFreeBSD systems have a "k" prefix to indicate we are using
    802     # FreeBSD's kernel, but not the complete OS.
    803     case ${LIBC} in gnu) kernel_only='k' ;; esac
    804     echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
    805     exit 0 ;;
     772    case ${UNAME_MACHINE} in
     773        pc98)
     774        echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
     775        amd64)
     776        echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
     777        *)
     778        echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
     779    esac
     780    exit ;;
    806781    i*:CYGWIN*:*)
    807782    echo ${UNAME_MACHINE}-pc-cygwin
    808     exit 0 ;;
    809     i*:MINGW*:*)
     783    exit ;;
     784    *:MINGW*:*)
    810785    echo ${UNAME_MACHINE}-pc-mingw32
    811     exit 0 ;;
     786    exit ;;
     787    i*:windows32*:*)
     788        # uname -m includes "-pc" on this system.
     789        echo ${UNAME_MACHINE}-mingw32
     790    exit ;;
    812791    i*:PW*:*)
    813792    echo ${UNAME_MACHINE}-pc-pw32
    814     exit 0 ;;
    815     x86:Interix*:[34]*)
    816     echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
    817     exit 0 ;;
     793    exit ;;
     794    *:Interix*:[3456]*)
     795        case ${UNAME_MACHINE} in
     796        x86)
     797        echo i586-pc-interix${UNAME_RELEASE}
     798        exit ;;
     799        EM64T | authenticamd)
     800        echo x86_64-unknown-interix${UNAME_RELEASE}
     801        exit ;;
     802        IA64)
     803        echo ia64-unknown-interix${UNAME_RELEASE}
     804        exit ;;
     805    esac ;;
    818806    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
    819807    echo i${UNAME_MACHINE}-pc-mks
    820     exit 0 ;;
     808    exit ;;
    821809    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
    822810    # How do we know it's Interix rather than the generic POSIX subsystem?
    823811    # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
    824812    # UNAME_MACHINE based on the output of uname instead of i386?
    825813    echo i586-pc-interix
    826     exit 0 ;;
     814    exit ;;
    827815    i*:UWIN*:*)
    828816    echo ${UNAME_MACHINE}-pc-uwin
    829     exit 0 ;;
     817    exit ;;
     818    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
     819    echo x86_64-unknown-cygwin
     820    exit ;;
    830821    p*:CYGWIN*:*)
    831822    echo powerpcle-unknown-cygwin
    832     exit 0 ;;
     823    exit ;;
    833824    prep*:SunOS:5.*:*)
    834825    echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    835     exit 0 ;;
     826    exit ;;
    836827    *:GNU:*:*)
    837828    # the GNU system
    838829    echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
    839     exit 0 ;;
     830    exit ;;
    840831    *:GNU/*:*:*)
    841832    # other systems with GNU libc and userland
    842833    echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
    843     exit 0 ;;
     834    exit ;;
    844835    i*86:Minix:*:*)
    845836    echo ${UNAME_MACHINE}-pc-minix
    846     exit 0 ;;
     837    exit ;;
    847838    arm*:Linux:*:*)
     839    eval $set_cc_for_build
     840    if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
     841        | grep -q __ARM_EABI__
     842    then
     843        echo ${UNAME_MACHINE}-unknown-linux-gnu
     844    else
     845        echo ${UNAME_MACHINE}-unknown-linux-gnueabi
     846    fi
     847    exit ;;
     848    avr32*:Linux:*:*)
    848849    echo ${UNAME_MACHINE}-unknown-linux-gnu
    849     exit 0 ;;
     850    exit ;;
    850851    cris:Linux:*:*)
    851852    echo cris-axis-linux-gnu
    852     exit 0 ;;
     853    exit ;;
     854    crisv32:Linux:*:*)
     855    echo crisv32-axis-linux-gnu
     856    exit ;;
     857    frv:Linux:*:*)
     858        echo frv-unknown-linux-gnu
     859    exit ;;
    853860    ia64:Linux:*:*)
    854861    echo ${UNAME_MACHINE}-unknown-linux-gnu
    855     exit 0 ;;
     862    exit ;;
    856863    m32r*:Linux:*:*)
    857864    echo ${UNAME_MACHINE}-unknown-linux-gnu
    858     exit 0 ;;
     865    exit ;;
    859866    m68*:Linux:*:*)
    860867    echo ${UNAME_MACHINE}-unknown-linux-gnu
    861     exit 0 ;;
     868    exit ;;
    862869    mips:Linux:*:*)
    863870    eval $set_cc_for_build
    864871    sed 's/^    //' << EOF >$dummy.c
     
    875882    #endif
    876883    #endif
    877884EOF
    878     eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
    879     test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
     885    eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
     886        /^CPU/{
     887        s: ::g
     888        p
     889        }'`"
     890    test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
    880891    ;;
    881892    mips64:Linux:*:*)
    882893    eval $set_cc_for_build
     
    894905    #endif
    895906    #endif
    896907EOF
    897     eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
    898     test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
     908    eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
     909        /^CPU/{
     910        s: ::g
     911        p
     912        }'`"
     913    test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
    899914    ;;
     915    or32:Linux:*:*)
     916    echo or32-unknown-linux-gnu
     917    exit ;;
    900918    ppc:Linux:*:*)
    901919    echo powerpc-unknown-linux-gnu
    902     exit 0 ;;
     920    exit ;;
    903921    ppc64:Linux:*:*)
    904922    echo powerpc64-unknown-linux-gnu
    905     exit 0 ;;
     923    exit ;;
    906924    alpha:Linux:*:*)
    907925    case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
    908926      EV5)   UNAME_MACHINE=alphaev5 ;;
     
    916934    objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
    917935    if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
    918936    echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
    919     exit 0 ;;
     937    exit ;;
    920938    parisc:Linux:*:* | hppa:Linux:*:*)
    921939    # Look for CPU level
    922940    case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
     
    924942      PA8*) echo hppa2.0-unknown-linux-gnu ;;
    925943      *)    echo hppa-unknown-linux-gnu ;;
    926944    esac
    927     exit 0 ;;
     945    exit ;;
    928946    parisc64:Linux:*:* | hppa64:Linux:*:*)
    929947    echo hppa64-unknown-linux-gnu
    930     exit 0 ;;
     948    exit ;;
    931949    s390:Linux:*:* | s390x:Linux:*:*)
    932950    echo ${UNAME_MACHINE}-ibm-linux
    933     exit 0 ;;
     951    exit ;;
    934952    sh64*:Linux:*:*)
    935953        echo ${UNAME_MACHINE}-unknown-linux-gnu
    936     exit 0 ;;
     954    exit ;;
    937955    sh*:Linux:*:*)
    938956    echo ${UNAME_MACHINE}-unknown-linux-gnu
    939     exit 0 ;;
     957    exit ;;
    940958    sparc:Linux:*:* | sparc64:Linux:*:*)
    941959    echo ${UNAME_MACHINE}-unknown-linux-gnu
    942     exit 0 ;;
     960    exit ;;
     961    vax:Linux:*:*)
     962    echo ${UNAME_MACHINE}-dec-linux-gnu
     963    exit ;;
    943964    x86_64:Linux:*:*)
    944965    echo x86_64-unknown-linux-gnu
    945     exit 0 ;;
     966    exit ;;
     967    xtensa*:Linux:*:*)
     968        echo ${UNAME_MACHINE}-unknown-linux-gnu
     969    exit ;;
    946970    i*86:Linux:*:*)
    947971    # The BFD linker knows what the default object file format is, so
    948972    # first see if it will tell us. cd to the root directory to prevent
     
    960984        ;;
    961985      a.out-i386-linux)
    962986        echo "${UNAME_MACHINE}-pc-linux-gnuaout"
    963         exit 0 ;;
     987        exit ;;
    964988      coff-i386)
    965989        echo "${UNAME_MACHINE}-pc-linux-gnucoff"
    966         exit 0 ;;
     990        exit ;;
    967991      "")
    968992        # Either a pre-BFD a.out linker (linux-gnuoldld) or
    969993        # one that does not give us useful --help.
    970994        echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
    971         exit 0 ;;
     995        exit ;;
    972996    esac
    973997    # Determine whether the default compiler is a.out or elf
    974998    eval $set_cc_for_build
     
    9851009    LIBC=gnulibc1
    9861010    # endif
    9871011    #else
    988     #ifdef __INTEL_COMPILER
     1012    #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
    9891013    LIBC=gnu
    9901014    #else
    9911015    LIBC=gnuaout
     
    9951019    LIBC=dietlibc
    9961020    #endif
    9971021EOF
    998     eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
    999     test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
    1000     test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
     1022    eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
     1023        /^LIBC/{
     1024        s: ::g
     1025        p
     1026        }'`"
     1027    test x"${LIBC}" != x && {
     1028        echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
     1029        exit
     1030    }
     1031    test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
    10011032    ;;
    10021033    i*86:DYNIX/ptx:4*:*)
    10031034    # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
    10041035    # earlier versions are messed up and put the nodename in both
    10051036    # sysname and nodename.
    10061037    echo i386-sequent-sysv4
    1007     exit 0 ;;
     1038    exit ;;
    10081039    i*86:UNIX_SV:4.2MP:2.*)
    10091040        # Unixware is an offshoot of SVR4, but it has its own version
    10101041        # number series starting with 2...
     
    10121043    # I just have to hope.  -- rms.
    10131044        # Use sysv4.2uw... so that sysv4* matches it.
    10141045    echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
    1015     exit 0 ;;
     1046    exit ;;
    10161047    i*86:OS/2:*:*)
    10171048    # If we were able to find `uname', then EMX Unix compatibility
    10181049    # is probably installed.
    10191050    echo ${UNAME_MACHINE}-pc-os2-emx
    1020     exit 0 ;;
     1051    exit ;;
    10211052    i*86:XTS-300:*:STOP)
    10221053    echo ${UNAME_MACHINE}-unknown-stop
    1023     exit 0 ;;
     1054    exit ;;
    10241055    i*86:atheos:*:*)
    10251056    echo ${UNAME_MACHINE}-unknown-atheos
    1026     exit 0 ;;
    1027     i*86:syllable:*:*)
     1057    exit ;;
     1058    i*86:syllable:*:*)
    10281059    echo ${UNAME_MACHINE}-pc-syllable
    1029     exit 0 ;;
     1060    exit ;;
    10301061    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
    10311062    echo i386-unknown-lynxos${UNAME_RELEASE}
    1032     exit 0 ;;
     1063    exit ;;
    10331064    i*86:*DOS:*:*)
    10341065    echo ${UNAME_MACHINE}-pc-msdosdjgpp
    1035     exit 0 ;;
     1066    exit ;;
    10361067    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
    10371068    UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
    10381069    if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
     
    10401071    else
    10411072        echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
    10421073    fi
    1043     exit 0 ;;
    1044     i*86:*:5:[78]*)
     1074    exit ;;
     1075    i*86:*:5:[678]*)
     1076        # UnixWare 7.x, OpenUNIX and OpenServer 6.
    10451077    case `/bin/uname -X | grep "^Machine"` in
    10461078        *486*)       UNAME_MACHINE=i486 ;;
    10471079        *Pentium)        UNAME_MACHINE=i586 ;;
    10481080        *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
    10491081    esac
    10501082    echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
    1051     exit 0 ;;
     1083    exit ;;
    10521084    i*86:*:3.2:*)
    10531085    if test -f /usr/options/cb.name; then
    10541086        UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
     
    10661098    else
    10671099        echo ${UNAME_MACHINE}-pc-sysv32
    10681100    fi
    1069     exit 0 ;;
     1101    exit ;;
    10701102    pc:*:*:*)
    10711103    # Left here for compatibility:
    10721104        # uname -m prints for DJGPP always 'pc', but it prints nothing about
    10731105        # the processor, so we play safe by assuming i386.
    10741106    echo i386-pc-msdosdjgpp
    1075         exit 0 ;;
     1107        exit ;;
    10761108    Intel:Mach:3*:*)
    10771109    echo i386-pc-mach3
    1078     exit 0 ;;
     1110    exit ;;
    10791111    paragon:*:*:*)
    10801112    echo i860-intel-osf1
    1081     exit 0 ;;
     1113    exit ;;
    10821114    i860:*:4.*:*) # i860-SVR4
    10831115    if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
    10841116      echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
    10851117    else # Add other i860-SVR4 vendors below as they are discovered.
    10861118      echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
    10871119    fi
    1088     exit 0 ;;
     1120    exit ;;
    10891121    mini*:CTIX:SYS*5:*)
    10901122    # "miniframe"
    10911123    echo m68010-convergent-sysv
    1092     exit 0 ;;
     1124    exit ;;
    10931125    mc68k:UNIX:SYSTEM5:3.51m)
    10941126    echo m68k-convergent-sysv
    1095     exit 0 ;;
     1127    exit ;;
    10961128    M680?0:D-NIX:5.3:*)
    10971129    echo m68k-diab-dnix
    1098     exit 0 ;;
     1130    exit ;;
    10991131    M68*:*:R3V[5678]*:*)
    1100     test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
    1101     3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
     1132    test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
     1133    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
    11021134    OS_REL=''
    11031135    test -r /etc/.relid \
    11041136    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
    11051137    /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
    1106       && echo i486-ncr-sysv4.3${OS_REL} && exit 0
     1138      && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
    11071139    /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
    1108       && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
     1140      && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
    11091141    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
    11101142        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
    1111           && echo i486-ncr-sysv4 && exit 0 ;;
     1143          && { echo i486-ncr-sysv4; exit; } ;;
    11121144    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
    11131145    echo m68k-unknown-lynxos${UNAME_RELEASE}
    1114     exit 0 ;;
     1146    exit ;;
    11151147    mc68030:UNIX_System_V:4.*:*)
    11161148    echo m68k-atari-sysv4
    1117     exit 0 ;;
     1149    exit ;;
    11181150    TSUNAMI:LynxOS:2.*:*)
    11191151    echo sparc-unknown-lynxos${UNAME_RELEASE}
    1120     exit 0 ;;
     1152    exit ;;
    11211153    rs6000:LynxOS:2.*:*)
    11221154    echo rs6000-unknown-lynxos${UNAME_RELEASE}
    1123     exit 0 ;;
     1155    exit ;;
    11241156    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
    11251157    echo powerpc-unknown-lynxos${UNAME_RELEASE}
    1126     exit 0 ;;
     1158    exit ;;
    11271159    SM[BE]S:UNIX_SV:*:*)
    11281160    echo mips-dde-sysv${UNAME_RELEASE}
    1129     exit 0 ;;
     1161    exit ;;
    11301162    RM*:ReliantUNIX-*:*:*)
    11311163    echo mips-sni-sysv4
    1132     exit 0 ;;
     1164    exit ;;
    11331165    RM*:SINIX-*:*:*)
    11341166    echo mips-sni-sysv4
    1135     exit 0 ;;
     1167    exit ;;
    11361168    *:SINIX-*:*:*)
    11371169    if uname -p 2>/dev/null >/dev/null ; then
    11381170        UNAME_MACHINE=`(uname -p) 2>/dev/null`
     
    11401172    else
    11411173        echo ns32k-sni-sysv
    11421174    fi
    1143     exit 0 ;;
     1175    exit ;;
    11441176    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
    11451177                      # says <Richard.M.Bartel@ccMail.Census.GOV>
    11461178        echo i586-unisys-sysv4
    1147         exit 0 ;;
     1179        exit ;;
    11481180    *:UNIX_System_V:4*:FTX*)
    11491181    # From Gerald Hewes <hewes@openmarket.com>.
    11501182    # How about differentiating between stratus architectures? -djm
    11511183    echo hppa1.1-stratus-sysv4
    1152     exit 0 ;;
     1184    exit ;;
    11531185    *:*:*:FTX*)
    11541186    # From seanf@swdc.stratus.com.
    11551187    echo i860-stratus-sysv4
    1156     exit 0 ;;
     1188    exit ;;
     1189    i*86:VOS:*:*)
     1190    # From Paul.Green@stratus.com.
     1191    echo ${UNAME_MACHINE}-stratus-vos
     1192    exit ;;
    11571193    *:VOS:*:*)
    11581194    # From Paul.Green@stratus.com.
    11591195    echo hppa1.1-stratus-vos
    1160     exit 0 ;;
     1196    exit ;;
    11611197    mc68*:A/UX:*:*)
    11621198    echo m68k-apple-aux${UNAME_RELEASE}
    1163     exit 0 ;;
     1199    exit ;;
    11641200    news*:NEWS-OS:6*:*)
    11651201    echo mips-sony-newsos6
    1166     exit 0 ;;
     1202    exit ;;
    11671203    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
    11681204    if [ -d /usr/nec ]; then
    11691205            echo mips-nec-sysv${UNAME_RELEASE}
    11701206    else
    11711207            echo mips-unknown-sysv${UNAME_RELEASE}
    11721208    fi
    1173         exit 0 ;;
     1209        exit ;;
    11741210    BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
    11751211    echo powerpc-be-beos
    1176     exit 0 ;;
     1212    exit ;;
    11771213    BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
    11781214    echo powerpc-apple-beos
    1179     exit 0 ;;
     1215    exit ;;
    11801216    BePC:BeOS:*:*)  # BeOS running on Intel PC compatible.
    11811217    echo i586-pc-beos
    1182     exit 0 ;;
     1218    exit ;;
     1219    BeMac:Haiku:*:*)
     1220    echo powerpc-apple-haiku
     1221    exit ;;
     1222    BePC:Haiku:*:*)
     1223    echo i586-pc-haiku
     1224    exit ;;
    11831225    SX-4:SUPER-UX:*:*)
    11841226    echo sx4-nec-superux${UNAME_RELEASE}
    1185     exit 0 ;;
     1227    exit ;;
    11861228    SX-5:SUPER-UX:*:*)
    11871229    echo sx5-nec-superux${UNAME_RELEASE}
    1188     exit 0 ;;
     1230    exit ;;
    11891231    SX-6:SUPER-UX:*:*)
    11901232    echo sx6-nec-superux${UNAME_RELEASE}
    1191     exit 0 ;;
     1233    exit ;;
     1234    SX-7:SUPER-UX:*:*)
     1235    echo sx7-nec-superux${UNAME_RELEASE}
     1236    exit ;;
     1237    SX-8:SUPER-UX:*:*)
     1238    echo sx8-nec-superux${UNAME_RELEASE}
     1239    exit ;;
     1240    SX-8R:SUPER-UX:*:*)
     1241    echo sx8r-nec-superux${UNAME_RELEASE}
     1242    exit ;;
    11921243    Power*:Rhapsody:*:*)
    11931244    echo powerpc-apple-rhapsody${UNAME_RELEASE}
    1194     exit 0 ;;
     1245    exit ;;
    11951246    *:Rhapsody:*:*)
    11961247    echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
    1197     exit 0 ;;
     1248    exit ;;
    11981249    *:Darwin:*:*)
    1199     case `uname -p` in
    1200         *86) UNAME_PROCESSOR=i686 ;;
    1201         powerpc) UNAME_PROCESSOR=powerpc ;;
     1250    UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
     1251    case $UNAME_PROCESSOR in
     1252        unknown) UNAME_PROCESSOR=powerpc ;;
    12021253    esac
    12031254    echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
    1204     exit 0 ;;
     1255    exit ;;
    12051256    *:procnto*:*:* | *:QNX:[0123456789]*:*)
    12061257    UNAME_PROCESSOR=`uname -p`
    12071258    if test "$UNAME_PROCESSOR" = "x86"; then
     
    12091260        UNAME_MACHINE=pc
    12101261    fi
    12111262    echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
    1212     exit 0 ;;
     1263    exit ;;
    12131264    *:QNX:*:4*)
    12141265    echo i386-pc-qnx
    1215     exit 0 ;;
     1266    exit ;;
     1267    NSE-?:NONSTOP_KERNEL:*:*)
     1268    echo nse-tandem-nsk${UNAME_RELEASE}
     1269    exit ;;
    12161270    NSR-?:NONSTOP_KERNEL:*:*)
    12171271    echo nsr-tandem-nsk${UNAME_RELEASE}
    1218     exit 0 ;;
     1272    exit ;;
    12191273    *:NonStop-UX:*:*)
    12201274    echo mips-compaq-nonstopux
    1221     exit 0 ;;
     1275    exit ;;
    12221276    BS2000:POSIX*:*:*)
    12231277    echo bs2000-siemens-sysv
    1224     exit 0 ;;
     1278    exit ;;
    12251279    DS/*:UNIX_System_V:*:*)
    12261280    echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
    1227     exit 0 ;;
     1281    exit ;;
    12281282    *:Plan9:*:*)
    12291283    # "uname -m" is not consistent, so use $cputype instead. 386
    12301284    # is converted to i386 for consistency with other x86
     
    12351289        UNAME_MACHINE="$cputype"
    12361290    fi
    12371291    echo ${UNAME_MACHINE}-unknown-plan9
    1238     exit 0 ;;
     1292    exit ;;
    12391293    *:TOPS-10:*:*)
    12401294    echo pdp10-unknown-tops10
    1241     exit 0 ;;
     1295    exit ;;
    12421296    *:TENEX:*:*)
    12431297    echo pdp10-unknown-tenex
    1244     exit 0 ;;
     1298    exit ;;
    12451299    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
    12461300    echo pdp10-dec-tops20
    1247     exit 0 ;;
     1301    exit ;;
    12481302    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
    12491303    echo pdp10-xkl-tops20
    1250     exit 0 ;;
     1304    exit ;;
    12511305    *:TOPS-20:*:*)
    12521306    echo pdp10-unknown-tops20
    1253     exit 0 ;;
     1307    exit ;;
    12541308    *:ITS:*:*)
    12551309    echo pdp10-unknown-its
    1256     exit 0 ;;
     1310    exit ;;
    12571311    SEI:*:*:SEIUX)
    12581312        echo mips-sei-seiux${UNAME_RELEASE}
    1259     exit 0 ;;
     1313    exit ;;
    12601314    *:DragonFly:*:*)
    12611315    echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
    1262     exit 0 ;;
     1316    exit ;;
     1317    *:*VMS:*:*)
     1318        UNAME_MACHINE=`(uname -p) 2>/dev/null`
     1319    case "${UNAME_MACHINE}" in
     1320        A*) echo alpha-dec-vms ; exit ;;
     1321        I*) echo ia64-dec-vms ; exit ;;
     1322        V*) echo vax-dec-vms ; exit ;;
     1323    esac ;;
     1324    *:XENIX:*:SysV)
     1325    echo i386-pc-xenix
     1326    exit ;;
     1327    i*86:skyos:*:*)
     1328    echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
     1329    exit ;;
     1330    i*86:rdos:*:*)
     1331    echo ${UNAME_MACHINE}-pc-rdos
     1332    exit ;;
    12631333esac
    12641334
    12651335#echo '(No uname command or uname output not recognized.)' 1>&2
     
    12911361#endif
    12921362
    12931363#if defined (__arm) && defined (__acorn) && defined (__unix)
    1294   printf ("arm-acorn-riscix"); exit (0);
     1364  printf ("arm-acorn-riscix\n"); exit (0);
    12951365#endif
    12961366
    12971367#if defined (hp300) && !defined (hpux)
     
    13801450}
    13811451EOF
    13821452
    1383 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
     1453$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
     1454    { echo "$SYSTEM_NAME"; exit; }
    13841455
    13851456# Apollos put the system type in the environment.
    13861457
    1387 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
     1458test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
    13881459
    13891460# Convex versions that predate uname can use getsysinfo(1)
    13901461
     
    13931464    case `getsysinfo -f cpu_type` in
    13941465    c1*)
    13951466    echo c1-convex-bsd
    1396     exit 0 ;;
     1467    exit ;;
    13971468    c2*)
    13981469    if getsysinfo -f scalar_acc
    13991470    then echo c32-convex-bsd
    14001471    else echo c2-convex-bsd
    14011472    fi
    1402     exit 0 ;;
     1473    exit ;;
    14031474    c34*)
    14041475    echo c34-convex-bsd
    1405     exit 0 ;;
     1476    exit ;;
    14061477    c38*)
    14071478    echo c38-convex-bsd
    1408     exit 0 ;;
     1479    exit ;;
    14091480    c4*)
    14101481    echo c4-convex-bsd
    1411     exit 0 ;;
     1482    exit ;;
    14121483    esac
    14131484fi
    14141485
     
    14191490the operating system you are using. It is advised that you
    14201491download the most up to date version of the config scripts from
    14211492
    1422     ftp://ftp.gnu.org/pub/gnu/config/
     1493  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
     1494and
     1495  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
    14231496
    14241497If the version you run ($0) is already up to date, please
    14251498send the following data and any information you think might be
  • config.sub

     
    11#! /bin/sh
    22# Configuration validation subroutine script.
    33#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    4 #   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
     4#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
     5#   Free Software Foundation, Inc.
    56
    6 timestamp='2004-06-11'
     7timestamp='2008-01-16'
    78
    89# This file is (in principle) common to ALL GNU software.
    910# The presence of a machine in this file suggests that SOME GNU software
     
    2122#
    2223# You should have received a copy of the GNU General Public License
    2324# along with this program; if not, write to the Free Software
    24 # Foundation, Inc., 59 Temple Place - Suite 330,
    25 # Boston, MA 02111-1307, USA.
    26 
     25# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
     26# 02110-1301, USA.
     27#
    2728# As a special exception to the GNU General Public License, if you
    2829# distribute this file as part of a program that contains a
    2930# configuration script generated by Autoconf, you may include it under
    3031# the same distribution terms that you use for the rest of that program.
    3132
     33
    3234# Please send patches to <config-patches@gnu.org>.  Submit a context
    3335# diff and a properly formatted ChangeLog entry.
    3436#
     
    7072version="\
    7173GNU config.sub ($timestamp)
    7274
    73 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
    74 Free Software Foundation, Inc.
     75Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
     762002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
    7577
    7678This is free software; see the source for copying conditions.  There is NO
    7779warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
     
    8385while test $# -gt 0 ; do
    8486  case $1 in
    8587    --time-stamp | --time* | -t )
    86        echo "$timestamp" ; exit 0 ;;
     88       echo "$timestamp" ; exit ;;
    8789    --version | -v )
    88        echo "$version" ; exit 0 ;;
     90       echo "$version" ; exit ;;
    8991    --help | --h* | -h )
    90        echo "$usage"; exit 0 ;;
     92       echo "$usage"; exit ;;
    9193    -- )     # Stop option processing
    9294       shift; break ;;
    9395    - ) # Use stdin as input.
     
    99101    *local*)
    100102       # First pass through any local machine types.
    101103       echo $1
    102        exit 0;;
     104       exit ;;
    103105
    104106    * )
    105107       break ;;
     
    118120# Here we must recognize all the valid KERNEL-OS combinations.
    119121maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
    120122case $maybe_os in
    121   nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
    122   kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
     123  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
     124  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
     125  storm-chaos* | os2-emx* | rtmk-nova*)
    123126    os=-$maybe_os
    124127    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
    125128    ;;
     
    145148    -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
    146149    -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
    147150    -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
    148     -apple | -axis)
     151    -apple | -axis | -knuth | -cray)
    149152        os=
    150153        basic_machine=$1
    151154        ;;
     
    170173    -hiux*)
    171174        os=-hiuxwe2
    172175        ;;
     176    -sco6)
     177        os=-sco5v6
     178        basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
     179        ;;
    173180    -sco5)
    174181        os=-sco3.2v5
    175182        basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
     
    186193        # Don't forget version if it is 3.2v4 or newer.
    187194        basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    188195        ;;
     196    -sco5v6*)
     197        # Don't forget version if it is 3.2v4 or newer.
     198        basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
     199        ;;
    189200    -sco*)
    190201        os=-sco3.2v2
    191202        basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
     
    230241    | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
    231242    | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
    232243    | am33_2.0 \
    233     | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
     244    | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
     245    | bfin \
    234246    | c4x | clipper \
    235247    | d10v | d30v | dlx | dsp16xx \
    236     | fr30 | frv \
     248    | fido | fr30 | frv \
    237249    | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
    238250    | i370 | i860 | i960 | ia64 \
    239251    | ip2k | iq2000 \
    240     | m32r | m68000 | m68k | m88k | mcore \
     252    | m32c | m32r | m32rle | m68000 | m68k | m88k \
     253    | maxq | mb | microblaze | mcore | mep \
    241254    | mips | mipsbe | mipseb | mipsel | mipsle \
    242255    | mips16 \
    243256    | mips64 | mips64el \
     
    246259    | mips64vr4100 | mips64vr4100el \
    247260    | mips64vr4300 | mips64vr4300el \
    248261    | mips64vr5000 | mips64vr5000el \
     262    | mips64vr5900 | mips64vr5900el \
    249263    | mipsisa32 | mipsisa32el \
    250264    | mipsisa32r2 | mipsisa32r2el \
    251265    | mipsisa64 | mipsisa64el \
     
    254268    | mipsisa64sr71k | mipsisa64sr71kel \
    255269    | mipstx39 | mipstx39el \
    256270    | mn10200 | mn10300 \
     271    | mt \
    257272    | msp430 \
     273    | nios | nios2 \
    258274    | ns16k | ns32k \
    259     | openrisc | or32 \
     275    | or32 \
    260276    | pdp10 | pdp11 | pj | pjl \
    261277    | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
    262278    | pyramid \
    263     | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
     279    | score \
     280    | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
    264281    | sh64 | sh64le \
    265     | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
    266     | strongarm \
     282    | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
     283    | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
     284    | spu | strongarm \
    267285    | tahoe | thumb | tic4x | tic80 | tron \
    268286    | v850 | v850e \
    269287    | we32k \
    270     | x86 | xscale | xstormy16 | xtensa \
     288    | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
    271289    | z8k)
    272290        basic_machine=$basic_machine-unknown
    273291        ;;
     
    278296        ;;
    279297    m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
    280298        ;;
     299    ms1)
     300        basic_machine=mt-unknown
     301        ;;
    281302
    282303    # We use `pc' rather than `unknown'
    283304    # because (1) that's what they normally are, and
     
    297318    | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
    298319    | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
    299320    | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
    300     | avr-* \
    301     | bs2000-* \
     321    | avr-* | avr32-* \
     322    | bfin-* | bs2000-* \
    302323    | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
    303     | clipper-* | cydra-* \
     324    | clipper-* | craynv-* | cydra-* \
    304325    | d10v-* | d30v-* | dlx-* \
    305326    | elxsi-* \
    306     | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
     327    | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
    307328    | h8300-* | h8500-* \
    308329    | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
    309330    | i*86-* | i860-* | i960-* | ia64-* \
    310331    | ip2k-* | iq2000-* \
    311     | m32r-* \
     332    | m32c-* | m32r-* | m32rle-* \
    312333    | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
    313     | m88110-* | m88k-* | mcore-* \
     334    | m88110-* | m88k-* | maxq-* | mcore-* \
    314335    | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
    315336    | mips16-* \
    316337    | mips64-* | mips64el-* \
     
    319340    | mips64vr4100-* | mips64vr4100el-* \
    320341    | mips64vr4300-* | mips64vr4300el-* \
    321342    | mips64vr5000-* | mips64vr5000el-* \
     343    | mips64vr5900-* | mips64vr5900el-* \
    322344    | mipsisa32-* | mipsisa32el-* \
    323345    | mipsisa32r2-* | mipsisa32r2el-* \
    324346    | mipsisa64-* | mipsisa64el-* \
     
    326348    | mipsisa64sb1-* | mipsisa64sb1el-* \
    327349    | mipsisa64sr71k-* | mipsisa64sr71kel-* \
    328350    | mipstx39-* | mipstx39el-* \
     351    | mmix-* \
     352    | mt-* \
    329353    | msp430-* \
    330     | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
     354    | nios-* | nios2-* \
     355    | none-* | np1-* | ns16k-* | ns32k-* \
    331356    | orion-* \
    332357    | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
    333358    | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
    334359    | pyramid-* \
    335360    | romp-* | rs6000-* \
    336     | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
     361    | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
    337362    | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
    338     | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
    339     | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
     363    | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
     364    | sparclite-* \
     365    | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
    340366    | tahoe-* | thumb-* \
    341367    | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
    342368    | tron-* \
    343369    | v850-* | v850e-* | vax-* \
    344370    | we32k-* \
    345     | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
    346     | xtensa-* \
     371    | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
     372    | xstormy16-* | xtensa*-* \
    347373    | ymp-* \
    348374    | z8k-*)
    349375        ;;
     376    # Recognize the basic CPU types without company name, with glob match.
     377    xtensa*)
     378        basic_machine=$basic_machine-unknown
     379        ;;
    350380    # Recognize the various machine names and aliases which stand
    351381    # for a CPU type and a company and sometimes even an OS.
    352382    386bsd)
     
    363393        basic_machine=a29k-amd
    364394        os=-udi
    365395        ;;
     396        abacus)
     397        basic_machine=abacus-unknown
     398        ;;
    366399    adobe68k)
    367400        basic_machine=m68010-adobe
    368401        os=-scout
     
    414447        basic_machine=ns32k-sequent
    415448        os=-dynix
    416449        ;;
     450    blackfin)
     451        basic_machine=bfin-unknown
     452        os=-linux
     453        ;;
     454    blackfin-*)
     455        basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
     456        os=-linux
     457        ;;
    417458    c90)
    418459        basic_machine=c90-cray
    419460        os=-unicos
     
    442483        basic_machine=j90-cray
    443484        os=-unicos
    444485        ;;
     486    craynv)
     487        basic_machine=craynv-cray
     488        os=-unicosmp
     489        ;;
     490    cr16)
     491        basic_machine=cr16-unknown
     492        os=-elf
     493        ;;
    445494    crds | unos)
    446495        basic_machine=m68k-crds
    447496        ;;
     497    crisv32 | crisv32-* | etraxfs*)
     498        basic_machine=crisv32-axis
     499        ;;
    448500    cris | cris-* | etrax*)
    449501        basic_machine=cris-axis
    450502        ;;
     503    crx)
     504        basic_machine=crx-unknown
     505        os=-elf
     506        ;;
    451507    da30 | da30-*)
    452508        basic_machine=m68k-da30
    453509        ;;
     
    470526        basic_machine=m88k-motorola
    471527        os=-sysv3
    472528        ;;
     529    djgpp)
     530        basic_machine=i586-pc
     531        os=-msdosdjgpp
     532        ;;
    473533    dpx20 | dpx20-*)
    474534        basic_machine=rs6000-bull
    475535        os=-bosx
     
    620680        basic_machine=m68k-isi
    621681        os=-sysv
    622682        ;;
     683    m68knommu)
     684        basic_machine=m68k-unknown
     685        os=-linux
     686        ;;
     687    m68knommu-*)
     688        basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
     689        os=-linux
     690        ;;
    623691    m88k-omron*)
    624692        basic_machine=m88k-omron
    625693        ;;
     
    635703        basic_machine=i386-pc
    636704        os=-mingw32
    637705        ;;
     706    mingw32ce)
     707        basic_machine=arm-unknown
     708        os=-mingw32ce
     709        ;;
    638710    miniframe)
    639711        basic_machine=m68000-convergent
    640712        ;;
     
    648720    mips3*)
    649721        basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
    650722        ;;
    651     mmix*)
    652         basic_machine=mmix-knuth
    653         os=-mmixware
    654         ;;
    655723    monitor)
    656724        basic_machine=m68k-rom68k
    657725        os=-coff
     
    664732        basic_machine=i386-pc
    665733        os=-msdos
    666734        ;;
     735    ms1-*)
     736        basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
     737        ;;
    667738    mvs)
    668739        basic_machine=i370-ibm
    669740        os=-mvs
     
    732803    np1)
    733804        basic_machine=np1-gould
    734805        ;;
    735     nv1)
    736         basic_machine=nv1-cray
    737         os=-unicosmp
    738         ;;
    739806    nsr-tandem)
    740807        basic_machine=nsr-tandem
    741808        ;;
     
    743810        basic_machine=hppa1.1-oki
    744811        os=-proelf
    745812        ;;
    746     or32 | or32-*)
     813    openrisc | openrisc-*)
    747814        basic_machine=or32-unknown
    748         os=-coff
    749815        ;;
    750816    os400)
    751817        basic_machine=powerpc-ibm
     
    767833        basic_machine=i860-intel
    768834        os=-osf
    769835        ;;
     836    parisc)
     837        basic_machine=hppa-unknown
     838        os=-linux
     839        ;;
     840    parisc-*)
     841        basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
     842        os=-linux
     843        ;;
    770844    pbd)
    771845        basic_machine=sparc-tti
    772846        ;;
     
    776850    pc532 | pc532-*)
    777851        basic_machine=ns32k-pc532
    778852        ;;
     853    pc98)
     854        basic_machine=i386-pc
     855        ;;
     856    pc98-*)
     857        basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
     858        ;;
    779859    pentium | p5 | k5 | k6 | nexgen | viac3)
    780860        basic_machine=i586-pc
    781861        ;;
     
    832912        basic_machine=i586-unknown
    833913        os=-pw32
    834914        ;;
     915    rdos)
     916        basic_machine=i386-pc
     917        os=-rdos
     918        ;;
    835919    rom68k)
    836920        basic_machine=m68k-rom68k
    837921        os=-coff
     
    858942    sb1el)
    859943        basic_machine=mipsisa64sb1el-unknown
    860944        ;;
     945    sde)
     946        basic_machine=mipsisa32-sde
     947        os=-elf
     948        ;;
    861949    sei)
    862950        basic_machine=mips-sei
    863951        os=-seiux
     
    869957        basic_machine=sh-hitachi
    870958        os=-hms
    871959        ;;
     960    sh5el)
     961        basic_machine=sh5le-unknown
     962        ;;
    872963    sh64)
    873964        basic_machine=sh64-unknown
    874965        ;;
     
    9581049        basic_machine=tic6x-unknown
    9591050        os=-coff
    9601051        ;;
     1052    tile*)
     1053        basic_machine=tile-unknown
     1054        os=-linux-gnu
     1055        ;;
    9611056    tx39)
    9621057        basic_machine=mipstx39-unknown
    9631058        ;;
     
    10181113        basic_machine=hppa1.1-winbond
    10191114        os=-proelf
    10201115        ;;
     1116    xbox)
     1117        basic_machine=i686-pc
     1118        os=-mingw32
     1119        ;;
    10211120    xps | xps100)
    10221121        basic_machine=xps100-honeywell
    10231122        ;;
     
    10481147    romp)
    10491148        basic_machine=romp-ibm
    10501149        ;;
     1150    mmix)
     1151        basic_machine=mmix-knuth
     1152        ;;
    10511153    rs6000)
    10521154        basic_machine=rs6000-ibm
    10531155        ;;
     
    10641166    we32k)
    10651167        basic_machine=we32k-att
    10661168        ;;
    1067     sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
     1169    sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
    10681170        basic_machine=sh-unknown
    10691171        ;;
    1070     sh64)
    1071         basic_machine=sh64-unknown
    1072         ;;
    1073     sparc | sparcv9 | sparcv9b)
     1172    sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
    10741173        basic_machine=sparc-sun
    10751174        ;;
    10761175    cydra)
     
    11301229        os=-sysv4.2uw
    11311230        ;;
    11321231    -gnu/linux*)
    1133         os=`echo $os | sed -e 's|gnu/linux|linux|'`
     1232        os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
    11341233        ;;
    11351234    # First accept the basic system types.
    11361235    # The portable systems comes first.
     
    11431242          | -aos* \
    11441243          | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
    11451244          | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
    1146           | -hiux* | -386bsd* | -knetbsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \
    1147           | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
     1245          | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
     1246          | -openbsd* | -solidbsd* \
     1247          | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
     1248          | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
    11481249          | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
    11491250          | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
    11501251          | -chorusos* | -chorusrdb* \
    11511252          | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
    1152           | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
     1253          | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
     1254          | -uxpv* | -beos* | -mpeix* | -udk* \
    11531255          | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
    11541256          | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
    11551257          | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
    11561258          | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
    11571259          | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
    1158           | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
     1260          | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
     1261          | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
    11591262    # Remember, each alternative MUST END IN *, to match a version number.
    11601263        ;;
    11611264    -qnx*)
     
    11731276        os=`echo $os | sed -e 's|nto|nto-qnx|'`
    11741277        ;;
    11751278    -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
    1176           | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
     1279          | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
    11771280          | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
    11781281        ;;
    11791282    -mac*)
     
    11831286        os=-linux-dietlibc
    11841287        ;;
    11851288    -linux*)
    1186         os=-linux
     1289        os=`echo $os | sed -e 's|linux|linux-gnu|'`
    11871290        ;;
    11881291    -sunos5*)
    11891292        os=`echo $os | sed -e 's|sunos5|solaris2|'`
     
    12821385    -kaos*)
    12831386        os=-kaos
    12841387        ;;
     1388    -zvmoe)
     1389        os=-zvmoe
     1390        ;;
    12851391    -none)
    12861392        ;;
    12871393    *)
     
    13041410# system, and we'll never get to this point.
    13051411
    13061412case $basic_machine in
     1413        score-*)
     1414        os=-elf
     1415        ;;
     1416        spu-*)
     1417        os=-elf
     1418        ;;
    13071419    *-acorn)
    13081420        os=-riscix1.2
    13091421        ;;
     
    13131425    arm*-semi)
    13141426        os=-aout
    13151427        ;;
    1316     c4x-* | tic4x-*)
    1317         os=-coff
    1318         ;;
     1428        c4x-* | tic4x-*)
     1429            os=-coff
     1430        ;;
    13191431    # This must come before the *-dec entry.
    13201432    pdp10-*)
    13211433        os=-tops20
     
    13411453    m68*-cisco)
    13421454        os=-aout
    13431455        ;;
     1456        mep-*)
     1457        os=-elf
     1458        ;;
    13441459    mips*-cisco)
    13451460        os=-elf
    13461461        ;;
     
    13591474    *-be)
    13601475        os=-beos
    13611476        ;;
     1477    *-haiku)
     1478        os=-haiku
     1479        ;;
    13621480    *-ibm)
    13631481        os=-aix
    13641482        ;;
     1483        *-knuth)
     1484        os=-mmixware
     1485        ;;
    13651486    *-wec)
    13661487        os=-proelf
    13671488        ;;
     
    15271648esac
    15281649
    15291650echo $basic_machine$os
    1530 exit 0
     1651exit
    15311652
    15321653# Local variables:
    15331654# eval: (add-hook 'write-file-hooks 'time-stamp)
  • defines.h

     
    190190#include "vms.h"
    191191#endif
    192192
     193#if defined(__HAIKU__)
     194#include <sys/socket.h> /* intern.h needs fd_set definition */
     195#else
    193196#if defined(__BEOS__)
    194197#include <net/socket.h> /* intern.h needs fd_set definition */
    195198#endif
     199#endif
    196200
    197201#ifdef RUBY_EXPORT
    198202#undef RUBY_EXTERN
  • signal.c

     
    422422#define sighandler_t sh_t
    423423#endif
    424424
     425#ifndef __HAIKU__
    425426typedef RETSIGTYPE (*sighandler_t)_((int));
     427#endif
    426428
    427429#ifdef POSIX_SIGNAL
    428430static sighandler_t
  • eval.c

     
    7272#include <unistd.h>
    7373#endif
    7474
    75 #ifdef __BEOS__
    76 #include <net/socket.h>
     75#ifdef __HAIKU__
     76#include <sys/socket.h>
     77#else
     78  #ifdef __BEOS__
     79  #include <net/socket.h>
     80  #endif
    7781#endif
    7882
    7983#ifdef __MACOS__