📄 openslp.patch
字号:
- armelf_linux*)- echo "${UNAME_MACHINE}-unknown-linux-gnu"- exit 0- ;;- m68klinux)- echo "${UNAME_MACHINE}-unknown-linux-gnuaout"- exit 0- ;;- elf32ppc)- # Determine Lib Version- cat >$dummy.c <<EOF-#include <features.h>-#if defined(__GLIBC__)-extern char __libc_version[];-extern char __libc_release[];-#endif-main(argc, argv)- int argc;- char *argv[];-{-#if defined(__GLIBC__)- printf("%s %s\n", __libc_version, __libc_release);-#else- printf("unkown\n");-#endif- return 0;-}-EOF- LIBC=""- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null- if test "$?" = 0 ; then- ./$dummy | grep 1\.99 > /dev/null- if test "$?" = 0 ; then- LIBC="libc1"- fi- fi - rm -f $dummy.c $dummy- echo powerpc-unknown-linux-gnu${LIBC}- exit 0- ;;+ exit 0 ;;+ "")+ # Either a pre-BFD a.out linker (linux-gnuoldld) or+ # one that does not give us useful --help.+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld"+ exit 0 ;; esac-- if test "${UNAME_MACHINE}" = "alpha" ; then- sed 's/^ //' <<EOF >$dummy.s- .globl main- .ent main- main:- .frame \$30,0,\$26,0- .prologue 0- .long 0x47e03d80 # implver $0- lda \$2,259- .long 0x47e20c21 # amask $2,$1- srl \$1,8,\$2- sll \$2,2,\$2- sll \$0,3,\$0- addl \$1,\$0,\$0- addl \$2,\$0,\$0- ret \$31,(\$26),1- .end main-EOF- LIBC=""- $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null- if test "$?" = 0 ; then- ./$dummy- case "$?" in- 7)- UNAME_MACHINE="alpha"- ;;- 15)- UNAME_MACHINE="alphaev5"- ;;- 14)- UNAME_MACHINE="alphaev56"- ;;- 10)- UNAME_MACHINE="alphapca56"- ;;- 16)- UNAME_MACHINE="alphaev6"- ;;- esac-- objdump --private-headers $dummy | \- grep ld.so.1 > /dev/null- if test "$?" = 0 ; then- LIBC="libc1"- fi- fi- rm -f $dummy.s $dummy- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0- elif test "${UNAME_MACHINE}" = "mips" ; then- cat >$dummy.c <<EOF-#ifdef __cplusplus- int main (int argc, char *argv[]) {-#else- int main (argc, argv) int argc; char *argv[]; {-#endif-#ifdef __MIPSEB__- printf ("%s-unknown-linux-gnu\n", argv[1]);-#endif-#ifdef __MIPSEL__- printf ("%sel-unknown-linux-gnu\n", argv[1]);-#endif- return 0;-}-EOF- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0- rm -f $dummy.c $dummy- else- # Either a pre-BFD a.out linker (linux-gnuoldld)- # or one that does not give us useful --help.- # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.- # If ld does not provide *any* "supported emulations:"- # that means it is gnuoldld.- echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"- test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0-- case "${UNAME_MACHINE}" in- i?86)- VENDOR=pc;- ;;- *)- VENDOR=unknown;- ;;- esac- # Determine whether the default compiler is a.out or elf- cat >$dummy.c <<EOF-#include <features.h>-#ifdef __cplusplus- int main (int argc, char *argv[]) {-#else- int main (argc, argv) int argc; char *argv[]; {-#endif-#ifdef __ELF__-# ifdef __GLIBC__-# if __GLIBC__ >= 2- printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);-# else- printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);-# endif-# else- printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);-# endif-#else- printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);-#endif- return 0;-}+ # Determine whether the default compiler is a.out or elf+ eval $set_cc_for_build+ sed 's/^ //' << EOF >$dummy.c+ #include <features.h>+ #ifdef __ELF__+ # ifdef __GLIBC__+ # if __GLIBC__ >= 2+ LIBC=gnu+ # else+ LIBC=gnulibc1+ # endif+ # else+ LIBC=gnulibc1+ # endif+ #else+ #ifdef __INTEL_COMPILER+ LIBC=gnu+ #else+ LIBC=gnuaout+ #endif+ #endif EOF- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0- rm -f $dummy.c $dummy- fi ;;-# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions-# are messed up and put the nodename in both sysname and nodename.- i?86:DYNIX/ptx:4*:*)+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`+ test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0+ test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0+ ;;+ i*86:DYNIX/ptx:4*:*)+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.+ # earlier versions are messed up and put the nodename in both+ # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;;- i?86:UNIX_SV:4.2MP:2.*)+ i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this,@@ -825,7 +951,24 @@ # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;;- i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)+ i*86:OS/2:*:*)+ # If we were able to find `uname', then EMX Unix compatibility+ # is probably installed.+ echo ${UNAME_MACHINE}-pc-os2-emx+ exit 0 ;;+ i*86:XTS-300:*:STOP)+ echo ${UNAME_MACHINE}-unknown-stop+ exit 0 ;;+ i*86:atheos:*:*)+ echo ${UNAME_MACHINE}-unknown-atheos+ exit 0 ;;+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)+ echo i386-unknown-lynxos${UNAME_RELEASE}+ exit 0 ;;+ i*86:*DOS:*:*)+ echo ${UNAME_MACHINE}-pc-msdosdjgpp+ exit 0 ;;+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}@@ -833,27 +976,26 @@ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;;- i?86:*:5:7*)- # Fixed at (any) Pentium or better- UNAME_MACHINE=i586- if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then- echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}- else- echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}- fi+ i*86:*:5:[78]*)+ case `/bin/uname -X | grep "^Machine"` in+ *486*) UNAME_MACHINE=i486 ;;+ *Pentium) UNAME_MACHINE=i586 ;;+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;+ esac+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit 0 ;;- i?86:*:3.2:*)+ i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` echo ${UNAME_MACHINE}-pc-isc$UNAME_REL elif /bin/uname -X 2>/dev/null >/dev/null ; then- UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`- (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486- (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586- (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686- (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else@@ -861,6 +1003,7 @@ fi exit 0 ;; pc:*:*:*)+ # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp@@ -882,9 +1025,15 @@ # "miniframe" echo m68010-convergent-sysv exit 0 ;;+ mc68k:UNIX:SYSTEM5:3.51m)+ echo m68k-convergent-sysv+ exit 0 ;;+ M680?0:D-NIX:5.3:*)+ echo m68k-diab-dnix+ exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;- 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)+ 3[34]??:*: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) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`@@ -895,21 +1044,21 @@ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;;- m68*:LynxOS:2.*:*)+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;;- i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)- echo i386-unknown-lynxos${UNAME_RELEASE}- exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;;- rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)+ rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;;+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)+ echo powerpc-unknown-lynxos${UNAME_RELEASE}+ exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;;@@ -927,8 +1076,8 @@ echo ns32k-sni-sysv fi exit 0 ;;- PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort- # says <Richard.M.Bartel@ccMail.Census.GOV>+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort+ # says <Richard.M.Bartel@ccMail.Census.GOV> echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*)@@ -940,10 +1089,14 @@ # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;;+ *:VOS:*:*)+ # From Paul.Green@stratus.com.+ echo hppa1.1-stratus-vos+ exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;;- news*:NEWS-OS:*:6*)+ news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)@@ -968,20 +1121,80 @@ SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;;+ SX-6:SUPER-UX:*:*)+ echo sx6-nec-superux${UNAME_RELEASE}+ exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;;+ *:Darwin:*:*)+ case `uname -p` in+ *86) UNAME_PROCESSOR=i686 ;;+ powerpc) UNAME_PROCESSOR=powerpc ;;+ esac+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}+ exit 0 ;;+ *:procnto*:*:* | *:QNX:[0123456789]*:*)+ UNAME_PROCESSOR=`uname -p`+ if test "$UNAME_PROCESSOR" = "x86"; then+ UNAME_PROCESSOR=i386+ UNAME_MACHINE=pc+ fi+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}+ exit 0 ;; *:QNX:*:4*)- echo i386-qnx-qnx${UNAME_VERSION}+ echo i386-pc-qnx+ exit 0 ;;+ NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)+ echo nsr-tandem-nsk${UNAME_RELEASE}+ exit 0 ;;+ *:NonStop-UX:*:*)+ echo mips-compaq-nonstopux+ exit 0 ;;+ BS2000:POSIX*:*:*)+ echo bs2000-siemens-sysv+ exit 0 ;;+ DS/*:UNIX_System_V:*:*)+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}+ exit 0 ;;+ *:Plan9:*:*)+ # "uname -m" is not consistent, so use $cputype instead. 386+ # is converted to i386 for consistency with other x86+ # operating systems.+ if test "$cputype" = "386"; then+ UNAME_MACHINE=i386+ else+ UNAME_MACHINE="$cputype"+ fi+ echo ${UNAME_MACHINE}-unknown-plan9+ exit 0 ;;+ *:TOPS-10:*:*)+ echo pdp10-unknown-tops10+ exit 0 ;;+ *:TENEX:*:*)+ echo pdp10-unknown-tenex+ exit 0 ;;+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)+ echo pdp10-dec-tops20+ exit 0 ;;+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)+ echo pdp10-xkl-tops20+ exit 0 ;;+ *:TOPS-20:*:*)+ echo pdp10-unknown-tops20+ exit 0 ;;+ *:ITS:*:*)+ echo pdp10-unknown-its exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 +eval $set_cc_for_build cat >$dummy.c <<EOF #ifdef _SEQUENT_ # include <sys/types.h>@@ -1068,11 +1281,24 @@ #endif #if defined (vax)-#if !defined (ultrix)- printf ("vax-dec-bsd\n"); exit (0);-#else- printf ("vax-dec-ultrix\n"); exit (0);-#endif+# if !defined (ultrix)+# include <sys/param.h>+# if defined (BSD)+# if BSD == 43+ printf ("vax-dec-bsd4.3\n"); exit (0);+# else+# if BSD == 199006+ printf ("vax-dec-bsd4.3reno\n"); exit (0);+# else+ printf ("vax-dec-bsd\n"); exit (0);+# endif+# endif+# else+ printf ("vax-dec-bsd\n"); exit (0);+# endif+# else+ printf ("vax-dec-ultrix\n"); exit (0);+# endif #endif #if defined (alliant) && defined (i860)@@ -1083,8 +1309,7 @@ } EOF -$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0-rm -f $dummy.c $dummy+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # Apollos put the system type in the environment.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -