nokogiri 1.6.7.2 → 1.6.8.rc1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of nokogiri might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.travis.yml +12 -9
- data/CHANGELOG.ja.rdoc +18 -0
- data/CHANGELOG.rdoc +12 -7
- data/CONTRIBUTING.md +42 -0
- data/Gemfile +1 -1
- data/Manifest.txt +6 -0
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/bin/nokogiri +2 -2
- data/dependencies.yml +1 -1
- data/ext/nokogiri/extconf.rb +3 -3
- data/ext/nokogiri/nokogiri.c +0 -7
- data/ext/nokogiri/nokogiri.h +1 -34
- data/ext/nokogiri/xml_document.c +2 -4
- data/ext/nokogiri/xml_namespace.c +56 -17
- data/ext/nokogiri/xml_node.c +12 -36
- data/ext/nokogiri/xml_node_set.c +169 -143
- data/ext/nokogiri/xml_node_set.h +3 -4
- data/ext/nokogiri/xml_sax_parser.c +2 -5
- data/ext/nokogiri/xml_syntax_error.c +0 -4
- data/ext/nokogiri/xml_syntax_error.h +0 -1
- data/ext/nokogiri/xml_xpath_context.c +9 -18
- data/lib/nokogiri.rb +3 -0
- data/lib/nokogiri/css/parser.rb +8 -2
- data/lib/nokogiri/css/parser.y +7 -2
- data/lib/nokogiri/version.rb +1 -1
- data/lib/nokogiri/xml/document.rb +7 -1
- data/lib/nokogiri/xml/dtd.rb +4 -4
- data/lib/nokogiri/xml/node.rb +2 -2
- data/ports/archives/libxml2-2.9.3.tar.gz +0 -0
- data/test/css/test_parser.rb +7 -1
- data/test/files/GH_1042.html +18 -0
- data/test/files/namespace_pressure_test.xml +1684 -0
- data/test/files/tlm.html +2 -1
- data/test/html/sax/test_parser.rb +2 -2
- data/test/html/test_document.rb +18 -8
- data/test/html/test_document_encoding.rb +46 -54
- data/test/html/test_document_fragment.rb +21 -22
- data/test/html/test_node.rb +16 -0
- data/test/html/test_node_encoding.rb +12 -14
- data/test/namespaces/test_namespaces_in_parsed_doc.rb +14 -0
- data/test/test_reader.rb +19 -0
- data/test/test_xslt_transforms.rb +5 -3
- data/test/xml/sax/test_parser.rb +36 -39
- data/test/xml/test_document.rb +7 -2
- data/test/xml/test_document_encoding.rb +14 -16
- data/test/xml/test_dtd_encoding.rb +0 -2
- data/test/xml/test_node_encoding.rb +78 -80
- data/test/xml/test_reader_encoding.rb +100 -102
- data/test/xslt/test_exception_handling.rb +1 -1
- metadata +11 -28
- data/patches/libxml2/0001-Revert-Missing-initialization-for-the-catalog-module.patch +0 -29
- data/patches/libxml2/0002-Fix-missing-entities-after-CVE-2014-3660-fix.patch +0 -31
- data/patches/libxml2/0003-Stop-parsing-on-entities-boundaries-errors.patch +0 -32
- data/patches/libxml2/0004-Cleanup-conditional-section-error-handling.patch +0 -49
- data/patches/libxml2/0005-CVE-2015-1819-Enforce-the-reader-to-run-in-constant-.patch +0 -177
- data/patches/libxml2/0006-Another-variation-of-overflow-in-Conditional-section.patch +0 -32
- data/patches/libxml2/0007-Fix-an-error-in-previous-Conditional-section-patch.patch +0 -28
- data/patches/libxml2/0008-CVE-2015-8035-Fix-XZ-compression-support-loop.patch +0 -31
- data/patches/libxml2/0009-Updated-config.guess.patch +0 -397
- data/patches/libxml2/0010-Fix-parsering-short-unclosed-comment-uninitialized-access.patch +0 -64
- data/patches/libxml2/0011-Avoid-extra-processing-of-MarkupDecl-when-EOF.patch +0 -35
- data/patches/libxml2/0012-Avoid-processing-entities-after-encoding-conversion-.patch +0 -83
- data/patches/libxml2/0013-CVE-2015-7497-Avoid-an-heap-buffer-overflow-in-xmlDi.patch +0 -33
- data/patches/libxml2/0014-CVE-2015-5312-Another-entity-expansion-issue.patch +0 -32
- data/patches/libxml2/0015-Add-xmlHaltParser-to-stop-the-parser.patch +0 -81
- data/patches/libxml2/0016-Detect-incoherency-on-GROW.patch +0 -36
- data/patches/libxml2/0017-CVE-2015-7500-Fix-memory-access-error-due-to-incorre.patch +0 -105
- data/patches/libxml2/0018-CVE-2015-8242-Buffer-overead-with-HTML-parser-in-pus.patch +0 -43
- data/patches/libxml2/0019-Do-not-print-error-context-when-there-is-none.patch +0 -28
- data/patches/libxml2/0020-xmlStopParser-reset-errNo.patch +0 -41
- data/patches/libxml2/0021-Reuse-xmlHaltParser-where-it-makes-sense.patch +0 -175
- data/ports/archives/libxml2-2.9.2.tar.gz +0 -0
@@ -1,28 +0,0 @@
|
|
1
|
-
From 587f0e0133f51f3e09d1166cc0f6b24b50ddb357 Mon Sep 17 00:00:00 2001
|
2
|
-
From: Daniel Veillard <veillard@redhat.com>
|
3
|
-
Date: Tue, 27 Oct 2015 10:53:44 +0800
|
4
|
-
Subject: [PATCH 7/8] Fix an error in previous Conditional section patch
|
5
|
-
|
6
|
-
an off by one mistake in the change, led to error on correct
|
7
|
-
document where the end of the included entity was exactly
|
8
|
-
the end of the conditional section, leading to regtest failure
|
9
|
-
---
|
10
|
-
parser.c | 2 +-
|
11
|
-
1 file changed, 1 insertion(+), 1 deletion(-)
|
12
|
-
|
13
|
-
diff --git a/parser.c b/parser.c
|
14
|
-
index 0b8d633..0650d2a 100644
|
15
|
-
--- a/parser.c
|
16
|
-
+++ b/parser.c
|
17
|
-
@@ -6905,7 +6905,7 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
|
18
|
-
NULL, NULL);
|
19
|
-
}
|
20
|
-
if ((ctxt-> instate != XML_PARSER_EOF) &&
|
21
|
-
- ((ctxt->input->cur + 3) < ctxt->input->end))
|
22
|
-
+ ((ctxt->input->cur + 3) <= ctxt->input->end))
|
23
|
-
SKIP(3);
|
24
|
-
}
|
25
|
-
}
|
26
|
-
--
|
27
|
-
2.5.0
|
28
|
-
|
@@ -1,31 +0,0 @@
|
|
1
|
-
From 8f905eeb2aa553ee50194ed38db7186653ec6e1c Mon Sep 17 00:00:00 2001
|
2
|
-
From: Daniel Veillard <veillard@redhat.com>
|
3
|
-
Date: Tue, 3 Nov 2015 15:31:25 +0800
|
4
|
-
Subject: [PATCH 8/8] CVE-2015-8035 Fix XZ compression support loop
|
5
|
-
|
6
|
-
For https://bugzilla.gnome.org/show_bug.cgi?id=757466
|
7
|
-
DoS when parsing specially crafted XML document if XZ support
|
8
|
-
is compiled in (which wasn't the case for 2.9.2 and master since
|
9
|
-
Nov 2013, fixed in next commit !)
|
10
|
-
---
|
11
|
-
xzlib.c | 4 ++++
|
12
|
-
1 file changed, 4 insertions(+)
|
13
|
-
|
14
|
-
diff --git a/xzlib.c b/xzlib.c
|
15
|
-
index 0dcb9f4..1fab546 100644
|
16
|
-
--- a/xzlib.c
|
17
|
-
+++ b/xzlib.c
|
18
|
-
@@ -581,6 +581,10 @@ xz_decomp(xz_statep state)
|
19
|
-
xz_error(state, LZMA_DATA_ERROR, "compressed data error");
|
20
|
-
return -1;
|
21
|
-
}
|
22
|
-
+ if (ret == LZMA_PROG_ERROR) {
|
23
|
-
+ xz_error(state, LZMA_PROG_ERROR, "compression error");
|
24
|
-
+ return -1;
|
25
|
-
+ }
|
26
|
-
} while (strm->avail_out && ret != LZMA_STREAM_END);
|
27
|
-
|
28
|
-
/* update available output and crc check value */
|
29
|
-
--
|
30
|
-
2.5.0
|
31
|
-
|
@@ -1,397 +0,0 @@
|
|
1
|
-
From e69a9f45d49d97cd1b0bb56e52d4eed1de9c9b25 Mon Sep 17 00:00:00 2001
|
2
|
-
From: Hernan Erasmo <dherasmo@gmail.com>
|
3
|
-
Date: Fri, 6 Nov 2015 08:16:13 -0300
|
4
|
-
Subject: [PATCH] Updated config.guess
|
5
|
-
|
6
|
-
config.guess has been updated to the latest version (now
|
7
|
-
recognizes ppc64le architecture)
|
8
|
-
---
|
9
|
-
config.guess | 238 ++++++++++++++++-------------------------------------------
|
10
|
-
1 file changed, 62 insertions(+), 176 deletions(-)
|
11
|
-
|
12
|
-
diff --git a/config.guess b/config.guess
|
13
|
-
index b79252d..b3f9053 100755
|
14
|
-
--- a/config.guess
|
15
|
-
+++ b/config.guess
|
16
|
-
@@ -1,8 +1,8 @@
|
17
|
-
#! /bin/sh
|
18
|
-
# Attempt to guess a canonical system name.
|
19
|
-
-# Copyright 1992-2013 Free Software Foundation, Inc.
|
20
|
-
+# Copyright 1992-2015 Free Software Foundation, Inc.
|
21
|
-
|
22
|
-
-timestamp='2013-06-10'
|
23
|
-
+timestamp='2015-10-21'
|
24
|
-
|
25
|
-
# This file is free software; you can redistribute it and/or modify it
|
26
|
-
# under the terms of the GNU General Public License as published by
|
27
|
-
@@ -24,12 +24,12 @@ timestamp='2013-06-10'
|
28
|
-
# program. This Exception is an additional permission under section 7
|
29
|
-
# of the GNU General Public License, version 3 ("GPLv3").
|
30
|
-
#
|
31
|
-
-# Originally written by Per Bothner.
|
32
|
-
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
|
33
|
-
#
|
34
|
-
# You can get the latest version of this script from:
|
35
|
-
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
|
36
|
-
#
|
37
|
-
-# Please send patches with a ChangeLog entry to config-patches@gnu.org.
|
38
|
-
+# Please send patches to <config-patches@gnu.org>.
|
39
|
-
|
40
|
-
|
41
|
-
me=`echo "$0" | sed -e 's,.*/,,'`
|
42
|
-
@@ -50,7 +50,7 @@ version="\
|
43
|
-
GNU config.guess ($timestamp)
|
44
|
-
|
45
|
-
Originally written by Per Bothner.
|
46
|
-
-Copyright 1992-2013 Free Software Foundation, Inc.
|
47
|
-
+Copyright 1992-2015 Free Software Foundation, Inc.
|
48
|
-
|
49
|
-
This is free software; see the source for copying conditions. There is NO
|
50
|
-
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
51
|
-
@@ -149,7 +149,7 @@ Linux|GNU|GNU/*)
|
52
|
-
LIBC=gnu
|
53
|
-
#endif
|
54
|
-
EOF
|
55
|
-
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
|
56
|
-
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
|
57
|
-
;;
|
58
|
-
esac
|
59
|
-
|
60
|
-
@@ -168,20 +168,27 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
61
|
-
# Note: NetBSD doesn't particularly care about the vendor
|
62
|
-
# portion of the name. We always set it to "unknown".
|
63
|
-
sysctl="sysctl -n hw.machine_arch"
|
64
|
-
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
|
65
|
-
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
|
66
|
-
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
|
67
|
-
+ /sbin/$sysctl 2>/dev/null || \
|
68
|
-
+ /usr/sbin/$sysctl 2>/dev/null || \
|
69
|
-
+ echo unknown)`
|
70
|
-
case "${UNAME_MACHINE_ARCH}" in
|
71
|
-
armeb) machine=armeb-unknown ;;
|
72
|
-
arm*) machine=arm-unknown ;;
|
73
|
-
sh3el) machine=shl-unknown ;;
|
74
|
-
sh3eb) machine=sh-unknown ;;
|
75
|
-
sh5el) machine=sh5le-unknown ;;
|
76
|
-
+ earmv*)
|
77
|
-
+ arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
|
78
|
-
+ endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
|
79
|
-
+ machine=${arch}${endian}-unknown
|
80
|
-
+ ;;
|
81
|
-
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
|
82
|
-
esac
|
83
|
-
# The Operating System including object format, if it has switched
|
84
|
-
# to ELF recently, or will in the future.
|
85
|
-
case "${UNAME_MACHINE_ARCH}" in
|
86
|
-
- arm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
87
|
-
+ arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
88
|
-
eval $set_cc_for_build
|
89
|
-
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
90
|
-
| grep -q __ELF__
|
91
|
-
@@ -197,6 +204,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
92
|
-
os=netbsd
|
93
|
-
;;
|
94
|
-
esac
|
95
|
-
+ # Determine ABI tags.
|
96
|
-
+ case "${UNAME_MACHINE_ARCH}" in
|
97
|
-
+ earm*)
|
98
|
-
+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
|
99
|
-
+ abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
|
100
|
-
+ ;;
|
101
|
-
+ esac
|
102
|
-
# The OS release
|
103
|
-
# Debian GNU/NetBSD machines have a different userland, and
|
104
|
-
# thus, need a distinct triplet. However, they do not need
|
105
|
-
@@ -207,13 +221,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
106
|
-
release='-gnu'
|
107
|
-
;;
|
108
|
-
*)
|
109
|
-
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
110
|
-
+ release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
|
111
|
-
;;
|
112
|
-
esac
|
113
|
-
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
114
|
-
# contains redundant information, the shorter form:
|
115
|
-
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
116
|
-
- echo "${machine}-${os}${release}"
|
117
|
-
+ echo "${machine}-${os}${release}${abi}"
|
118
|
-
exit ;;
|
119
|
-
*:Bitrig:*:*)
|
120
|
-
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
|
121
|
-
@@ -235,6 +249,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
122
|
-
*:MirBSD:*:*)
|
123
|
-
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
|
124
|
-
exit ;;
|
125
|
-
+ *:Sortix:*:*)
|
126
|
-
+ echo ${UNAME_MACHINE}-unknown-sortix
|
127
|
-
+ exit ;;
|
128
|
-
alpha:OSF1:*:*)
|
129
|
-
case $UNAME_RELEASE in
|
130
|
-
*4.0)
|
131
|
-
@@ -579,8 +596,9 @@ EOF
|
132
|
-
else
|
133
|
-
IBM_ARCH=powerpc
|
134
|
-
fi
|
135
|
-
- if [ -x /usr/bin/oslevel ] ; then
|
136
|
-
- IBM_REV=`/usr/bin/oslevel`
|
137
|
-
+ if [ -x /usr/bin/lslpp ] ; then
|
138
|
-
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
|
139
|
-
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
|
140
|
-
else
|
141
|
-
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
|
142
|
-
fi
|
143
|
-
@@ -826,7 +844,7 @@ EOF
|
144
|
-
*:MINGW*:*)
|
145
|
-
echo ${UNAME_MACHINE}-pc-mingw32
|
146
|
-
exit ;;
|
147
|
-
- i*:MSYS*:*)
|
148
|
-
+ *:MSYS*:*)
|
149
|
-
echo ${UNAME_MACHINE}-pc-msys
|
150
|
-
exit ;;
|
151
|
-
i*:windows32*:*)
|
152
|
-
@@ -932,6 +950,9 @@ EOF
|
153
|
-
crisv32:Linux:*:*)
|
154
|
-
echo ${UNAME_MACHINE}-axis-linux-${LIBC}
|
155
|
-
exit ;;
|
156
|
-
+ e2k:Linux:*:*)
|
157
|
-
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
158
|
-
+ exit ;;
|
159
|
-
frv:Linux:*:*)
|
160
|
-
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
161
|
-
exit ;;
|
162
|
-
@@ -944,6 +965,9 @@ EOF
|
163
|
-
ia64:Linux:*:*)
|
164
|
-
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
165
|
-
exit ;;
|
166
|
-
+ k1om:Linux:*:*)
|
167
|
-
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
168
|
-
+ exit ;;
|
169
|
-
m32r*:Linux:*:*)
|
170
|
-
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
171
|
-
exit ;;
|
172
|
-
@@ -969,10 +993,10 @@ EOF
|
173
|
-
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
|
174
|
-
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
|
175
|
-
;;
|
176
|
-
- or1k:Linux:*:*)
|
177
|
-
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
178
|
-
+ openrisc*:Linux:*:*)
|
179
|
-
+ echo or1k-unknown-linux-${LIBC}
|
180
|
-
exit ;;
|
181
|
-
- or32:Linux:*:*)
|
182
|
-
+ or32:Linux:*:* | or1k*:Linux:*:*)
|
183
|
-
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
184
|
-
exit ;;
|
185
|
-
padre:Linux:*:*)
|
186
|
-
@@ -1020,7 +1044,7 @@ EOF
|
187
|
-
echo ${UNAME_MACHINE}-dec-linux-${LIBC}
|
188
|
-
exit ;;
|
189
|
-
x86_64:Linux:*:*)
|
190
|
-
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
191
|
-
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
|
192
|
-
exit ;;
|
193
|
-
xtensa*:Linux:*:*)
|
194
|
-
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
|
195
|
-
@@ -1099,7 +1123,7 @@ EOF
|
196
|
-
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
197
|
-
# the processor, so we play safe by assuming i586.
|
198
|
-
# Note: whatever this is, it MUST be the same as what config.sub
|
199
|
-
- # prints for the "djgpp" host, or else GDB configury will decide that
|
200
|
-
+ # prints for the "djgpp" host, or else GDB configure will decide that
|
201
|
-
# this is a cross-build.
|
202
|
-
echo i586-pc-msdosdjgpp
|
203
|
-
exit ;;
|
204
|
-
@@ -1260,16 +1284,26 @@ EOF
|
205
|
-
if test "$UNAME_PROCESSOR" = unknown ; then
|
206
|
-
UNAME_PROCESSOR=powerpc
|
207
|
-
fi
|
208
|
-
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
209
|
-
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
210
|
-
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
211
|
-
- grep IS_64BIT_ARCH >/dev/null
|
212
|
-
- then
|
213
|
-
- case $UNAME_PROCESSOR in
|
214
|
-
- i386) UNAME_PROCESSOR=x86_64 ;;
|
215
|
-
- powerpc) UNAME_PROCESSOR=powerpc64 ;;
|
216
|
-
- esac
|
217
|
-
+ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
|
218
|
-
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
219
|
-
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
|
220
|
-
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
221
|
-
+ grep IS_64BIT_ARCH >/dev/null
|
222
|
-
+ then
|
223
|
-
+ case $UNAME_PROCESSOR in
|
224
|
-
+ i386) UNAME_PROCESSOR=x86_64 ;;
|
225
|
-
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
|
226
|
-
+ esac
|
227
|
-
+ fi
|
228
|
-
fi
|
229
|
-
+ elif test "$UNAME_PROCESSOR" = i386 ; then
|
230
|
-
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
|
231
|
-
+ # that puts up a graphical alert prompting to install
|
232
|
-
+ # developer tools. Any system running Mac OS X 10.7 or
|
233
|
-
+ # later (Darwin 11 and later) is required to have a 64-bit
|
234
|
-
+ # processor. This is not true of the ARM version of Darwin
|
235
|
-
+ # that Apple uses in portable devices.
|
236
|
-
+ UNAME_PROCESSOR=x86_64
|
237
|
-
fi
|
238
|
-
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
239
|
-
exit ;;
|
240
|
-
@@ -1361,154 +1395,6 @@ EOF
|
241
|
-
exit ;;
|
242
|
-
esac
|
243
|
-
|
244
|
-
-eval $set_cc_for_build
|
245
|
-
-cat >$dummy.c <<EOF
|
246
|
-
-#ifdef _SEQUENT_
|
247
|
-
-# include <sys/types.h>
|
248
|
-
-# include <sys/utsname.h>
|
249
|
-
-#endif
|
250
|
-
-main ()
|
251
|
-
-{
|
252
|
-
-#if defined (sony)
|
253
|
-
-#if defined (MIPSEB)
|
254
|
-
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
|
255
|
-
- I don't know.... */
|
256
|
-
- printf ("mips-sony-bsd\n"); exit (0);
|
257
|
-
-#else
|
258
|
-
-#include <sys/param.h>
|
259
|
-
- printf ("m68k-sony-newsos%s\n",
|
260
|
-
-#ifdef NEWSOS4
|
261
|
-
- "4"
|
262
|
-
-#else
|
263
|
-
- ""
|
264
|
-
-#endif
|
265
|
-
- ); exit (0);
|
266
|
-
-#endif
|
267
|
-
-#endif
|
268
|
-
-
|
269
|
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
|
270
|
-
- printf ("arm-acorn-riscix\n"); exit (0);
|
271
|
-
-#endif
|
272
|
-
-
|
273
|
-
-#if defined (hp300) && !defined (hpux)
|
274
|
-
- printf ("m68k-hp-bsd\n"); exit (0);
|
275
|
-
-#endif
|
276
|
-
-
|
277
|
-
-#if defined (NeXT)
|
278
|
-
-#if !defined (__ARCHITECTURE__)
|
279
|
-
-#define __ARCHITECTURE__ "m68k"
|
280
|
-
-#endif
|
281
|
-
- int version;
|
282
|
-
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
|
283
|
-
- if (version < 4)
|
284
|
-
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
|
285
|
-
- else
|
286
|
-
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
|
287
|
-
- exit (0);
|
288
|
-
-#endif
|
289
|
-
-
|
290
|
-
-#if defined (MULTIMAX) || defined (n16)
|
291
|
-
-#if defined (UMAXV)
|
292
|
-
- printf ("ns32k-encore-sysv\n"); exit (0);
|
293
|
-
-#else
|
294
|
-
-#if defined (CMU)
|
295
|
-
- printf ("ns32k-encore-mach\n"); exit (0);
|
296
|
-
-#else
|
297
|
-
- printf ("ns32k-encore-bsd\n"); exit (0);
|
298
|
-
-#endif
|
299
|
-
-#endif
|
300
|
-
-#endif
|
301
|
-
-
|
302
|
-
-#if defined (__386BSD__)
|
303
|
-
- printf ("i386-pc-bsd\n"); exit (0);
|
304
|
-
-#endif
|
305
|
-
-
|
306
|
-
-#if defined (sequent)
|
307
|
-
-#if defined (i386)
|
308
|
-
- printf ("i386-sequent-dynix\n"); exit (0);
|
309
|
-
-#endif
|
310
|
-
-#if defined (ns32000)
|
311
|
-
- printf ("ns32k-sequent-dynix\n"); exit (0);
|
312
|
-
-#endif
|
313
|
-
-#endif
|
314
|
-
-
|
315
|
-
-#if defined (_SEQUENT_)
|
316
|
-
- struct utsname un;
|
317
|
-
-
|
318
|
-
- uname(&un);
|
319
|
-
-
|
320
|
-
- if (strncmp(un.version, "V2", 2) == 0) {
|
321
|
-
- printf ("i386-sequent-ptx2\n"); exit (0);
|
322
|
-
- }
|
323
|
-
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
|
324
|
-
- printf ("i386-sequent-ptx1\n"); exit (0);
|
325
|
-
- }
|
326
|
-
- printf ("i386-sequent-ptx\n"); exit (0);
|
327
|
-
-
|
328
|
-
-#endif
|
329
|
-
-
|
330
|
-
-#if defined (vax)
|
331
|
-
-# if !defined (ultrix)
|
332
|
-
-# include <sys/param.h>
|
333
|
-
-# if defined (BSD)
|
334
|
-
-# if BSD == 43
|
335
|
-
- printf ("vax-dec-bsd4.3\n"); exit (0);
|
336
|
-
-# else
|
337
|
-
-# if BSD == 199006
|
338
|
-
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
|
339
|
-
-# else
|
340
|
-
- printf ("vax-dec-bsd\n"); exit (0);
|
341
|
-
-# endif
|
342
|
-
-# endif
|
343
|
-
-# else
|
344
|
-
- printf ("vax-dec-bsd\n"); exit (0);
|
345
|
-
-# endif
|
346
|
-
-# else
|
347
|
-
- printf ("vax-dec-ultrix\n"); exit (0);
|
348
|
-
-# endif
|
349
|
-
-#endif
|
350
|
-
-
|
351
|
-
-#if defined (alliant) && defined (i860)
|
352
|
-
- printf ("i860-alliant-bsd\n"); exit (0);
|
353
|
-
-#endif
|
354
|
-
-
|
355
|
-
- exit (1);
|
356
|
-
-}
|
357
|
-
-EOF
|
358
|
-
-
|
359
|
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
|
360
|
-
- { echo "$SYSTEM_NAME"; exit; }
|
361
|
-
-
|
362
|
-
-# Apollos put the system type in the environment.
|
363
|
-
-
|
364
|
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
|
365
|
-
-
|
366
|
-
-# Convex versions that predate uname can use getsysinfo(1)
|
367
|
-
-
|
368
|
-
-if [ -x /usr/convex/getsysinfo ]
|
369
|
-
-then
|
370
|
-
- case `getsysinfo -f cpu_type` in
|
371
|
-
- c1*)
|
372
|
-
- echo c1-convex-bsd
|
373
|
-
- exit ;;
|
374
|
-
- c2*)
|
375
|
-
- if getsysinfo -f scalar_acc
|
376
|
-
- then echo c32-convex-bsd
|
377
|
-
- else echo c2-convex-bsd
|
378
|
-
- fi
|
379
|
-
- exit ;;
|
380
|
-
- c34*)
|
381
|
-
- echo c34-convex-bsd
|
382
|
-
- exit ;;
|
383
|
-
- c38*)
|
384
|
-
- echo c38-convex-bsd
|
385
|
-
- exit ;;
|
386
|
-
- c4*)
|
387
|
-
- echo c4-convex-bsd
|
388
|
-
- exit ;;
|
389
|
-
- esac
|
390
|
-
-fi
|
391
|
-
-
|
392
|
-
cat >&2 <<EOF
|
393
|
-
$0: unable to guess system type
|
394
|
-
|
395
|
-
--
|
396
|
-
2.1.4
|
397
|
-
|