root/BePorts/trunk/dev-libs/apr/apr-0.9.x.diff
| Revision 48, 74.2 kB (checked in by andreasf, 5 months ago) |
|---|
-
network_io/unix/sockopt.c
old new 21 21 static apr_status_t soblock(int sd) 22 22 { 23 23 /* BeOS uses setsockopt at present for non blocking... */ 24 #if ndef BEOS24 #if !defined(BEOS) || defined(__HAIKU__) 25 25 int fd_flags; 26 26 27 27 fd_flags = fcntl(sd, F_GETFL, 0); … … 47 47 48 48 static apr_status_t sononblock(int sd) 49 49 { 50 #if ndef BEOS50 #if !defined(BEOS) || defined(__HAIKU__) 51 51 int fd_flags; 52 52 53 53 fd_flags = fcntl(sd, F_GETFL, 0); … … 221 221 * As it can't be turned off we might as well check if they're asking 222 222 * for it to be turned on! 223 223 */ 224 #if def BEOS224 #if defined(BEOS) && !defined(__HAIKU__) 225 225 if (on == 1) 226 226 return APR_SUCCESS; 227 227 else -
network_io/unix/sockaddr.c
old new 458 458 apr_sockaddr_t *prev_sa; 459 459 int curaddr; 460 460 #if APR_HAS_THREADS && !defined(GETHOSTBYNAME_IS_THREAD_SAFE) && \ 461 defined(HAVE_GETHOSTBYNAME_R) && !defined(BEOS) 461 defined(HAVE_GETHOSTBYNAME_R) && !defined(BEOS) // CHECKME 462 462 #ifdef GETHOSTBYNAME_R_HOSTENT_DATA 463 463 struct hostent_data hd; 464 464 #else … … 489 489 } 490 490 else { 491 491 #if APR_HAS_THREADS && !defined(GETHOSTBYNAME_IS_THREAD_SAFE) && \ 492 defined(HAVE_GETHOSTBYNAME_R) && !defined(BEOS) 492 defined(HAVE_GETHOSTBYNAME_R) && !defined(BEOS) // CHECKME 493 493 #if defined(GETHOSTBYNAME_R_HOSTENT_DATA) 494 494 /* AIX, HP/UX, D/UX et alia */ 495 495 gethostbyname_r(hostname, &hs, &hd); … … 560 560 561 561 if ((masked = flags & (APR_IPV4_ADDR_OK | APR_IPV6_ADDR_OK))) { 562 562 if (!hostname || 563 family != A F_UNSPEC ||563 family != APR_UNSPEC || 564 564 masked == (APR_IPV4_ADDR_OK | APR_IPV6_ADDR_OK)) { 565 565 return APR_EINVAL; 566 566 } … … 656 656 return APR_SUCCESS; 657 657 #else 658 658 #if APR_HAS_THREADS && !defined(GETHOSTBYADDR_IS_THREAD_SAFE) && \ 659 defined(HAVE_GETHOSTBYADDR_R) && !defined(BEOS) 659 defined(HAVE_GETHOSTBYADDR_R) && !defined(BEOS) // CHECKME 660 660 #ifdef GETHOSTBYNAME_R_HOSTENT_DATA 661 661 struct hostent_data hd; 662 662 #else -
network_io/unix/sockets.c
old new 21 21 #include "apr_portable.h" 22 22 #include "apr_arch_inherit.h" 23 23 24 #if defined(BEOS) && !defined(BEOS_BONE) 24 #if defined(BEOS) && !defined(BEOS_BONE) && !defined(__HAIKU__) 25 25 #define close closesocket 26 26 #endif 27 27 … … 47 47 apr_sockaddr_vars_set(sock->local_addr, family, 0); 48 48 apr_sockaddr_vars_set(sock->remote_addr, family, 0); 49 49 sock->netmask = 0; 50 #if defined(BEOS) && !defined(BEOS_BONE) 50 #if defined(BEOS) && !defined(BEOS_BONE) && !defined(__HAIKU__) 51 51 /* BeOS pre-BONE has TCP_NODELAY on by default and it can't be 52 52 * switched off! 53 53 */ -
network_io/beos/sendrecv.c
old new 15 15 */ 16 16 17 17 #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 */ 19 19 #include "../unix/sendrecv.c" 20 20 #else 21 21 #include "apr_arch_networkio.h" -
include/arch/unix/apr_arch_file_io.h
old new 68 68 #include <kernel/OS.h> 69 69 #endif 70 70 71 #if BEOS_BONE 71 #if defined(__HAIKU__) 72 # include <sys/socket.h> 73 #elif BEOS_BONE 72 74 # ifndef BONE7 73 75 /* prior to BONE/7 fd_set & select were defined in sys/socket.h */ 74 76 # include <sys/socket.h> -
include/apr_errno.h
old new 1155 1155 /** operation would block */ 1156 1156 #if !defined(EWOULDBLOCK) || !defined(EAGAIN) 1157 1157 #define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN) 1158 #elif BEOS 1159 #define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN) 1158 1160 #elif (EWOULDBLOCK == EAGAIN) 1159 1161 #define APR_STATUS_IS_EAGAIN(s) ((s) == APR_EAGAIN) 1160 1162 #else -
configure.in
old new 219 219 dnl otherwise. 220 220 221 221 case $host in 222 *os390 )222 *os390|*-haiku*) 223 223 if test "$ac_test_CFLAGS" != set; then 224 224 APR_REMOVEFROM(CFLAGS,-g) 225 225 fi … … 403 403 ;; 404 404 esac 405 405 ;; 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 ;; 406 414 *os390) 407 415 OSDIR="os390" 408 416 eolstr="\\n" … … 1274 1282 ssize_t_fmt='#define APR_SSIZE_T_FMT "ld"' 1275 1283 size_t_fmt='#define APR_SIZE_T_FMT "lu"' 1276 1284 ;; 1277 *beos* )1285 *beos*|*haiku*) 1278 1286 ssize_t_fmt='#define APR_SSIZE_T_FMT "ld"' 1279 1287 size_t_fmt='#define APR_SIZE_T_FMT "ld"' 1280 1288 ;; -
misc/unix/errorcodes.c
old new 343 343 * the prototype publically (doh!), so to avoid a build warning 344 344 * we add a suitable prototype here. 345 345 */ 346 #if defined(BEOS) 346 #if defined(BEOS) && !defined(__HAIKU__) 347 347 const char *strerror_r(apr_status_t, char *, apr_size_t); 348 348 #endif 349 349 -
threadproc/beos/proc.c
old new 365 365 } 366 366 367 367 APR_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) 369 374 { 370 375 return APR_ENOTIMPL; 371 376 } -
build/config.guess
old new 1 1 #! /bin/sh 2 2 # Attempt to guess a canonical system name. 3 3 # 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. 5 6 6 timestamp='200 2-03-20'7 timestamp='2008-01-08' 7 8 8 9 # This file is free software; you can redistribute it and/or modify it 9 10 # under the terms of the GNU General Public License as published by … … 17 18 # 18 19 # You should have received a copy of the GNU General Public License 19 20 # 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. 21 23 # 22 24 # As a special exception to the GNU General Public License, if you 23 25 # distribute this file as part of a program that contains a 24 26 # configuration script generated by Autoconf, you may include it under 25 27 # the same distribution terms that you use for the rest of that program. 26 28 27 #####################################################################28 # This file contains changes for Apache, clearly marked below.29 # These changes are hereby donated to the public domain.30 #####################################################################31 29 32 30 # Originally written by Per Bothner <per@bothner.com>. 33 31 # Please send patches to <config-patches@gnu.org>. Submit a context … … 58 56 GNU config.guess ($timestamp) 59 57 60 58 Originally written by Per Bothner. 61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 62 Free Software Foundation, Inc.59 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 60 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 63 61 64 62 This is free software; see the source for copying conditions. There is NO 65 63 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." … … 71 69 while test $# -gt 0 ; do 72 70 case $1 in 73 71 --time-stamp | --time* | -t ) 74 echo "$timestamp" ; exit 0;;72 echo "$timestamp" ; exit ;; 75 73 --version | -v ) 76 echo "$version" ; exit 0;;74 echo "$version" ; exit ;; 77 75 --help | --h* | -h ) 78 echo "$usage"; exit 0;;76 echo "$usage"; exit ;; 79 77 -- ) # Stop option processing 80 78 shift; break ;; 81 79 - ) # Use stdin as input. … … 93 91 exit 1 94 92 fi 95 93 94 trap 'exit 1' 1 2 15 96 95 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. 99 100 100 # CC_FOR_BUILD -- compiler used by this script.101 101 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 102 102 # use `HOST_CC' if defined, but it is deprecated. 103 103 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 106 set_cc_for_build=' 107 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 108 trap "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 ; } ; 114 dummy=$tmp/dummy ; 115 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 116 case $CC_FOR_BUILD,$HOST_CC,$CC in 117 ,,) echo "int x;" > $dummy.c ; 106 118 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 109 120 CC_FOR_BUILD="$c"; break ; 110 121 fi ; 111 122 done ; 112 rm -f $dummy.c $dummy.o $dummy.rel ;113 123 if test x"$CC_FOR_BUILD" = x ; then 114 124 CC_FOR_BUILD=no_compiler_found ; 115 125 fi 116 126 ;; 117 127 ,,*) CC_FOR_BUILD=$CC ;; 118 128 ,*,*) CC_FOR_BUILD=$HOST_CC ;; 119 esac '129 esac ; set_cc_for_build= ;' 120 130 121 131 # This is needed to find uname on a Pyramid OSx when run in the BSD universe. 122 132 # (ghazi@noc.rutgers.edu 1994-08-24) … … 147 157 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 148 158 /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 149 159 case "${UNAME_MACHINE_ARCH}" in 160 armeb) machine=armeb-unknown ;; 150 161 arm*) machine=arm-unknown ;; 151 162 sh3el) machine=shl-unknown ;; 152 163 sh3eb) machine=sh-unknown ;; 164 sh5el) machine=sh5le-unknown ;; 153 165 *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 154 166 esac 155 167 # The Operating System including object format, if it has switched … … 172 184 ;; 173 185 esac 174 186 # 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 176 199 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 177 200 # contains redundant information, the shorter form: 178 201 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 179 202 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 ;; 217 204 *: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 ;; 220 220 alpha:OSF1:*:*) 221 if test $UNAME_RELEASE = "V4.0"; then 221 case $UNAME_RELEASE in 222 *4.0) 222 223 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. 224 267 # A Vn.n version is a released version. 225 268 # A Tn.n version is a released field test version. 226 269 # A Xn.n version is an unreleased experimental baselevel. 227 270 # 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 ;; 283 273 Alpha\ *:Windows_NT*:*) 284 274 # How do we know it's Interix rather than the generic POSIX subsystem? 285 275 # Should we change UNAME_MACHINE based on the output of uname instead 286 276 # of the specific Alpha model? 287 277 echo alpha-pc-interix 288 exit 0;;278 exit ;; 289 279 21064:Windows_NT:50:3) 290 280 echo alpha-dec-winnt3.5 291 exit 0;;281 exit ;; 292 282 Amiga*:UNIX_System_V:4.0:*) 293 283 echo m68k-unknown-sysv4 294 exit 0;;284 exit ;; 295 285 *:[Aa]miga[Oo][Ss]:*:*) 296 286 echo ${UNAME_MACHINE}-unknown-amigaos 297 exit 0;;287 exit ;; 298 288 *:[Mm]orph[Oo][Ss]:*:*) 299 289 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 ;; 319 291 *:OS/390:*:*) 320 292 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 ;; 322 300 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 323 301 echo arm-acorn-riscix${UNAME_RELEASE} 324 exit 0;; 302 exit ;; 303 arm:riscos:*:*|arm:RISCOS:*:*) 304 echo arm-unknown-riscos 305 exit ;; 325 306 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 326 307 echo hppa1.1-hitachi-hiuxmpp 327 exit 0;;308 exit ;; 328 309 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 329 310 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 330 311 if test "`(/bin/universe) 2>/dev/null`" = att ; then … … 332 313 else 333 314 echo pyramid-pyramid-bsd 334 315 fi 335 exit 0;;316 exit ;; 336 317 NILE*:*:*:dcosx) 337 318 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 ;; 339 327 sun4H:SunOS:5.*:*) 340 328 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 341 exit 0;;329 exit ;; 342 330 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 343 331 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.*:*) 346 334 echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 347 exit 0;;335 exit ;; 348 336 sun4*:SunOS:6*:*) 349 337 # According to config.sub, this is the proper way to canonicalize 350 338 # SunOS6. Hard to guess exactly what SunOS6 will be like, but 351 339 # it's likely to be more like Solaris than SunOS4. 352 340 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 353 exit 0;;341 exit ;; 354 342 sun4*:SunOS:*:*) 355 343 case "`/usr/bin/arch -k`" in 356 344 Series*|S4*) … … 359 347 esac 360 348 # Japanese Language versions have a version number like `4.1.3-JL'. 361 349 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 362 exit 0;;350 exit ;; 363 351 sun3*:SunOS:*:*) 364 352 echo m68k-sun-sunos${UNAME_RELEASE} 365 exit 0;;353 exit ;; 366 354 sun*:*:4.2BSD:*) 367 355 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 368 356 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 … … 374 362 echo sparc-sun-sunos${UNAME_RELEASE} 375 363 ;; 376 364 esac 377 exit 0;;365 exit ;; 378 366 aushp:SunOS:*:*) 379 367 echo sparc-auspex-sunos${UNAME_RELEASE} 380 exit 0;;368 exit ;; 381 369 # The situation for MiNT is a little confusing. The machine name 382 370 # can be virtually everything (everything which is not 383 371 # "atarist" or "atariste" at least should have a processor … … 388 376 # be no problem. 389 377 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 390 378 echo m68k-atari-mint${UNAME_RELEASE} 391 exit 0;;379 exit ;; 392 380 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 393 381 echo m68k-atari-mint${UNAME_RELEASE} 394 exit 0;;382 exit ;; 395 383 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 396 384 echo m68k-atari-mint${UNAME_RELEASE} 397 exit 0;;385 exit ;; 398 386 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 399 387 echo m68k-milan-mint${UNAME_RELEASE} 400 exit 0;;388 exit ;; 401 389 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 402 390 echo m68k-hades-mint${UNAME_RELEASE} 403 exit 0;;391 exit ;; 404 392 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 405 393 echo m68k-unknown-mint${UNAME_RELEASE} 406 exit 0 ;; 394 exit ;; 395 m68k:machten:*:*) 396 echo m68k-apple-machten${UNAME_RELEASE} 397 exit ;; 407 398 powerpc:machten:*:*) 408 399 echo powerpc-apple-machten${UNAME_RELEASE} 409 exit 0;;400 exit ;; 410 401 RISC*:Mach:*:*) 411 402 echo mips-dec-mach_bsd4.3 412 exit 0;;403 exit ;; 413 404 RISC*:ULTRIX:*:*) 414 405 echo mips-dec-ultrix${UNAME_RELEASE} 415 exit 0;;406 exit ;; 416 407 VAX*:ULTRIX*:*:*) 417 408 echo vax-dec-ultrix${UNAME_RELEASE} 418 exit 0;;409 exit ;; 419 410 2020:CLIX:*:* | 2430:CLIX:*:*) 420 411 echo clipper-intergraph-clix${UNAME_RELEASE} 421 exit 0;;412 exit ;; 422 413 mips:*:*:UMIPS | mips:*:*:RISCos) 423 414 eval $set_cc_for_build 424 415 sed 's/^ //' << EOF >$dummy.c … … 442 433 exit (-1); 443 434 } 444 435 EOF 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 0448 rm -f $dummy.c $dummy436 $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; } 449 440 echo mips-mips-riscos${UNAME_RELEASE} 450 exit 0;;441 exit ;; 451 442 Motorola:PowerMAX_OS:*:*) 452 443 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 ;; 454 451 Night_Hawk:Power_UNIX:*:*) 455 452 echo powerpc-harris-powerunix 456 exit 0;;453 exit ;; 457 454 m88k:CX/UX:7*:*) 458 455 echo m88k-harris-cxux7 459 exit 0;;456 exit ;; 460 457 m88k:*:4*:R4*) 461 458 echo m88k-motorola-sysv4 462 exit 0;;459 exit ;; 463 460 m88k:*:3*:R3*) 464 461 echo m88k-motorola-sysv3 465 exit 0;;462 exit ;; 466 463 AViiON:dgux:*:*) 467 464 # DG/UX returns AViiON for all architectures 468 465 UNAME_PROCESSOR=`/usr/bin/uname -p` … … 478 475 else 479 476 echo i586-dg-dgux${UNAME_RELEASE} 480 477 fi 481 exit 0;;478 exit ;; 482 479 M88*:DolphinOS:*:*) # DolphinOS (SVR3) 483 480 echo m88k-dolphin-sysv3 484 exit 0;;481 exit ;; 485 482 M88*:*:R3*:*) 486 483 # Delta 88k system running SVR3 487 484 echo m88k-motorola-sysv3 488 exit 0;;485 exit ;; 489 486 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 490 487 echo m88k-tektronix-sysv3 491 exit 0;;488 exit ;; 492 489 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 493 490 echo m68k-tektronix-bsd 494 exit 0;;491 exit ;; 495 492 *:IRIX*:*:*) 496 493 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 497 exit 0;;494 exit ;; 498 495 ????????: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 id500 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 ' 501 498 i*86:AIX:*:*) 502 499 echo i386-ibm-aix 503 exit 0;;500 exit ;; 504 501 ia64:AIX:*:*) 505 502 if [ -x /usr/bin/oslevel ] ; then 506 503 IBM_REV=`/usr/bin/oslevel` … … 508 505 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 509 506 fi 510 507 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 511 exit 0;;508 exit ;; 512 509 *:AIX:2:3) 513 510 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 514 511 eval $set_cc_for_build … … 523 520 exit(0); 524 521 } 525 522 EOF 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 529 529 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 530 530 echo rs6000-ibm-aix3.2.4 531 531 else 532 532 echo rs6000-ibm-aix3.2 533 533 fi 534 exit 0;;535 *:AIX:*:[45 ])534 exit ;; 535 *:AIX:*:[456]) 536 536 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 537 537 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 538 538 IBM_ARCH=rs6000 … … 545 545 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 546 546 fi 547 547 echo ${IBM_ARCH}-ibm-aix${IBM_REV} 548 exit 0;;548 exit ;; 549 549 *:AIX:*:*) 550 550 echo rs6000-ibm-aix 551 exit 0;;551 exit ;; 552 552 ibmrt:4.4BSD:*|romp-ibm:BSD:*) 553 553 echo romp-ibm-bsd4.4 554 exit 0;;554 exit ;; 555 555 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 556 556 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 557 exit 0 ;;# report: romp-ibm BSD 4.3557 exit ;; # report: romp-ibm BSD 4.3 558 558 *:BOSX:*:*) 559 559 echo rs6000-bull-bosx 560 exit 0;;560 exit ;; 561 561 DPX/2?00:B.O.S.:*:*) 562 562 echo m68k-bull-sysv3 563 exit 0;;563 exit ;; 564 564 9000/[34]??:4.3bsd:1.*:*) 565 565 echo m68k-hp-bsd 566 exit 0;;566 exit ;; 567 567 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 568 568 echo m68k-hp-bsd4.4 569 exit 0;;569 exit ;; 570 570 9000/[34678]??:HP-UX:*:*) 571 571 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 572 572 case "${UNAME_MACHINE}" in … … 622 622 exit (0); 623 623 } 624 624 EOF 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 628 627 fi ;; 629 628 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 630 650 echo ${HP_ARCH}-hp-hpux${HPUX_REV} 631 exit 0;;651 exit ;; 632 652 ia64:HP-UX:*:*) 633 653 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 634 654 echo ia64-hp-hpux${HPUX_REV} 635 exit 0;;655 exit ;; 636 656 3050*:HI-UX:*:*) 637 657 eval $set_cc_for_build 638 658 sed 's/^ //' << EOF >$dummy.c … … 660 680 exit (0); 661 681 } 662 682 EOF 663 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0664 rm -f $dummy.c $dummy683 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 684 { echo "$SYSTEM_NAME"; exit; } 665 685 echo unknown-hitachi-hiuxwe2 666 exit 0;;686 exit ;; 667 687 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 668 688 echo hppa1.1-hp-bsd 669 exit 0;;689 exit ;; 670 690 9000/8??:4.3bsd:*:*) 671 691 echo hppa1.0-hp-bsd 672 exit 0;;692 exit ;; 673 693 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 674 694 echo hppa1.0-hp-mpeix 675 exit 0;;695 exit ;; 676 696 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 677 697 echo hppa1.1-hp-osf 678 exit 0;;698 exit ;; 679 699 hp8??:OSF1:*:*) 680 700 echo hppa1.0-hp-osf 681 exit 0;;701 exit ;; 682 702 i*86:OSF1:*:*) 683 703 if [ -x /usr/sbin/sysversion ] ; then 684 704 echo ${UNAME_MACHINE}-unknown-osf1mk 685 705 else 686 706 echo ${UNAME_MACHINE}-unknown-osf1 687 707 fi 688 exit 0;;708 exit ;; 689 709 parisc*:Lites*:*:*) 690 710 echo hppa1.1-hp-lites 691 exit 0;;711 exit ;; 692 712 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 693 713 echo c1-convex-bsd 694 exit 0;;714 exit ;; 695 715 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 696 716 if getsysinfo -f scalar_acc 697 717 then echo c32-convex-bsd 698 718 else echo c2-convex-bsd 699 719 fi 700 exit 0;;720 exit ;; 701 721 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 702 722 echo c34-convex-bsd 703 exit 0;;723 exit ;; 704 724 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 705 725 echo c38-convex-bsd 706 exit 0;;726 exit ;; 707 727 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 708 728 echo c4-convex-bsd 709 exit 0;;729 exit ;; 710 730 CRAY*Y-MP:*:*:*) 711 731 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 712 exit 0;;732 exit ;; 713 733 CRAY*[A-Z]90:*:*:*) 714 734 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 715 735 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ 716 736 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 717 737 -e 's/\.[^.]*$/.X/' 718 exit 0;;738 exit ;; 719 739 CRAY*TS:*:*:*) 720 740 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 ;; 725 742 CRAY*T3E:*:*:*) 726 743 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 727 exit 0;;744 exit ;;&n