[21.5] Fix assert in reverse search
17 years, 3 months
Stephen J. Turnbull
21.5
In search.c simple_search(), a reverse search can underrun the buffer.
In a debug build, this will assert in DEC_BYTEBPOS. This doesn't
happen on most reverse searches because you need the initial substring
of the buffer to match the tail of the pattern, or the buffer pointer
won't get to where it tries to decrement from 1.
At least, that's what I think is going on. I will commit when I've
constructed a test case and verified the theory.
This patch also includes the usual marginal doc "IMHO improvements".
This patch is informational only, I used cvs diff -w to generate it.
Do not apply this patch.
Index: src/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ChangeLog,v
retrieving revision 1.1112
diff -u -U0 -r1.1112 ChangeLog
--- src/ChangeLog 5 Dec 2007 08:26:00 -0000 1.1112
+++ src/ChangeLog 5 Dec 2007 09:08:30 -0000
@@ -0,0 +1,5 @@
+2007-12-05 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * search.c (simple_search): Fix underrun in reverse search.
+ (search_buffer): Clarify decision to use boyer_moore or not.
+
Index: src/search.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/search.c,v
retrieving revision 1.47
diff -u -w -r1.47 search.c
--- src/search.c 1 Oct 2007 08:07:53 -0000 1.47
+++ src/search.c 5 Dec 2007 09:08:34 -0000
@@ -1371,14 +1371,17 @@
boyer_moore_ok = 0;
if (translated != c || inverse != c)
{
- /* Keep track of which character set row
- contains the characters that need translation. */
+ /* Keep track of which charset and character set row
+ contains the characters that need translation.
+ Zero out the bits corresponding to the last byte.
+ */
int charset_base_code = c & ~ICHAR_FIELD3_MASK;
if (charset_base == -1)
charset_base = charset_base_code;
else if (charset_base != charset_base_code)
- /* If two different rows appear, needing translation,
- then we cannot use boyer_moore search. */
+ /* If two different rows appear, needing translation, then
+ we cannot use boyer_moore search. See the comment at the
+ head of boyer_moore(). */
boyer_moore_ok = 0;
}
memcpy (pat, tmp_str, new_bytelen);
@@ -1468,6 +1471,13 @@
n--;
}
else
+ {
+ /* If lim < len, then there are too few buffer positions to hold the
+ pattern between the beginning of the buffer and lim. Adjust to
+ ensure pattern fits. If we don't do this, we can assert in the
+ DEC_BYTEBPOS below. */
+ if (lim < len)
+ lim = len;
while (n < 0)
{
while (1)
@@ -1505,6 +1515,7 @@
}
n++;
}
+ }
stop:
if (n == 0)
{
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: src/search.c (simple_search): Fix underrun in reverse search.
17 years, 3 months
Stephen Turnbull
changeset: 4322:f70e56bb52a72781ed9382fda2826a6e1ad40f7d
tag: tip
user: Stephen J. Turnbull <stephen(a)xemacs.org>
date: Mon Dec 10 01:13:36 2007 -0800
files: src/ChangeLog src/search.c tests/ChangeLog tests/reproduce-bugs.el
description:
src/search.c (simple_search): Fix underrun in reverse search.
Add braces to avoid future whitespace bogosity.
(search_buffer): Clarify decision to use boyer_moore or not.
tests/reproduce-bugs.el: Bug 10 to test for the underrun.
diff -r 98e54edf3ab249cbc1f4a03f87b0df853e964bc3 -r f70e56bb52a72781ed9382fda2826a6e1ad40f7d src/ChangeLog
--- a/src/ChangeLog Mon Dec 10 00:57:19 2007 -0800
+++ b/src/ChangeLog Mon Dec 10 01:13:36 2007 -0800
@@ -1,3 +1,8 @@ 2007-12-06 Aidan Kehoe <kehoea@parhasa
+2007-12-05 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * search.c (simple_search): Fix underrun in reverse search.
+ (search_buffer): Clarify decision to use boyer_moore or not.
+
2007-12-06 Aidan Kehoe <kehoea(a)parhasard.net>
* tests.c (Ftest_data_format_conversion):
diff -r 98e54edf3ab249cbc1f4a03f87b0df853e964bc3 -r f70e56bb52a72781ed9382fda2826a6e1ad40f7d src/search.c
--- a/src/search.c Mon Dec 10 00:57:19 2007 -0800
+++ b/src/search.c Mon Dec 10 01:13:36 2007 -0800
@@ -1371,14 +1371,17 @@ search_buffer (struct buffer *buf, Lisp_
boyer_moore_ok = 0;
if (translated != c || inverse != c)
{
- /* Keep track of which character set row
- contains the characters that need translation. */
+ /* Keep track of which charset and character set row
+ contains the characters that need translation.
+ Zero out the bits corresponding to the last byte.
+ */
int charset_base_code = c & ~ICHAR_FIELD3_MASK;
if (charset_base == -1)
charset_base = charset_base_code;
else if (charset_base != charset_base_code)
- /* If two different rows appear, needing translation,
- then we cannot use boyer_moore search. */
+ /* If two different rows appear, needing translation, then
+ we cannot use boyer_moore search. See the comment at the
+ head of boyer_moore(). */
boyer_moore_ok = 0;
}
memcpy (pat, tmp_str, new_bytelen);
@@ -1468,43 +1471,51 @@ simple_search (struct buffer *buf, Ibyte
n--;
}
else
- while (n < 0)
- {
- while (1)
- {
- Bytecount this_len = len;
- Bytebpos this_pos = pos;
- Ibyte *p;
- if (pos <= lim)
- goto stop;
- p = base_pat + len;
-
- while (this_len > 0)
- {
- Ichar pat_ch, buf_ch;
-
- DEC_IBYTEPTR (p);
- DEC_BYTEBPOS (buf, this_pos);
- pat_ch = itext_ichar (p);
- buf_ch = BYTE_BUF_FETCH_CHAR (buf, this_pos);
-
- buf_ch = TRANSLATE (trt, buf_ch);
-
- if (buf_ch != pat_ch)
+ {
+ /* If lim < len, then there are too few buffer positions to hold the
+ pattern between the beginning of the buffer and lim. Adjust to
+ ensure pattern fits. If we don't do this, we can assert in the
+ DEC_BYTEBPOS below. */
+ if (lim < len)
+ lim = len;
+ while (n < 0)
+ {
+ while (1)
+ {
+ Bytecount this_len = len;
+ Bytebpos this_pos = pos;
+ Ibyte *p;
+ if (pos <= lim)
+ goto stop;
+ p = base_pat + len;
+
+ while (this_len > 0)
+ {
+ Ichar pat_ch, buf_ch;
+
+ DEC_IBYTEPTR (p);
+ DEC_BYTEBPOS (buf, this_pos);
+ pat_ch = itext_ichar (p);
+ buf_ch = BYTE_BUF_FETCH_CHAR (buf, this_pos);
+
+ buf_ch = TRANSLATE (trt, buf_ch);
+
+ if (buf_ch != pat_ch)
+ break;
+
+ this_len -= itext_ichar_len (p);
+ }
+ if (this_len == 0)
+ {
+ buf_len = pos - this_pos;
+ pos = this_pos;
break;
-
- this_len -= itext_ichar_len (p);
- }
- if (this_len == 0)
- {
- buf_len = pos - this_pos;
- pos = this_pos;
- break;
- }
- DEC_BYTEBPOS (buf, pos);
- }
- n++;
- }
+ }
+ DEC_BYTEBPOS (buf, pos);
+ }
+ n++;
+ }
+ }
stop:
if (n == 0)
{
diff -r 98e54edf3ab249cbc1f4a03f87b0df853e964bc3 -r f70e56bb52a72781ed9382fda2826a6e1ad40f7d tests/ChangeLog
--- a/tests/ChangeLog Mon Dec 10 00:57:19 2007 -0800
+++ b/tests/ChangeLog Mon Dec 10 01:13:36 2007 -0800
@@ -1,3 +1,7 @@ 2007-12-10 Stephen J. Turnbull <stephe
+2007-12-10 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * reproduce-bugs.el (reproduce-bug): Add bug 10, crash in search.
+
2007-12-10 Stephen J. Turnbull <stephen(a)xemacs.org>
* reproduce-bugs.el: Add some commentary.
diff -r 98e54edf3ab249cbc1f4a03f87b0df853e964bc3 -r f70e56bb52a72781ed9382fda2826a6e1ad40f7d tests/reproduce-bugs.el
--- a/tests/reproduce-bugs.el Mon Dec 10 00:57:19 2007 -0800
+++ b/tests/reproduce-bugs.el Mon Dec 10 01:13:36 2007 -0800
@@ -70,6 +70,26 @@ A debug version of XEmacs may be needed
;; (global-set-key [(control ?Z)] 'reproduce-bug)
;;;; Bugs follow:
+
+;;; ------------------------------------------------------------------
+;;; Crash in search due to backward movement
+;;; Need Mule build with error checking in 21.5.28.
+;;; Fatal error: assertion failed,
+;;; file /Users/steve/Software/XEmacs/alioth/xemacs/src/search.c, line 1487,
+;;; (this_pos) > ((Bytebpos) 1) && this_pos <= ((buf)->text->z + 0)
+;;; Reported: <475B104F.2070807(a)barco.com>
+;;; <87hcixwkh4.fsf(a)uwakimon.sk.tsukuba.ac.jp>
+;;; Fixed: <87hcixwkh4.fsf(a)uwakimon.sk.tsukuba.ac.jp>
+(defbug 10
+ (switch-to-buffer (get-buffer-create "*crash me*"))
+ ;; doozy is the keystroke version of the keyboard macro
+ ;; "IAI" C-b C-b C-s C-x
+ (let ((doozy [;;(control ?x) ?b ?j ?u ?n ?k return
+ ?I ?A ?I
+ (control ?b) (control ?b)
+ (control ?s) (control ?w)]))
+ (execute-kbd-macro doozy)))
+
;;; ------------------------------------------------------------------
;;; Crash on trace-function
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Resuscitate reproduce-bugs.el.
17 years, 3 months
Stephen Turnbull
changeset: 4321:98e54edf3ab249cbc1f4a03f87b0df853e964bc3
user: Stephen J. Turnbull <stephen(a)xemacs.org>
date: Mon Dec 10 00:57:19 2007 -0800
files: tests/ChangeLog tests/reproduce-bugs.el
description:
Resuscitate reproduce-bugs.el.
Add commentary.
Number unnumbered bugs.
Comment out keybinding.
diff -r a78603f584d71fe4187a419916c82872e754f14f -r 98e54edf3ab249cbc1f4a03f87b0df853e964bc3 tests/ChangeLog
--- a/tests/ChangeLog Mon Dec 10 00:39:56 2007 +0200
+++ b/tests/ChangeLog Mon Dec 10 00:57:19 2007 -0800
@@ -1,3 +1,9 @@ 2007-12-06 Aidan Kehoe <kehoea@parhasa
+2007-12-10 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * reproduce-bugs.el: Add some commentary.
+ Number the two unnumbered bugs.
+ Comment out the keybinding.
+
2007-12-06 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/mule-tests.el:
diff -r a78603f584d71fe4187a419916c82872e754f14f -r 98e54edf3ab249cbc1f4a03f87b0df853e964bc3 tests/reproduce-bugs.el
--- a/tests/reproduce-bugs.el Mon Dec 10 00:39:56 2007 +0200
+++ b/tests/reproduce-bugs.el Mon Dec 10 00:57:19 2007 -0800
@@ -36,6 +36,10 @@
;; It's a bad idea to rely on code in this file continuing to work in
;; the same way. :-)
+
+;; #### This file should be cleaned up and renamed reproduce-crashes.el.
+;; #### Bugs need docstrings.
+;; #### Fixed bugs should become regression tests.
;;; Code:
@@ -63,7 +67,7 @@ A debug version of XEmacs may be needed
;;; Change this to your preferred key-binding
-(global-set-key [(control ?Z)] 'reproduce-bug)
+;; (global-set-key [(control ?Z)] 'reproduce-bug)
;;;; Bugs follow:
@@ -170,6 +174,7 @@ public static void main(String[] args) t
(message "Bug! point should equal 3 but is %d" (point)))))
;;; crash popup frames FIXED
+;; defbug 8
;;(global-set-key
;; [(alt meta control f12)]
;; (lambda ()
@@ -182,6 +187,7 @@ public static void main(String[] args) t
;; (save-buffers-kill-emacs))))
;;; crash on delete-frame-hook - FIXED!
+;; defbug 9
;;(global-set-key
;; [(alt meta control f10)]
;; (lambda ()
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Spelling fixes.
17 years, 3 months
Ville Skyttä
changeset: 4320:a78603f584d71fe4187a419916c82872e754f14f
tag: tip
user: "Ville SkyttÀ <scop(a)xemacs.org>"
date: Mon Dec 10 00:39:56 2007 +0200
files: man/ChangeLog man/internals/internals.texi
description:
Spelling fixes.
diff -r 74d00c7cc134a6cc94eac170ca774ecef7736ee8 -r a78603f584d71fe4187a419916c82872e754f14f man/ChangeLog
--- a/man/ChangeLog Sun Dec 09 18:31:41 2007 +0100
+++ b/man/ChangeLog Mon Dec 10 00:39:56 2007 +0200
@@ -1,3 +1,7 @@ 2007-12-07 Ville Skyttä <scop(a)xemacs.o
+2007-12-10 Ville Skyttä <scop(a)xemacs.org>
+
+ * internals/internals.texi: Spelling fixes.
+
2007-12-07 Ville Skyttä <scop(a)xemacs.org>
* beta.texi, emodules.texi, term.texi, termcap.texi, texinfo.texi,
diff -r 74d00c7cc134a6cc94eac170ca774ecef7736ee8 -r a78603f584d71fe4187a419916c82872e754f14f man/internals/internals.texi
--- a/man/internals/internals.texi Sun Dec 09 18:31:41 2007 +0100
+++ b/man/internals/internals.texi Mon Dec 10 00:39:56 2007 +0200
@@ -947,21 +947,21 @@ Menus: Jamie Zawinski, someone at Lucid
@item
Scrollbars: Chuck Thompson, ??? (Lucid scrollbar)
@item
-Multi-device/device-independence work (console/device/etc methods): Ben Wing, prototype by chuck thompson
+Multi-device/device-independence work (console/device/etc methods): Ben Wing, prototype by Chuck Thompson
@item
Faces: first implementation, Jamie Zawinski; second, chuck; third, Ben Wing
@item
Fonts/colors: first implementation, Jamie Zawinski; further work, Ben Wing
@item
-Toolbars: implementation, chuck, much interface work, Ben Wing
-@item
-Gutters, tabs: andy piper
+Toolbars: implementation, Chuck, much interface work, Ben Wing
+@item
+Gutters, tabs: Andy Piper
@end itemize
@item Device subsystems
@itemize @minus
@item
-X Windows: Jamie Zawinksi, Ben Wing, others
+X Windows: Jamie Zawinski, Ben Wing, others
@item
GTK: William Perry, Malcolm Purvis
@item
@@ -975,7 +975,7 @@ Cygwin: Andy Piper
@item Misc
@itemize @minus
@item
-Configure: initial porting from fsf, Chuck Thompson; conversion to autoconf 2, much rewriting, Martin Buchholz
+Configure: initial porting from FSF, Chuck Thompson; conversion to autoconf 2, much rewriting, Martin Buchholz
@item
Most initialization-related code: Ben Wing
@item
@@ -1023,7 +1023,7 @@ and has attempted to be the "face" of XE
and has attempted to be the "face" of XEmacs on the newsgroups and
mailing lists.
@item
-Steve Youngs, Ville Skytta, and now Norbert Koch have taken turns
+Steve Youngs, Ville Skyttä¬ and now Norbert Koch have taken turns
maintaining the packages.
@item
Vin Shelton maintains the stable releases.
@@ -1037,7 +1037,7 @@ Testing - #### Norbert, Adrian, ???
@table @asis
@item Jamie Zawinski, Eric Benson, Matthieu Devin, Harlan Sexton
-These were the early creators of Lucid Emacs, the predecessor of Xemacs.
+These were the early creators of Lucid Emacs, the predecessor of XEmacs.
Jamie Zawinski was the primary maintainer and coder for Lucid Emacs,
active between early 1991 and June 1994. He presided over versions 19.0
through 19.10, and then abruptly left for Netscape. He wrote the
@@ -1054,44 +1054,44 @@ Active 1991 to 1993, author of much of t
Active 1991 to 1993, author of much of the current Lisp object scheme,
including Lrecords and LC records (added this support in 1993 to allow
for 28-bit pointers, which had previously been restricted to 26 bits.)
-Moved the minibuffer and abbreve code into Lisp, worked on the keymap
-code and did the initial synching between Xemacs and the first released
+Moved the minibuffer and abbrev code into Lisp, worked on the keymap
+code and did the initial synching between XEmacs and the first released
version of GNU Emacs version 19 in mid-1993.
@item Martin Buchholz
-Active 1995 to 2001, maintainer of Xemacs late 1999 to ?, author of the
+Active 1995 to 2001, maintainer of XEmacs late 1999 to ?, author of the
current configure support, mini optimizations to the byte interpreter,
many improvements to the case changing code and many bug fixes to the
process and system-specific code, also general spell checking and code
cleanliness guru.
@item Steve Baur
-Maintainer of Xemacs 1996 to 1999, responsible for many improvements to
-the Xemacs development process, for example, creation of the review
-board and arranging for Xemacs to be placed under CVS. Author of the
+Maintainer of XEmacs 1996 to 1999, responsible for many improvements to
+the XEmacs development process, for example, creation of the review
+board and arranging for XEmacs to be placed under CVS. Author of the
package code.
@item Chuck Thompson
Active January 1993 to June 1996, author of the current and previous
-versions of the redisplay code and maintainer of Xemacs from mid-1994
-to mid-1996. Creator of XEMacs.org. Also wrote the scrollbar code, the
+versions of the redisplay code and maintainer of XEmacs from mid-1994
+to mid-1996. Creator of xemacs.org. Also wrote the scrollbar code, the
original configure support, and prototype versions of the toolbar and
device code.
@item Ben Wing
Active April 1993 to April 1996 and February 2000 to present. Chief
-coder for Xemacs between 1994 and 1996. Ben Wing was never the
-maintainer of Xemacs, and as a result, is the author of more of the
-Xemacs specific code in Xemacs than anyone else. Author of the mule
+coder for XEmacs between 1994 and 1996. Ben Wing was never the
+maintainer of XEmacs, and as a result, is the author of more of the
+XEmacs specific code in XEmacs than anyone else. Author of the mule
support (Extense code), the glis-phonetically spelled-and specifiers
code most of the toolbars, and device distraction code, the error
checking code, the Lstream code, the bit vector, char-table, and
range-table code, much of the current Xt code, much, much of the events
code (including most of the TTY event code), some of the phase code, and
-numerous other aspects of the code. Also author of most of the Xemacs
-documentation including the internals manual and the Xemacs editions to
+numerous other aspects of the code. Also author of most of the XEmacs
+documentation including the internals manual and the XEmacs editions to
the Lisp reference manual, and responsible for much of the synching
-between Xemacs and GNU Emacs.
+between XEmacs and GNU Emacs.
@item Kyle Jones
Author of the minimal tag bits support, which allows for 32-bit
@@ -1160,13 +1160,13 @@ structures.
@item alloca.c
Inherited a long time ago from a prerelease version of GNU Emacs 19,
-kept in sync with more recent versions very few changes from Xemacs.
+kept in sync with more recent versions very few changes from XEmacs.
Most changes consist of converting the code to ANSI C, and fixing up the
-includes at the top of the file to follow Xemacs conventions.
+includes at the top of the file to follow XEmacs conventions.
@item alloca.s
Inherited almost unchanged from FSF kept in sync up through 19.30
-basically no changes for Xemacs.
+basically no changes for XEmacs.
@end table
@end ignore
@@ -1275,13 +1275,13 @@ transmitted/read by emacs (one or the ot
transmitted/read by emacs (one or the other) correctly.
The 4410 terminal description that I'm using defines up=M-[A
(it appears as ^[[A, with the initial ^[ as one character).
-Pressting cntrl-Q up_arrow while in emacs shows me the same thing.
+Pressing Ctrl-Q up_arrow while in emacs shows me the same thing.
On the vt100 the same thing happens but the terminal file says up=M-A
(it appears as ^[A). I've tried every other imaginable up= but get
the same results. I've also been unsuccessful writing a macro that
understands what my keyboard is saying.
-Any ideas on how I can get the arrow keys to do somethingt?
+Any ideas on how I can get the arrow keys to do something?
Anything? Thanks in advance.
--Bruce Burger AT&T-Information Systems Freehold, NJ
@@ -1751,7 +1751,7 @@ these same years. Steve Baur added the
these same years. Steve Baur added the package system in 1997 (?),
and Olivier Galibert also added the portable dumper support around
2000. Martin Buchholz took over from Steve Baur as release manager in
-late 1998 (?), and continued in this position through to eary 2000
+late 1998 (?), and continued in this position through to early 2000
(?), when Stephen Turnbull took it over. XEmacs has also been split
into stable and experimental branches since early 1999, and Vin
Shelton has been the release manager of the stable branches since the
@@ -4630,7 +4630,7 @@ Autoconf 2.59 divides the @file{configur
Autoconf 2.59 divides the @file{configure} options into those that
specify features (@samp{--enable}) and those that specify external
libraries (@samp{--with}). Many XEmacs options to not fall neatly into
-either of these catagories and so as a matter of policy all options can
+either of these categories and so as a matter of policy all options can
be specified by either method.
These merged options are declared with the @code{XE_MERGED_ARG} macro.
@@ -4660,7 +4660,7 @@ pre-defined values (if support for sets
@samp{--with-mail-locking=flock}.
Keyword options are defined with an expanded form of
-@samp{XE_MERGED_ARG} called @samp{XE_KEYWORD_ARG}, which taks 5
+@samp{XE_MERGED_ARG} called @samp{XE_KEYWORD_ARG}, which takes 5
parameters. The first 4 parameters are the same as original macro with
the exception that all of these four parameters are @strong{required}.
The @var{action-if-true} code is run after the argument list has been
@@ -5954,7 +5954,7 @@ a search-and-replace is done to change t
a search-and-replace is done to change type names and such. Some people
disagree with such changes, and certainly if done without good reason
will just lead to headaches. But it's important to keep the code clean
-and understable, and consistent naming goes a long way towards this.
+and understandable, and consistent naming goes a long way towards this.
An example of the right way to do this was the so-called "great integral
type renaming".
@@ -11328,7 +11328,7 @@ the actual multi-byte encoding.
the actual multi-byte encoding.
@end enumerate
- None of the pre-Unciode standard non-modal encodings meet all of these
+ None of the pre-Unicode standard non-modal encodings meet all of these
conditions. For example, EUC satisfies only (2) and (3), while
Shift-JIS and Big5 (not yet described) satisfy only (2). (All non-modal
encodings must satisfy (2), in order to be unambiguous.) UTF-8,
@@ -11515,7 +11515,7 @@ inside of DNS names.
inside of DNS names.
@end itemize
-Thus, we can imagine three levels in the representation of texual data:
+Thus, we can imagine three levels in the representation of textual data:
@example
series of characters -> series of textual units -> series of bytes
@@ -12095,7 +12095,7 @@ variable section:
variable section:
DECLARE_EISTRING (name);
- Declare a new Eistring and initialize it to the empy string. This
+ Declare a new Eistring and initialize it to the empty string. This
is a standard local variable declaration and can go anywhere in the
variable declaration section. NAME itself is declared as an
Eistring *, and its storage declared on the stack.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Specify coding-system-for-write, add a coding cookie in #'write-abbrev-file.
17 years, 3 months
Aidan Kehoe
changeset: 4319:74d00c7cc134a6cc94eac170ca774ecef7736ee8
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sun Dec 09 18:31:41 2007 +0100
files: lisp/ChangeLog lisp/abbrev.el
description:
Specify coding-system-for-write, add a coding cookie in #'write-abbrev-file.
2007-12-09 Aidan Kehoe <kehoea(a)parhasard.net>
* abbrev.el (write-abbrev-file):
Write FILE using escape-quoted, as a coding system. Add a coding
cookie to specify exactly what coding system was used
(escape-quoted is aliased to binary on non-Mule). Thank you for
the bug report, Uwe Brauer.
This bug would have been resolved ages ago if we had merged
Dave Love's 2002 changes from GNU. Nope, I didn't merge the whole
file when doing this.
diff -r 4d0f773d5e211688cf56f51aaeea2054f3eb016d -r 74d00c7cc134a6cc94eac170ca774ecef7736ee8 lisp/ChangeLog
--- a/lisp/ChangeLog Sun Dec 09 15:10:46 2007 +0100
+++ b/lisp/ChangeLog Sun Dec 09 18:31:41 2007 +0100
@@ -1,3 +1,15 @@ 2007-12-09 Aidan Kehoe <kehoea@parhasa
+2007-12-09 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * abbrev.el (write-abbrev-file):
+ Write FILE using escape-quoted, as a coding system. Add a coding
+ cookie to specify exactly what coding system was used
+ (escape-quoted is aliased to binary on non-Mule). Thank you for
+ the bug report, Uwe Brauer.
+
+ This bug would have been resolved ages ago if we had merged
+ Dave Love's 2002 changes from GNU. Nope, I didn't merge the whole
+ file when doing this.
+
2007-12-09 Aidan Kehoe <kehoea(a)parhasard.net>
* unicode.el (load-unicode-mapping-tables):
diff -r 4d0f773d5e211688cf56f51aaeea2054f3eb016d -r 74d00c7cc134a6cc94eac170ca774ecef7736ee8 lisp/abbrev.el
--- a/lisp/abbrev.el Sun Dec 09 15:10:46 2007 +0100
+++ b/lisp/abbrev.el Sun Dec 09 18:31:41 2007 +0100
@@ -421,8 +421,11 @@ Does not print anything."
(defun write-abbrev-file (file)
"Write all abbrev definitions to a file of Lisp code.
+This does not include system abbrevs; it includes only the abbrev tables
+listed in listed in `abbrev-table-name-list'.
The file written can be loaded in another session to define the same abbrevs.
-The argument FILE is the file name to write."
+The argument FILE is the file name to write. If omitted or nil, the file
+specified in `abbrev-file-name' is used."
(interactive
(list
(read-file-name "Write abbrev file: "
@@ -430,15 +433,19 @@ The argument FILE is the file name to wr
abbrev-file-name)))
(or (and file (> (length file) 0))
(setq file abbrev-file-name))
- (save-excursion
- (set-buffer (get-buffer-create " write-abbrev-file"))
- (erase-buffer)
- (let ((tables abbrev-table-name-list))
- (while tables
- (insert-abbrev-table-description (car tables) nil)
- (setq tables (cdr tables))))
- (write-region 1 (point-max) file)
- (erase-buffer)))
+ (let ((coding-system-for-write 'escape-quoted))
+ (with-temp-file file
+ ;; XEmacs change; not emacs-mule, and use the coding system
+ ;; escape-quoted resolves to, which will differ depending on whether
+ ;; the build is Mule or not.
+ (insert (format ";;-*-coding: %s;-*-\n"
+ (coding-system-name
+ (find-coding-system coding-system-for-write))))
+ (dolist (table
+ ;; XEmacs change; we keep the table sorted at runtime, no
+ ;; need to sort it here.
+ abbrev-table-name-list)
+ (insert-abbrev-table-description table nil)))))
(defun abbrev-string-to-be-defined (arg)
"Return the string for which an abbrev will be defined.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH] Fix the test failures introduced by the non-ISO-2022 coding systems
17 years, 3 months
Aidan Kehoe
src/ChangeLog addition:
2007-12-06 Aidan Kehoe <kehoea(a)parhasard.net>
* tests.c (Ftest_data_format_conversion):
Move those tests that expect that iso-8859-2 is ISO
2022-compatible to testing iso-latin-2-with-esc instead.
tests/ChangeLog addition:
2007-12-06 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/mule-tests.el:
Add a Known-Bug-Expect-Error call testing and documenting that we
don't support all of the Unicode code space in a single session.
* automated/test-harness.el (Known-Bug-Expect-Error):
Provide Known-Bug-Expect-Error, analagous to
Known-Bug-Expect-Failure and Check-Error.
* automated/test-harness.el (Silence-Message):
Dynamically bind the function definition of #'clear-message, as
well as that of #'append-message, to nil.
XEmacs Trunk source patch:
Diff command: cvs -q diff -Nu
Files affected: tests/automated/test-harness.el
===================================================================
RCS tests/automated/mule-tests.el
===================================================================
RCS src/tests.c
===================================================================
RCS
Index: src/tests.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/tests.c,v
retrieving revision 1.13
diff -u -u -r1.13 tests.c
--- src/tests.c 2006/05/23 13:02:07 1.13
+++ src/tests.c 2007/12/06 20:48:44
@@ -37,7 +37,6 @@
static Lisp_Object Vtest_function_list;
-
DEFUN ("test-data-format-conversion", Ftest_data_format_conversion, 0, 0, "", /*
Test TO_EXTERNAL_FORMAT() and TO_INTERNAL_FORMAT()
*/
@@ -70,6 +69,9 @@
/* Check for expected strings before and after conversion.
Conversions depend on whether MULE is defined. */
+
+ /* #### Any code below that uses iso-latin-2-with-esc is ill-conceived. */
+
#ifdef MULE
#define DFC_CHECK_DATA_COND_MULE(ptr,len, \
constant_string_mule, \
@@ -137,7 +139,7 @@
ptr = NULL, len = rand();
TO_EXTERNAL_FORMAT (LISP_STRING, string_latin1,
ALLOCA, (ptr, len),
- intern ("iso-8859-2"));
+ intern ("iso-latin-2-with-esc"));
DFC_CHECK_DATA (ptr, len, ext_latin12);
ptr = NULL, len = rand();
@@ -155,34 +157,34 @@
ptr = NULL, len = rand();
TO_INTERNAL_FORMAT (DATA, (ext_latin, sizeof (ext_latin) - 1),
ALLOCA, (ptr, len),
- intern ("iso-8859-2"));
+ intern ("iso-latin-2-with-esc"));
DFC_CHECK_DATA (ptr, len, int_latin2);
ptr = NULL, len = rand();
TO_INTERNAL_FORMAT (DATA, (ext_latin, sizeof (ext_latin) - 1),
MALLOC, (ptr, len),
- intern ("iso-8859-2"));
+ intern ("iso-latin-2-with-esc"));
DFC_CHECK_DATA (ptr, len, int_latin2);
xfree (ptr, void *);
TO_INTERNAL_FORMAT (DATA, (ext_latin, sizeof (ext_latin) - 1),
LISP_STRING, string,
- intern ("iso-8859-2"));
+ intern ("iso-latin-2-with-esc"));
DFC_CHECK_DATA (XSTRING_DATA (string), XSTRING_LENGTH (string), int_latin2);
TO_INTERNAL_FORMAT (LISP_OPAQUE, opaque_latin,
LISP_STRING, string,
- intern ("iso-8859-2"));
+ intern ("iso-latin-2-with-esc"));
DFC_CHECK_DATA (XSTRING_DATA (string), XSTRING_LENGTH (string), int_latin2);
TO_INTERNAL_FORMAT (LISP_OPAQUE, opaque0_latin,
LISP_STRING, string,
- intern ("iso-8859-2"));
+ intern ("iso-latin-2-with-esc"));
DFC_CHECK_DATA_NUL (XSTRING_DATA (string), XSTRING_LENGTH (string), int_latin2);
TO_INTERNAL_FORMAT (LISP_OPAQUE, opaque0_latin,
LISP_BUFFER, Fcurrent_buffer(),
- intern ("iso-8859-2"));
+ intern ("iso-latin-2-with-esc"));
DFC_CHECK_DATA_NUL (BUF_BYTE_ADDRESS (current_buffer, BUF_PT (current_buffer)),
sizeof (int_latin2), int_latin2);
@@ -194,7 +196,7 @@
TO_INTERNAL_FORMAT (DATA, (ext_latin12, sizeof (ext_latin12) - 1),
ALLOCA, (ptr, len),
- intern ("iso-8859-2"));
+ intern ("iso-latin-2-with-esc"));
DFC_CHECK_DATA (ptr, len, int_latin1);
#endif /* MULE */
Index: tests/automated/mule-tests.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/tests/automated/mule-tests.el,v
retrieving revision 1.22
diff -u -u -r1.22 mule-tests.el
--- tests/automated/mule-tests.el 2007/12/04 20:40:51 1.22
+++ tests/automated/mule-tests.el 2007/12/06 20:48:44
@@ -721,4 +721,17 @@
(Known-Bug-Expect-Failure
(Assert-elc-is-escape-quoted))
(delete-region (point-min) (point-max))))
+
+ (Known-Bug-Expect-Error
+ invalid-constant
+ (loop
+ for i from #x0 to #x10FFFF
+ with exceptions = #s(range-table type start-closed-end-closed
+ data ((#xFFFE #xFFFF) t
+ (#xFDD0 #xFDEF) t
+ (#xD800 #xDBFF) t
+ (#xDC00 #xDFFF) t))
+ do (unless (get-range-table i exceptions)
+ (read (format (if (> i #xFFFF) #r"?\U%08X" #r"?\u%04X") i)))
+ finally return t))
)
Index: tests/automated/test-harness.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/tests/automated/test-harness.el,v
retrieving revision 1.23
diff -u -u -r1.23 test-harness.el
--- tests/automated/test-harness.el 2007/10/01 08:07:57 1.23
+++ tests/automated/test-harness.el 2007/12/06 20:48:45
@@ -203,7 +203,29 @@
`(let ((test-harness-failure-tag "KNOWN BUG")
(test-harness-success-tag "PASS (FAILURE EXPECTED)"))
,@body))
-
+
+ (defmacro Known-Bug-Expect-Error (expected-error &rest body)
+ (let ((quoted-body (if (= 1 (length body))
+ `(quote ,(car body)) `(quote (progn ,@body)))))
+ `(let ((test-harness-failure-tag "KNOWN BUG")
+ (test-harness-success-tag "PASS (FAILURE EXPECTED)"))
+ (condition-case error-info
+ (progn
+ (setq trick-optimizer (progn ,@body))
+ (Print-Pass
+ "%S executed successfully, but expected error %S"
+ ,quoted-body
+ ',expected-error)
+ (incf passes))
+ (,expected-error
+ (Print-Failure "%S ==> error %S, as expected"
+ ,quoted-body ',expected-error)
+ (incf no-error-failures))
+ (error
+ (Print-Failure "%S ==> expected error %S, got error %S instead"
+ ,quoted-body ',expected-error error-info)
+ (incf wrong-error-failures))))))
+
(defmacro Implementation-Incomplete-Expect-Failure (&rest body)
`(let ((test-harness-failure-tag "IMPLEMENTATION INCOMPLETE")
(test-harness-success-tag "PASS (FAILURE EXPECTED)"))
@@ -337,7 +359,9 @@
;; #### Perhaps this should override `message' itself, too?
(defmacro Silence-Message (&rest body)
- `(flet ((append-message (&rest args) ())) ,@body))
+ `(flet ((append-message (&rest args) ())
+ (clear-message (&rest args) ()))
+ ,@body))
(defmacro Ignore-Ebola (&rest body)
`(let ((debug-issue-ebola-notices -42)) ,@body))
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Fix the test failures introduced by the non-ISO-2022 coding systems.
17 years, 3 months
Aidan Kehoe
changeset: 4318:4d0f773d5e211688cf56f51aaeea2054f3eb016d
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sun Dec 09 15:10:46 2007 +0100
files: src/ChangeLog src/tests.c tests/ChangeLog tests/automated/mule-tests.el
description:
Fix the test failures introduced by the non-ISO-2022 coding systems.
APPROVE COMMIT
NOTE: this patch has been committed.
This is patch http://mid.gmane.org/18264.25814.828088.486899@parhasard.net
tests/ChangeLog addition:
2007-12-06 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/mule-tests.el:
Add a Known-Bug-Expect-Error call testing and documenting that we
don't support all of the Unicode code space in a single session.
* automated/test-harness.el (Known-Bug-Expect-Error):
Provide Known-Bug-Expect-Error, analagous to
Known-Bug-Expect-Failure and Check-Error.
* automated/test-harness.el (Silence-Message):
Dynamically bind the function definition of #'clear-message, as
well as that of #'append-message, to nil.
src/ChangeLog addition:
2007-12-06 Aidan Kehoe <kehoea(a)parhasard.net>
* tests.c (Ftest_data_format_conversion):
Move those tests that expect that iso-8859-2 is ISO
2022-compatible to testing iso-latin-2-with-esc instead.
diff -r 15d36164ebd7fb45f2a19c312a27171b8f9e414f -r 4d0f773d5e211688cf56f51aaeea2054f3eb016d src/ChangeLog
--- a/src/ChangeLog Sun Dec 09 14:55:03 2007 +0100
+++ b/src/ChangeLog Sun Dec 09 15:10:46 2007 +0100
@@ -1,3 +1,9 @@ 2007-12-02 Ron Isaacson <ron.isaacson@
+2007-12-06 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * tests.c (Ftest_data_format_conversion):
+ Move those tests that expect that iso-8859-2 is ISO
+ 2022-compatible to testing iso-latin-2-with-esc instead.
+
2007-12-02 Ron Isaacson <ron.isaacson(a)morganstanley.com>
* frame.c (change_frame_size):
diff -r 15d36164ebd7fb45f2a19c312a27171b8f9e414f -r 4d0f773d5e211688cf56f51aaeea2054f3eb016d src/tests.c
--- a/src/tests.c Sun Dec 09 14:55:03 2007 +0100
+++ b/src/tests.c Sun Dec 09 15:10:46 2007 +0100
@@ -36,7 +36,6 @@ Boston, MA 02111-1307, USA. */
#include "file-coding.h" /* XCODING_SYSTEM_EOL_TYPE and its values */
static Lisp_Object Vtest_function_list;
-
DEFUN ("test-data-format-conversion", Ftest_data_format_conversion, 0, 0, "", /*
Test TO_EXTERNAL_FORMAT() and TO_INTERNAL_FORMAT()
@@ -70,6 +69,9 @@ Test TO_EXTERNAL_FORMAT() and TO_INTERNA
/* Check for expected strings before and after conversion.
Conversions depend on whether MULE is defined. */
+
+ /* #### Any code below that uses iso-latin-2-with-esc is ill-conceived. */
+
#ifdef MULE
#define DFC_CHECK_DATA_COND_MULE(ptr,len, \
constant_string_mule, \
@@ -137,7 +139,7 @@ Test TO_EXTERNAL_FORMAT() and TO_INTERNA
ptr = NULL, len = rand();
TO_EXTERNAL_FORMAT (LISP_STRING, string_latin1,
ALLOCA, (ptr, len),
- intern ("iso-8859-2"));
+ intern ("iso-latin-2-with-esc"));
DFC_CHECK_DATA (ptr, len, ext_latin12);
ptr = NULL, len = rand();
@@ -155,34 +157,34 @@ Test TO_EXTERNAL_FORMAT() and TO_INTERNA
ptr = NULL, len = rand();
TO_INTERNAL_FORMAT (DATA, (ext_latin, sizeof (ext_latin) - 1),
ALLOCA, (ptr, len),
- intern ("iso-8859-2"));
+ intern ("iso-latin-2-with-esc"));
DFC_CHECK_DATA (ptr, len, int_latin2);
ptr = NULL, len = rand();
TO_INTERNAL_FORMAT (DATA, (ext_latin, sizeof (ext_latin) - 1),
MALLOC, (ptr, len),
- intern ("iso-8859-2"));
+ intern ("iso-latin-2-with-esc"));
DFC_CHECK_DATA (ptr, len, int_latin2);
xfree (ptr, void *);
TO_INTERNAL_FORMAT (DATA, (ext_latin, sizeof (ext_latin) - 1),
LISP_STRING, string,
- intern ("iso-8859-2"));
+ intern ("iso-latin-2-with-esc"));
DFC_CHECK_DATA (XSTRING_DATA (string), XSTRING_LENGTH (string), int_latin2);
TO_INTERNAL_FORMAT (LISP_OPAQUE, opaque_latin,
LISP_STRING, string,
- intern ("iso-8859-2"));
+ intern ("iso-latin-2-with-esc"));
DFC_CHECK_DATA (XSTRING_DATA (string), XSTRING_LENGTH (string), int_latin2);
TO_INTERNAL_FORMAT (LISP_OPAQUE, opaque0_latin,
LISP_STRING, string,
- intern ("iso-8859-2"));
+ intern ("iso-latin-2-with-esc"));
DFC_CHECK_DATA_NUL (XSTRING_DATA (string), XSTRING_LENGTH (string), int_latin2);
TO_INTERNAL_FORMAT (LISP_OPAQUE, opaque0_latin,
LISP_BUFFER, Fcurrent_buffer(),
- intern ("iso-8859-2"));
+ intern ("iso-latin-2-with-esc"));
DFC_CHECK_DATA_NUL (BUF_BYTE_ADDRESS (current_buffer, BUF_PT (current_buffer)),
sizeof (int_latin2), int_latin2);
@@ -194,7 +196,7 @@ Test TO_EXTERNAL_FORMAT() and TO_INTERNA
TO_INTERNAL_FORMAT (DATA, (ext_latin12, sizeof (ext_latin12) - 1),
ALLOCA, (ptr, len),
- intern ("iso-8859-2"));
+ intern ("iso-latin-2-with-esc"));
DFC_CHECK_DATA (ptr, len, int_latin1);
#endif /* MULE */
diff -r 15d36164ebd7fb45f2a19c312a27171b8f9e414f -r 4d0f773d5e211688cf56f51aaeea2054f3eb016d tests/ChangeLog
--- a/tests/ChangeLog Sun Dec 09 14:55:03 2007 +0100
+++ b/tests/ChangeLog Sun Dec 09 15:10:46 2007 +0100
@@ -1,3 +1,15 @@ 2007-12-04 Aidan Kehoe <kehoea@parhasa
+2007-12-06 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * automated/mule-tests.el:
+ Add a Known-Bug-Expect-Error call testing and documenting that we
+ don't support all of the Unicode code space in a single session.
+ * automated/test-harness.el (Known-Bug-Expect-Error):
+ Provide Known-Bug-Expect-Error, analagous to
+ Known-Bug-Expect-Failure and Check-Error.
+ * automated/test-harness.el (Silence-Message):
+ Dynamically bind the function definition of #'clear-message, as
+ well as that of #'append-message, to nil.
+
2007-12-04 Aidan Kehoe <kehoea(a)parhasard.net>
* automated/mule-tests.el (featurep):
diff -r 15d36164ebd7fb45f2a19c312a27171b8f9e414f -r 4d0f773d5e211688cf56f51aaeea2054f3eb016d tests/automated/mule-tests.el
--- a/tests/automated/mule-tests.el Sun Dec 09 14:55:03 2007 +0100
+++ b/tests/automated/mule-tests.el Sun Dec 09 15:10:46 2007 +0100
@@ -721,4 +721,17 @@ This is a naive implementation in Lisp.
(Known-Bug-Expect-Failure
(Assert-elc-is-escape-quoted))
(delete-region (point-min) (point-max))))
+
+ (Known-Bug-Expect-Error
+ invalid-constant
+ (loop
+ for i from #x0 to #x10FFFF
+ with exceptions = #s(range-table type start-closed-end-closed
+ data ((#xFFFE #xFFFF) t
+ (#xFDD0 #xFDEF) t
+ (#xD800 #xDBFF) t
+ (#xDC00 #xDFFF) t))
+ do (unless (get-range-table i exceptions)
+ (read (format (if (> i #xFFFF) #r"?\U%08X" #r"?\u%04X") i)))
+ finally return t))
)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Eliminate lost docstring warnings on 21.5.
17 years, 3 months
Aidan Kehoe
changeset: 4317:15d36164ebd7fb45f2a19c312a27171b8f9e414f
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sun Dec 09 14:55:03 2007 +0100
files: lisp/ChangeLog lisp/obsolete.el lisp/unicode.el
description:
Eliminate lost docstring warnings on 21.5.
2007-12-09 Aidan Kehoe <kehoea(a)parhasard.net>
* unicode.el (load-unicode-mapping-tables):
Call #'set-default-unicode-precedence wrapped with
#'declare-fboundp, to avoid warnings on non-Mule builds.
* unicode.el (ccl-encode-to-ucs-2):
* unicode.el (unicode-error-sequence-regexp-range):
* unicode.el (frob-unicode-errors-region):
* unicode.el (unicode-error-translate-region):
Unconditionally provide these functions and variables at top
level in the code, to make them available to make-docfile. For the
INITVALUE args to #'defvar, conditionalise on (featurep 'mule);
ditto for the code that tests the lookup tables and provides the
WGL4 characters as jit-ucs-charset-0 characters.
Unintern the function and variable symbols if (featurep 'mule) is
not true, so their function definitions and so on get garbage
collected at dump time in non-Mule builds.
* obsolete.el (add-menu-item):
* obsolete.el (add-menu):
* obsolete.el (add-menu):
* obsolete.el (package-get-download-menu):
Provide these functions at top level, in order to make them
available to make-docfile.c, which has trouble interpreting byte
code. Unintern their symbols if the menubar feature is not
available, which means they will be garbage collected on
non-menubar builds.
diff -r 2e528ccfe69025a1139be3d9c31c6560dd78aac6 -r 15d36164ebd7fb45f2a19c312a27171b8f9e414f lisp/ChangeLog
--- a/lisp/ChangeLog Sun Dec 09 14:04:13 2007 +0100
+++ b/lisp/ChangeLog Sun Dec 09 14:55:03 2007 +0100
@@ -1,3 +1,33 @@ 2007-12-09 Aidan Kehoe <kehoea@parhasa
+2007-12-09 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * unicode.el (load-unicode-mapping-tables):
+ Call #'set-default-unicode-precedence wrapped with
+ #'declare-fboundp, to avoid warnings on non-Mule builds.
+
+ * unicode.el (ccl-encode-to-ucs-2):
+ * unicode.el (unicode-error-sequence-regexp-range):
+ * unicode.el (frob-unicode-errors-region):
+ * unicode.el (unicode-error-translate-region):
+ Unconditionally provide these functions and variables at top
+ level in the code, to make them available to make-docfile. For the
+ INITVALUE args to #'defvar, conditionalise on (featurep 'mule);
+ ditto for the code that tests the lookup tables and provides the
+ WGL4 characters as jit-ucs-charset-0 characters.
+
+ Unintern the function and variable symbols if (featurep 'mule) is
+ not true, so their function definitions and so on get garbage
+ collected at dump time in non-Mule builds.
+
+ * obsolete.el (add-menu-item):
+ * obsolete.el (add-menu):
+ * obsolete.el (add-menu):
+ * obsolete.el (package-get-download-menu):
+ Provide these functions at top level, in order to make them
+ available to make-docfile.c, which has trouble interpreting byte
+ code. Unintern their symbols if the menubar feature is not
+ available, which means they will be garbage collected on
+ non-menubar builds.
+
2007-12-09 Aidan Kehoe <kehoea(a)parhasard.net>
* mule/latin.el:
diff -r 2e528ccfe69025a1139be3d9c31c6560dd78aac6 -r 15d36164ebd7fb45f2a19c312a27171b8f9e414f lisp/obsolete.el
--- a/lisp/obsolete.el Sun Dec 09 14:04:13 2007 +0100
+++ b/lisp/obsolete.el Sun Dec 09 14:55:03 2007 +0100
@@ -222,23 +222,28 @@ set Info-directory-list.")
;;;;;;;;;;;;;;;;;;;;;;;;;;;; menu stuff
-(when (featurep 'menubar)
- (defun add-menu-item (menu-path item-name function enabled-p &optional before)
- "Obsolete. See the function `add-menu-button'."
- (or item-name (error "must specify an item name"))
- (add-menu-button menu-path (vector item-name function enabled-p) before))
- (make-obsolete 'add-menu-item 'add-menu-button)
-
- (defun add-menu (menu-path menu-name menu-items &optional before)
- "See the function `add-submenu'."
- (or menu-name (error "must specify a menu name"))
- (or menu-items (error "must specify some menu items"))
- (add-submenu menu-path (cons menu-name menu-items) before))
- ;; Can't make this obsolete. easymenu depends on it.
- (make-compatible 'add-menu 'add-submenu)
-
- (define-obsolete-function-alias 'package-get-download-menu
- 'package-ui-download-menu))
+(defun add-menu-item (menu-path item-name function enabled-p &optional before)
+ "Obsolete. See the function `add-menu-button'."
+ (or item-name (error "must specify an item name"))
+ (declare-fboundp (add-menu-button menu-path (vector item-name function enabled-p) before)))
+(make-obsolete 'add-menu-item 'add-menu-button)
+
+(defun add-menu (menu-path menu-name menu-items &optional before)
+ "See the function `add-submenu'."
+ (or menu-name (error "must specify a menu name"))
+ (or menu-items (error "must specify some menu items"))
+ (declare-fboundp (add-submenu menu-path (cons menu-name menu-items) before)))
+;; Can't make this obsolete. easymenu depends on it.
+(make-compatible 'add-menu 'add-submenu)
+
+(define-obsolete-function-alias 'package-get-download-menu
+ 'package-ui-download-menu)
+
+(unless (featurep 'menubar)
+ ;; Don't provide the last three functions unless the menubar feature is
+ ;; available. This approach (with #'unintern) avoids warnings about lost
+ ;; docstrings since make-docfile doesn't parse bytecode.
+ (mapcar #'unintern '(add-menu-item add-menu package-get-download-menu)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;; minibuffer
diff -r 2e528ccfe69025a1139be3d9c31c6560dd78aac6 -r 15d36164ebd7fb45f2a19c312a27171b8f9e414f lisp/unicode.el
--- a/lisp/unicode.el Sun Dec 09 14:04:13 2007 +0100
+++ b/lisp/unicode.el Sun Dec 09 14:55:03 2007 +0100
@@ -149,20 +149,21 @@ Setting this at run-time does nothing.")
;; *not* mapping various European characters to East Asian characters;
;; otherwise the default-unicode-precedence-list is numerically ordered
;; by charset ID.
- (set-default-unicode-precedence-list
- '(ascii control-1 latin-iso8859-1 latin-iso8859-2 latin-iso8859-15
- greek-iso8859-7 hebrew-iso8859-8 ipa cyrillic-iso8859-5
- latin-iso8859-16 latin-iso8859-3 latin-iso8859-4 latin-iso8859-9
- vietnamese-viscii-lower vietnamese-viscii-upper arabic-iso8859-6
- jit-ucs-charset-0 japanese-jisx0208 japanese-jisx0208-1978
- japanese-jisx0212 japanese-jisx0213-1 japanese-jisx0213-2
- chinese-gb2312 chinese-sisheng chinese-big5-1 chinese-big5-2
- indian-is13194 korean-ksc5601 chinese-cns11643-1 chinese-cns11643-2
- chinese-isoir165 arabic-1-column arabic-2-column arabic-digit
- composite ethiopic indian-1-column indian-2-column jit-ucs-charset-0
- katakana-jisx0201 lao thai-tis620 thai-xtis tibetan tibetan-1-column
- latin-jisx0201 chinese-cns11643-3 chinese-cns11643-4
- chinese-cns11643-5 chinese-cns11643-6 chinese-cns11643-7))))
+ (declare-fboundp
+ (set-default-unicode-precedence-list
+ '(ascii control-1 latin-iso8859-1 latin-iso8859-2 latin-iso8859-15
+ greek-iso8859-7 hebrew-iso8859-8 ipa cyrillic-iso8859-5
+ latin-iso8859-16 latin-iso8859-3 latin-iso8859-4 latin-iso8859-9
+ vietnamese-viscii-lower vietnamese-viscii-upper arabic-iso8859-6
+ jit-ucs-charset-0 japanese-jisx0208 japanese-jisx0208-1978
+ japanese-jisx0212 japanese-jisx0213-1 japanese-jisx0213-2
+ chinese-gb2312 chinese-sisheng chinese-big5-1 chinese-big5-2
+ indian-is13194 korean-ksc5601 chinese-cns11643-1 chinese-cns11643-2
+ chinese-isoir165 arabic-1-column arabic-2-column arabic-digit
+ composite ethiopic indian-1-column indian-2-column jit-ucs-charset-0
+ katakana-jisx0201 lao thai-tis620 thai-xtis tibetan tibetan-1-column
+ latin-jisx0201 chinese-cns11643-3 chinese-cns11643-4
+ chinese-cns11643-5 chinese-cns11643-6 chinese-cns11643-7)))))
(make-coding-system
'utf-16 'unicode
@@ -327,172 +328,174 @@ The second argument must be 'ucs, the th
"Sorry, encode-char doesn't yet support anything but the UCS. ")
(char-to-unicode char))
+(defconst ccl-encode-to-ucs-2
+ (eval-when-compile
+ (let ((pre-existing
+ ;; This is the compiled CCL program from the assert
+ ;; below. Since this file is dumped and ccl.el isn't (and
+ ;; even when it was, it was dumped much later than this
+ ;; one), we can't compile the program at dump time. We can
+ ;; check at byte compile time that the program is as
+ ;; expected, though.
+ [1 16 131127 7 98872 65823 1307 5 -65536 65313 64833 1028
+ 147513 8 82009 255 22]))
+ (when (featurep 'mule)
+ ;; Check that the pre-existing constant reflects the intended
+ ;; CCL program.
+ (assert
+ (equal pre-existing
+ (ccl-compile
+ `(1
+ ( ;; mule-to-unicode's first argument is the
+ ;; charset ID, the second its first byte
+ ;; left shifted by 7 bits masked with its
+ ;; second byte.
+ (r1 = (r1 << 7))
+ (r1 = (r1 | r2))
+ (mule-to-unicode r0 r1)
+ (if (r0 & ,(lognot #xFFFF))
+ ;; Redisplay looks in r1 and r2 for the first
+ ;; and second bytes of the X11 font,
+ ;; respectively. For non-BMP characters we
+ ;; display U+FFFD.
+ ((r1 = #xFF)
+ (r2 = #xFD))
+ ((r1 = (r0 >> 8))
+ (r2 = (r0 & #xFF))))))))
+ nil
+ "The pre-compiled CCL program appears broken. "))
+ pre-existing))
+ "CCL program to transform Mule characters to UCS-2.")
+
(when (featurep 'mule)
- (let ((prog
- (eval-when-compile
- (let ((pre-existing
- ;; This is the compiled CCL program from the assert
- ;; below. Since this file is dumped and ccl.el isn't (and
- ;; even when it was, it was dumped much later than this
- ;; one), we can't compile the program at dump time. We can
- ;; check at byte compile time that the program is as
- ;; expected, though.
- [1 16 131127 7 98872 65823 1307 5 -65536 65313 64833 1028
- 147513 8 82009 255 22]))
- (when (featurep 'mule)
- ;; Check that the pre-existing constant reflects the intended
- ;; CCL program.
- (assert
- (equal pre-existing
- (ccl-compile
- `(1
- (;; mule-to-unicode's first argument is the
- ;; charset ID, the second its first byte
- ;; left shifted by 7 bits masked with its
- ;; second byte.
- (r1 = (r1 << 7))
- (r1 = (r1 | r2))
- (mule-to-unicode r0 r1)
- (if (r0 & ,(lognot #xFFFF))
- ;; Redisplay looks in r1 and r2 for the first
- ;; and second bytes of the X11 font,
- ;; respectively. For non-BMP characters we
- ;; display U+FFFD.
- ((r1 = #xFF)
- (r2 = #xFD))
- ((r1 = (r0 >> 8))
- (r2 = (r0 & #xFF))))))))
- nil
- "The pre-compiled CCL program appears broken. "))
- pre-existing))))
- (defconst ccl-encode-to-ucs-2 prog
- "CCL program to transform Mule characters to UCS-2.")
- (put 'ccl-encode-to-ucs-2 'ccl-program-idx
- (register-ccl-program 'ccl-encode-to-ucs-2 prog)))
-
- ;; Now, create jit-ucs-charset-0 entries for those characters in Windows
- ;; Glyph List 4 that would otherwise end up in East Asian character sets.
- ;;
- ;; WGL4 is a character repertoire from Microsoft that gives a guideline
- ;; for font implementors as to what characters are sufficient for
- ;; pan-European support. The intention of this code is to avoid the
- ;; situation where these characters end up mapping to East Asian XEmacs
- ;; characters, which generally clash strongly with European characters
- ;; both in font choice and character width; jit-ucs-charset-0 is a
- ;; single-width character set which comes before the East Asian character
- ;; sets in the default-unicode-precedence-list above.
- (loop for (ucs ascii-or-latin-1)
- in '((#x2013 ?-) ;; U+2013 EN DASH
- (#x2014 ?-) ;; U+2014 EM DASH
- (#x2105 ?%) ;; U+2105 CARE OF
- (#x203e ?-) ;; U+203E OVERLINE
- (#x221f ?|) ;; U+221F RIGHT ANGLE
- (#x2584 ?|) ;; U+2584 LOWER HALF BLOCK
- (#x2588 ?|) ;; U+2588 FULL BLOCK
- (#x258c ?|) ;; U+258C LEFT HALF BLOCK
- (#x2550 ?|) ;; U+2550 BOX DRAWINGS DOUBLE HORIZONTAL
- (#x255e ?|) ;; U+255E BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE
- (#x256a ?|) ;; U+256A BOX DRAWINGS VERTICAL SINGLE & HORIZONTAL DOUBLE
- (#x2561 ?|) ;; U+2561 BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE
- (#x2215 ?/) ;; U+2215 DIVISION SLASH
- (#x02c9 ?`) ;; U+02C9 MODIFIER LETTER MACRON
- (#x2211 ?s) ;; U+2211 N-ARY SUMMATION
- (#x220f ?s) ;; U+220F N-ARY PRODUCT
- (#x2248 ?=) ;; U+2248 ALMOST EQUAL TO
- (#x2264 ?=) ;; U+2264 LESS-THAN OR EQUAL TO
- (#x2265 ?=) ;; U+2265 GREATER-THAN OR EQUAL TO
- (#x201c ?') ;; U+201C LEFT DOUBLE QUOTATION MARK
- (#x2026 ?.) ;; U+2026 HORIZONTAL ELLIPSIS
- (#x2212 ?-) ;; U+2212 MINUS SIGN
- (#x2260 ?=) ;; U+2260 NOT EQUAL TO
- (#x221e ?=) ;; U+221E INFINITY
- (#x2642 ?=) ;; U+2642 MALE SIGN
- (#x2640 ?=) ;; U+2640 FEMALE SIGN
- (#x2032 ?=) ;; U+2032 PRIME
- (#x2033 ?=) ;; U+2033 DOUBLE PRIME
- (#x25cb ?=) ;; U+25CB WHITE CIRCLE
- (#x25cf ?=) ;; U+25CF BLACK CIRCLE
- (#x25a1 ?=) ;; U+25A1 WHITE SQUARE
- (#x25a0 ?=) ;; U+25A0 BLACK SQUARE
- (#x25b2 ?=) ;; U+25B2 BLACK UP-POINTING TRIANGLE
- (#x25bc ?=) ;; U+25BC BLACK DOWN-POINTING TRIANGLE
- (#x2192 ?=) ;; U+2192 RIGHTWARDS ARROW
- (#x2190 ?=) ;; U+2190 LEFTWARDS ARROW
- (#x2191 ?=) ;; U+2191 UPWARDS ARROW
- (#x2193 ?=) ;; U+2193 DOWNWARDS ARROW
- (#x2229 ?=) ;; U+2229 INTERSECTION
- (#x2202 ?=) ;; U+2202 PARTIAL DIFFERENTIAL
- (#x2261 ?=) ;; U+2261 IDENTICAL TO
- (#x221a ?=) ;; U+221A SQUARE ROOT
- (#x222b ?=) ;; U+222B INTEGRAL
- (#x2030 ?=) ;; U+2030 PER MILLE SIGN
- (#x266a ?=) ;; U+266A EIGHTH NOTE
- (#x2020 ?*) ;; U+2020 DAGGER
- (#x2021 ?*) ;; U+2021 DOUBLE DAGGER
- (#x2500 ?|) ;; U+2500 BOX DRAWINGS LIGHT HORIZONTAL
- (#x2502 ?|) ;; U+2502 BOX DRAWINGS LIGHT VERTICAL
- (#x250c ?|) ;; U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT
- (#x2510 ?|) ;; U+2510 BOX DRAWINGS LIGHT DOWN AND LEFT
- (#x2518 ?|) ;; U+2518 BOX DRAWINGS LIGHT UP AND LEFT
- (#x2514 ?|) ;; U+2514 BOX DRAWINGS LIGHT UP AND RIGHT
- (#x251c ?|) ;; U+251C BOX DRAWINGS LIGHT VERTICAL AND RIGHT
- (#x252c ?|) ;; U+252C BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
- (#x2524 ?|) ;; U+2524 BOX DRAWINGS LIGHT VERTICAL AND LEFT
- (#x2534 ?|) ;; U+2534 BOX DRAWINGS LIGHT UP AND HORIZONTAL
- (#x253c ?|) ;; U+253C BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
- (#x02da ?^) ;; U+02DA RING ABOVE
- (#x2122 ?\xa9) ;; U+2122 TRADE MARK SIGN, ?,A)(B
-
- (#x0132 ?\xe6) ;; U+0132 LATIN CAPITAL LIGATURE IJ, ?,Af(B
- (#x013f ?\xe6) ;; U+013F LATIN CAPITAL LETTER L WITH MIDDLE DOT, ?,Af(B
-
- (#x0133 ?\xe6) ;; U+0133 LATIN SMALL LIGATURE IJ, ?,Af(B
- (#x0140 ?\xe6) ;; U+0140 LATIN SMALL LETTER L WITH MIDDLE DOT, ?,Af(B
- (#x0149 ?\xe6) ;; U+0149 LATIN SMALL LETTER N PRECEDED BY APOSTROPH,?,Af(B
-
- (#x2194 ?|) ;; U+2194 LEFT RIGHT ARROW
- (#x2660 ?*) ;; U+2660 BLACK SPADE SUIT
- (#x2665 ?*) ;; U+2665 BLACK HEART SUIT
- (#x2663 ?*) ;; U+2663 BLACK CLUB SUIT
- (#x2592 ?|) ;; U+2592 MEDIUM SHADE
- (#x2195 ?|) ;; U+2195 UP DOWN ARROW
-
- (#x2113 ?\xb9) ;; U+2113 SCRIPT SMALL L, ?,A9(B
- (#x215b ?\xbe) ;; U+215B VULGAR FRACTION ONE EIGHTH, ?,A>(B
- (#x215c ?\xbe) ;; U+215C VULGAR FRACTION THREE EIGHTHS, ?,A>(B
- (#x215d ?\xbe) ;; U+215D VULGAR FRACTION FIVE EIGHTHS, ?,A>(B
- (#x215e ?\xbe) ;; U+215E VULGAR FRACTION SEVEN EIGHTHS, ?,A>(B
- (#x207f ?\xbe) ;; U+207F SUPERSCRIPT LATIN SMALL LETTER N, ?,A>(B
+ (put 'ccl-encode-to-ucs-2 'ccl-program-idx
+ (declare-fboundp
+ (register-ccl-program 'ccl-encode-to-ucs-2 ccl-encode-to-ucs-2))))
+
+;; Now, create jit-ucs-charset-0 entries for those characters in Windows
+;; Glyph List 4 that would otherwise end up in East Asian character sets.
+;;
+;; WGL4 is a character repertoire from Microsoft that gives a guideline
+;; for font implementors as to what characters are sufficient for
+;; pan-European support. The intention of this code is to avoid the
+;; situation where these characters end up mapping to East Asian XEmacs
+;; characters, which generally clash strongly with European characters
+;; both in font choice and character width; jit-ucs-charset-0 is a
+;; single-width character set which comes before the East Asian character
+;; sets in the default-unicode-precedence-list above.
+(loop for (ucs ascii-or-latin-1)
+ in '((#x2013 ?-) ;; U+2013 EN DASH
+ (#x2014 ?-) ;; U+2014 EM DASH
+ (#x2105 ?%) ;; U+2105 CARE OF
+ (#x203e ?-) ;; U+203E OVERLINE
+ (#x221f ?|) ;; U+221F RIGHT ANGLE
+ (#x2584 ?|) ;; U+2584 LOWER HALF BLOCK
+ (#x2588 ?|) ;; U+2588 FULL BLOCK
+ (#x258c ?|) ;; U+258C LEFT HALF BLOCK
+ (#x2550 ?|) ;; U+2550 BOX DRAWINGS DOUBLE HORIZONTAL
+ (#x255e ?|) ;; U+255E BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE
+ (#x256a ?|) ;; U+256A BOX DRAWINGS VERTICAL SINGLE & HORIZONTAL DOUBLE
+ (#x2561 ?|) ;; U+2561 BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE
+ (#x2215 ?/) ;; U+2215 DIVISION SLASH
+ (#x02c9 ?`) ;; U+02C9 MODIFIER LETTER MACRON
+ (#x2211 ?s) ;; U+2211 N-ARY SUMMATION
+ (#x220f ?s) ;; U+220F N-ARY PRODUCT
+ (#x2248 ?=) ;; U+2248 ALMOST EQUAL TO
+ (#x2264 ?=) ;; U+2264 LESS-THAN OR EQUAL TO
+ (#x2265 ?=) ;; U+2265 GREATER-THAN OR EQUAL TO
+ (#x201c ?') ;; U+201C LEFT DOUBLE QUOTATION MARK
+ (#x2026 ?.) ;; U+2026 HORIZONTAL ELLIPSIS
+ (#x2212 ?-) ;; U+2212 MINUS SIGN
+ (#x2260 ?=) ;; U+2260 NOT EQUAL TO
+ (#x221e ?=) ;; U+221E INFINITY
+ (#x2642 ?=) ;; U+2642 MALE SIGN
+ (#x2640 ?=) ;; U+2640 FEMALE SIGN
+ (#x2032 ?=) ;; U+2032 PRIME
+ (#x2033 ?=) ;; U+2033 DOUBLE PRIME
+ (#x25cb ?=) ;; U+25CB WHITE CIRCLE
+ (#x25cf ?=) ;; U+25CF BLACK CIRCLE
+ (#x25a1 ?=) ;; U+25A1 WHITE SQUARE
+ (#x25a0 ?=) ;; U+25A0 BLACK SQUARE
+ (#x25b2 ?=) ;; U+25B2 BLACK UP-POINTING TRIANGLE
+ (#x25bc ?=) ;; U+25BC BLACK DOWN-POINTING TRIANGLE
+ (#x2192 ?=) ;; U+2192 RIGHTWARDS ARROW
+ (#x2190 ?=) ;; U+2190 LEFTWARDS ARROW
+ (#x2191 ?=) ;; U+2191 UPWARDS ARROW
+ (#x2193 ?=) ;; U+2193 DOWNWARDS ARROW
+ (#x2229 ?=) ;; U+2229 INTERSECTION
+ (#x2202 ?=) ;; U+2202 PARTIAL DIFFERENTIAL
+ (#x2261 ?=) ;; U+2261 IDENTICAL TO
+ (#x221a ?=) ;; U+221A SQUARE ROOT
+ (#x222b ?=) ;; U+222B INTEGRAL
+ (#x2030 ?=) ;; U+2030 PER MILLE SIGN
+ (#x266a ?=) ;; U+266A EIGHTH NOTE
+ (#x2020 ?*) ;; U+2020 DAGGER
+ (#x2021 ?*) ;; U+2021 DOUBLE DAGGER
+ (#x2500 ?|) ;; U+2500 BOX DRAWINGS LIGHT HORIZONTAL
+ (#x2502 ?|) ;; U+2502 BOX DRAWINGS LIGHT VERTICAL
+ (#x250c ?|) ;; U+250C BOX DRAWINGS LIGHT DOWN AND RIGHT
+ (#x2510 ?|) ;; U+2510 BOX DRAWINGS LIGHT DOWN AND LEFT
+ (#x2518 ?|) ;; U+2518 BOX DRAWINGS LIGHT UP AND LEFT
+ (#x2514 ?|) ;; U+2514 BOX DRAWINGS LIGHT UP AND RIGHT
+ (#x251c ?|) ;; U+251C BOX DRAWINGS LIGHT VERTICAL AND RIGHT
+ (#x252c ?|) ;; U+252C BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
+ (#x2524 ?|) ;; U+2524 BOX DRAWINGS LIGHT VERTICAL AND LEFT
+ (#x2534 ?|) ;; U+2534 BOX DRAWINGS LIGHT UP AND HORIZONTAL
+ (#x253c ?|) ;; U+253C BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
+ (#x02da ?^) ;; U+02DA RING ABOVE
+ (#x2122 ?\xa9) ;; U+2122 TRADE MARK SIGN, ?,A)(B
+
+ (#x0132 ?\xe6) ;; U+0132 LATIN CAPITAL LIGATURE IJ, ?,Af(B
+ (#x013f ?\xe6) ;; U+013F LATIN CAPITAL LETTER L WITH MIDDLE DOT, ?,Af(B
+
+ (#x0133 ?\xe6) ;; U+0133 LATIN SMALL LIGATURE IJ, ?,Af(B
+ (#x0140 ?\xe6) ;; U+0140 LATIN SMALL LETTER L WITH MIDDLE DOT, ?,Af(B
+ (#x0149 ?\xe6) ;; U+0149 LATIN SMALL LETTER N PRECEDED BY APOSTROPH,?,Af(B
+
+ (#x2194 ?|) ;; U+2194 LEFT RIGHT ARROW
+ (#x2660 ?*) ;; U+2660 BLACK SPADE SUIT
+ (#x2665 ?*) ;; U+2665 BLACK HEART SUIT
+ (#x2663 ?*) ;; U+2663 BLACK CLUB SUIT
+ (#x2592 ?|) ;; U+2592 MEDIUM SHADE
+ (#x2195 ?|) ;; U+2195 UP DOWN ARROW
+
+ (#x2113 ?\xb9) ;; U+2113 SCRIPT SMALL L, ?,A9(B
+ (#x215b ?\xbe) ;; U+215B VULGAR FRACTION ONE EIGHTH, ?,A>(B
+ (#x215c ?\xbe) ;; U+215C VULGAR FRACTION THREE EIGHTHS, ?,A>(B
+ (#x215d ?\xbe) ;; U+215D VULGAR FRACTION FIVE EIGHTHS, ?,A>(B
+ (#x215e ?\xbe) ;; U+215E VULGAR FRACTION SEVEN EIGHTHS, ?,A>(B
+ (#x207f ?\xbe) ;; U+207F SUPERSCRIPT LATIN SMALL LETTER N, ?,A>(B
- ;; These are not in WGL 4, but are IPA characters that should not
- ;; be double width. They are the only IPA characters that both
- ;; occur in packages/mule-packages/leim/ipa.el and end up in East
- ;; Asian character sets when that file is loaded in an XEmacs
- ;; without packages.
- (#x2197 ?|) ;; U+2197 NORTH EAST ARROW
- (#x2199 ?|) ;; U+2199 SOUTH WEST ARROW
- (#x2191 ?|) ;; U+2191 UPWARDS ARROW
- (#x207f ?\xb9));; U+207F SUPERSCRIPT LATIN SMALL LETTER N, ?,A9(B
- with decoded = nil
- with syntax-table = (standard-syntax-table)
- ;; This creates jit-ucs-charset-0 entries because:
- ;;
- ;; 1. If the tables are dumped, it is run at dump time before they are
- ;; dumped, and as such before the relevant conversions are available
- ;; (they are made available in mule/general-late.el).
- ;;
- ;; 2. If the tables are not dumped, it is run at dump time, long before
- ;; any of the other mappings are available.
- ;;
- do
- (setq decoded (decode-char 'ucs ucs))
- (assert (eq (char-charset decoded)
- 'jit-ucs-charset-0) nil
- "Unexpected Unicode decoding behavior. ")
- (modify-syntax-entry decoded
- (string
- (char-syntax ascii-or-latin-1))
- syntax-table))
+ ;; These are not in WGL 4, but are IPA characters that should not
+ ;; be double width. They are the only IPA characters that both
+ ;; occur in packages/mule-packages/leim/ipa.el and end up in East
+ ;; Asian character sets when that file is loaded in an XEmacs
+ ;; without packages.
+ (#x2197 ?|) ;; U+2197 NORTH EAST ARROW
+ (#x2199 ?|) ;; U+2199 SOUTH WEST ARROW
+ (#x2191 ?|) ;; U+2191 UPWARDS ARROW
+ (#x207f ?\xb9)) ;; U+207F SUPERSCRIPT LATIN SMALL LETTER N, ?,A9(B
+ with decoded = nil
+ with syntax-table = (standard-syntax-table)
+ initially (unless (featurep 'mule) (return))
+ ;; This creates jit-ucs-charset-0 entries because:
+ ;;
+ ;; 1. If the tables are dumped, it is run at dump time before they are
+ ;; dumped, and as such before the relevant conversions are available
+ ;; (they are made available in mule/general-late.el).
+ ;;
+ ;; 2. If the tables are not dumped, it is run at dump time, long before
+ ;; any of the other mappings are available.
+ ;;
+ do
+ (setq decoded (decode-char 'ucs ucs))
+ (assert (eq (declare-fboundp (char-charset decoded))
+ 'jit-ucs-charset-0) nil
+ "Unexpected Unicode decoding behavior. ")
+ (modify-syntax-entry decoded
+ (string
+ (char-syntax ascii-or-latin-1))
+ syntax-table))
;; *Sigh*, declarations needs to be at the start of the line to be picked up
;; by make-docfile. Not so much an issue with ccl-encode-to-ucs-2, which we
@@ -505,6 +508,7 @@ The second argument must be 'ucs, the th
(loop
with char-table = (make-char-table 'char)
for i from ?\x00 to ?\xFF
+ initially (unless (featurep 'mule) (return))
do
(put-char-table (aref
;; #xd800 is the first leading surrogate;
@@ -523,10 +527,11 @@ correspond to the octets on disk, you ca
correspond to the octets on disk, you can use this variable. ")
(defvar unicode-error-sequence-regexp-range
- (format "%c%c-%c"
- (aref (decode-coding-string "\xd8\x00\x00\x00" 'utf-16-be) 0)
- (aref (decode-coding-string "\xd8\x00\x00\x00" 'utf-16-be) 3)
- (aref (decode-coding-string "\xd8\x00\x00\xFF" 'utf-16-be) 3))
+ (and (featurep 'mule)
+ (format "%c%c-%c"
+ (aref (decode-coding-string "\xd8\x00\x00\x00" 'utf-16-be) 0)
+ (aref (decode-coding-string "\xd8\x00\x00\x00" 'utf-16-be) 3)
+ (aref (decode-coding-string "\xd8\x00\x00\xFF" 'utf-16-be) 3)))
"Regular expression range to match Unicode error sequences in XEmacs.
Invalid Unicode sequences on input are represented as XEmacs
@@ -536,32 +541,33 @@ invalid octet. You can use this variabl
`skip-chars-forward') to search for such characters; see also
`unicode-error-translate-region'. ")
- ;; Check that the lookup table is correct, and that all the actual error
- ;; sequences are caught by the regexp.
- (with-temp-buffer
- (loop
- for i from ?\x00 to ?\xFF
- with to-check = (make-string 20 ?\x20)
- do
- (delete-region (point-min) (point-max))
- (insert to-check)
- (goto-char 10)
- (insert (decode-coding-string (format "\xd8\x00\x00%c" i)
- 'utf-16-be))
- (backward-char)
- (assert (= i (get-char-table (char-after (point))
- unicode-error-default-translation-table))
- (format "Char ?\\x%x not the expected error sequence!"
- i))
-
- (goto-char (point-min))
- ;; Comment out until the issue in
- ;; 18179.49815.622843.336527(a)parhasard.net is fixed.
- (assert t ;(re-search-forward (concat "["
- ; unicode-error-sequence-regexp-range
- ; "]"))
- nil
- (format "Could not find char ?\\x%x in buffer" i))))
+;; Check that the lookup table is correct, and that all the actual error
+;; sequences are caught by the regexp.
+(with-temp-buffer
+ (loop
+ for i from ?\x00 to ?\xFF
+ with to-check = (make-string 20 ?\x20)
+ initially (unless (featurep 'mule) (return))
+ do
+ (delete-region (point-min) (point-max))
+ (insert to-check)
+ (goto-char 10)
+ (insert (decode-coding-string (format "\xd8\x00\x00%c" i)
+ 'utf-16-be))
+ (backward-char)
+ (assert (= i (get-char-table (char-after (point))
+ unicode-error-default-translation-table))
+ (format "Char ?\\x%x not the expected error sequence!"
+ i))
+
+ (goto-char (point-min))
+ ;; Comment out until the issue in
+ ;; 18179.49815.622843.336527(a)parhasard.net is fixed.
+ (assert t ; (re-search-forward (concat "["
+ ; unicode-error-sequence-regexp-range
+ ; "]"))
+ nil
+ (format "Could not find char ?\\x%x in buffer" i))))
(defun frob-unicode-errors-region (frob-function begin end &optional buffer)
"Call FROB-FUNCTION on the Unicode error sequences between BEGIN and END.
@@ -590,8 +596,8 @@ such sequences. "
(if end
(funcall frob-function begin end))))))
- (defun unicode-error-translate-region (begin end &optional buffer table)
- "Translate the Unicode error sequences in BUFFER between BEGIN and END.
+(defun unicode-error-translate-region (begin end &optional buffer table)
+ "Translate the Unicode error sequences in BUFFER between BEGIN and END.
The error sequences are transformed, by default, into the ASCII,
control-1 and latin-iso8859-1 characters with the numeric values
@@ -603,7 +609,18 @@ mapping from the error sequences to the
(frob-unicode-errors-region
(lambda (start finish)
(translate-region start finish table))
- begin end buffer)))
+ begin end buffer))
+
+(unless (featurep 'mule)
+ ;; We do this in such a roundabout way--instead of having the above defun
+ ;; and defvar calls inside a (when (featurep 'mule) ...) form--to have
+ ;; make-docfile.c pick up symbol and function documentation correctly. An
+ ;; alternative approach would be to fix make-docfile.c to be able to read
+ ;; Lisp.
+ (mapcar #'unintern
+ '(ccl-encode-to-ucs-2 unicode-error-default-translation-table
+ unicode-error-sequence-regexp-range
+ frob-unicode-errors-region unicode-error-translate-region)))
;; #### UTF-7 is not yet implemented, and it's tricky to do. There's
;; an implementation in appendix A.1 of the Unicode Standard, Version
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Create "UTF-8" and "WINDOWS-1252" language environments.
17 years, 3 months
Aidan Kehoe
changeset: 4316:2e528ccfe69025a1139be3d9c31c6560dd78aac6
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sun Dec 09 14:04:13 2007 +0100
files: lisp/ChangeLog lisp/mule/latin.el
description:
Create "UTF-8" and "WINDOWS-1252" language environments.
2007-12-09 Aidan Kehoe <kehoea(a)parhasard.net>
* mule/latin.el:
Create clones of the English language environment with UTF-8 and
Windows-1252 as the associated coding system, for Joachim Schrod's
use case of f8q022$3o3$1(a)sea.gmane.org.
diff -r 26ec8d0f3a9c94369ce38325ef9ee3dd844a9827 -r 2e528ccfe69025a1139be3d9c31c6560dd78aac6 lisp/ChangeLog
--- a/lisp/ChangeLog Sat Dec 08 13:18:49 2007 +0100
+++ b/lisp/ChangeLog Sun Dec 09 14:04:13 2007 +0100
@@ -1,3 +1,10 @@ 2007-12-04 Aidan Kehoe <kehoea@parhasa
+2007-12-09 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * mule/latin.el:
+ Create clones of the English language environment with UTF-8 and
+ Windows-1252 as the associated coding system, for Joachim Schrod's
+ use case of f8q022$3o3$1(a)sea.gmane.org.
+
2007-12-04 Aidan Kehoe <kehoea(a)parhasard.net>
* keydefs.el:
diff -r 26ec8d0f3a9c94369ce38325ef9ee3dd844a9827 -r 2e528ccfe69025a1139be3d9c31c6560dd78aac6 lisp/mule/latin.el
--- a/lisp/mule/latin.el Sat Dec 08 13:18:49 2007 +0100
+++ b/lisp/mule/latin.el Sun Dec 09 14:04:13 2007 +0100
@@ -1102,4 +1102,17 @@ This language environment supports %s. "
'(mnemonic "cp1252"
aliases (cp1252)))
+;; Provide language environments that prefer specific coding systems.
+(loop
+ for coding-system in '(utf-8 windows-1252 macintosh)
+ with name = nil
+ with assocked = nil
+ do
+ (setq name (create-variant-language-environment "English" coding-system)
+ assocked (assoc name language-info-alist))
+ (setcar assocked
+ (upcase (symbol-name coding-system)))
+ (setcdr assocked
+ (remassq 'locale (cdr assocked))))
+
;;; latin.el ends here
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH 21.5] Update config.{sub,guess}
17 years, 3 months
Jerry James
PATCH 21.5
This seems like a good time to update config.sub and config.guess.
Both are still distributed as GPL version 2 or later. Both need to be
updated anyway to fix the FSF's address. Both are now available by
different means than described in our current versions; the new method
of acquiring them is described in config.guess. And this gives me a
chance to try my hand at hg diff for the first time.
diff -r 26ec8d0f3a9c ChangeLog
--- a/ChangeLog Sat Dec 08 13:18:49 2007 +0100
+++ b/ChangeLog Sat Dec 08 21:17:55 2007 -0700
@@ -1,3 +1,8 @@ 2007-08-27 Mike Sperber <mike(a)xemacs.o
+2007-12-08 Jerry James <james(a)xemacs.org>
+
+ * config.guess:
+ * config.sub: Sync with the latest upstream versions.
+
2007-08-27 Mike Sperber <mike(a)xemacs.org>
* configure.ac: Try to use pkg-config for finding Xft includes and
diff -r 26ec8d0f3a9c config.guess
--- a/config.guess Sat Dec 08 13:18:49 2007 +0100
+++ b/config.guess Sat Dec 08 21:17:55 2007 -0700
@@ -1,9 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-
-timestamp='2005-02-10'
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
+
+timestamp='2007-12-05'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -17,12 +18,14 @@ timestamp='2005-02-10'
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
+
# Originally written by Per Bothner <per(a)bothner.com>.
# Please send patches to <config-patches(a)gnu.org>. Submit a context
@@ -66,11 +69,11 @@ while test $# -gt 0 ; do
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
- echo "$timestamp" ; exit 0 ;;
+ echo "$timestamp" ; exit ;;
--version | -v )
- echo "$version" ; exit 0 ;;
+ echo "$version" ; exit ;;
--help | --h* | -h )
- echo "$usage"; exit 0 ;;
+ echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
@@ -104,7 +107,7 @@ trap "exitcode=\$?; (rm -f \$tmpfiles 2>
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp
2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1"
1 2 13 15 ;
: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null`
&& test -n "$tmp" && test -d "$tmp" ; } ||
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` &&
test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 &&
mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning:
creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ;
exit 1 ; } ;
@@ -123,7 +126,7 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ;'
+esac ; set_cc_for_build= ;'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi(a)noc.rutgers.edu 1994-08-24)
@@ -158,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
@@ -196,55 +200,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
- exit 0 ;;
- amd64:OpenBSD:*:*)
- echo x86_64-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- amiga:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- cats:OpenBSD:*:*)
- echo arm-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- hp300:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- luna88k:OpenBSD:*:*)
- echo m88k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mac68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- macppc:OpenBSD:*:*)
- echo powerpc-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvme68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvme88k:OpenBSD:*:*)
- echo m88k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvmeppc:OpenBSD:*:*)
- echo powerpc-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- sgi:OpenBSD:*:*)
- echo mips64-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- sun3:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:OpenBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
macppc:MirBSD:*:*)
- echo powerppc-unknown-mirbsd${UNAME_RELEASE}
- exit 0 ;;
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
@@ -297,40 +269,43 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e
's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
'abcdefghijklmnopqrstuvwxyz'`
- exit 0 ;;
+ exit ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
# of the specific Alpha model?
echo alpha-pc-interix
- exit 0 ;;
+ exit ;;
21064:Windows_NT:50:3)
echo alpha-dec-winnt3.5
- exit 0 ;;
+ exit ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
- exit 0;;
+ exit ;;
*:[Aa]miga[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-amigaos
- exit 0 ;;
+ exit ;;
*:[Mm]orph[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-morphos
- exit 0 ;;
+ exit ;;
*:OS/390:*:*)
echo i370-ibm-openedition
- exit 0 ;;
+ exit ;;
*:z/VM:*:*)
echo s390-ibm-zvmoe
- exit 0 ;;
+ exit ;;
*:OS400:*:*)
echo powerpc-ibm-os400
- exit 0 ;;
+ exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
- exit 0;;
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
- exit 0;;
+ exit ;;
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
# akee(a)wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
if test "`(/bin/universe) 2>/dev/null`" = att ; then
@@ -338,32 +313,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
else
echo pyramid-pyramid-bsd
fi
- exit 0 ;;
+ exit ;;
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
- exit 0 ;;
+ exit ;;
DRS?6000:unix:4.0:6*)
echo sparc-icl-nx6
- exit 0 ;;
+ exit ;;
DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
case `/usr/bin/uname -p` in
- sparc) echo sparc-icl-nx7 && exit 0 ;;
+ sparc) echo sparc-icl-nx7; exit ;;
esac ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
- i86pc:SunOS:5.*:*)
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ exit ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
Series*|S4*)
@@ -372,10 +347,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
- exit 0 ;;
+ exit ;;
sun3*:SunOS:*:*)
echo m68k-sun-sunos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
@@ -387,10 +362,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
echo sparc-sun-sunos${UNAME_RELEASE}
;;
esac
- exit 0 ;;
+ exit ;;
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
# "atarist" or "atariste" at least should have a processor
@@ -401,40 +376,40 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
echo m68k-milan-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
echo m68k-hades-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
- exit 0 ;;
+ exit ;;
RISC*:ULTRIX:*:*)
echo mips-dec-ultrix${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
echo clipper-intergraph-clix${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -458,32 +433,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
exit (-1);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c \
- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
- && exit 0
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
echo mips-mips-riscos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
- exit 0 ;;
+ exit ;;
Motorola:*:4.3:PL8-*)
echo powerpc-harris-powermax
- exit 0 ;;
+ exit ;;
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
echo powerpc-harris-powermax
- exit 0 ;;
+ exit ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
- exit 0 ;;
+ exit ;;
m88k:CX/UX:7*:*)
echo m88k-harris-cxux7
- exit 0 ;;
+ exit ;;
m88k:*:4*:R4*)
echo m88k-motorola-sysv4
- exit 0 ;;
+ exit ;;
m88k:*:3*:R3*)
echo m88k-motorola-sysv3
- exit 0 ;;
+ exit ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
@@ -499,29 +475,29 @@ EOF
else
echo i586-dg-dgux${UNAME_RELEASE}
fi
- exit 0 ;;
+ exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
- exit 0 ;;
+ exit ;;
M88*:*:R3*:*)
# Delta 88k system running SVR3
echo m88k-motorola-sysv3
- exit 0 ;;
+ exit ;;
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
echo m88k-tektronix-sysv3
- exit 0 ;;
+ exit ;;
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
echo m68k-tektronix-bsd
- exit 0 ;;
+ exit ;;
*:IRIX*:*:*)
echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
- exit 0 ;;
+ exit ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i*86:AIX:*:*)
echo i386-ibm-aix
- exit 0 ;;
+ exit ;;
ia64:AIX:*:*)
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
@@ -529,7 +505,7 @@ EOF
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit 0 ;;
+ exit ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
eval $set_cc_for_build
@@ -544,14 +520,18 @@ EOF
exit(0);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
- echo rs6000-ibm-aix3.2.5
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
else
echo rs6000-ibm-aix3.2
fi
- exit 0 ;;
+ exit ;;
*:AIX:*:[45])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q |
awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
@@ -565,28 +545,28 @@ EOF
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit 0 ;;
+ exit ;;
*:AIX:*:*)
echo rs6000-ibm-aix
- exit 0 ;;
+ exit ;;
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
echo romp-ibm-bsd4.4
- exit 0 ;;
+ exit ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit 0 ;; # report: romp-ibm BSD 4.3
+ exit ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
- exit 0 ;;
+ exit ;;
DPX/2?00:B.O.S.:*:*)
echo m68k-bull-sysv3
- exit 0 ;;
+ exit ;;
9000/[34]??:4.3bsd:1.*:*)
echo m68k-hp-bsd
- exit 0 ;;
+ exit ;;
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
echo m68k-hp-bsd4.4
- exit 0 ;;
+ exit ;;
9000/[34678]??:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
case "${UNAME_MACHINE}" in
@@ -648,9 +628,19 @@ EOF
esac
if [ ${HP_ARCH} = "hppa2.0w" ]
then
- # avoid double evaluation of $set_cc_for_build
- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep __LP64__ >/dev/null
then
HP_ARCH="hppa2.0w"
else
@@ -658,11 +648,11 @@ EOF
fi
fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit 0 ;;
+ exit ;;
ia64:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
echo ia64-hp-hpux${HPUX_REV}
- exit 0 ;;
+ exit ;;
3050*:HI-UX:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -690,161 +680,189 @@ EOF
exit (0);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
echo unknown-hitachi-hiuxwe2
- exit 0 ;;
+ exit ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
echo hppa1.1-hp-bsd
- exit 0 ;;
+ exit ;;
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
- exit 0 ;;
+ exit ;;
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
- exit 0 ;;
+ exit ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
echo hppa1.1-hp-osf
- exit 0 ;;
+ exit ;;
hp8??:OSF1:*:*)
echo hppa1.0-hp-osf
- exit 0 ;;
+ exit ;;
i*86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
echo ${UNAME_MACHINE}-unknown-osf1mk
else
echo ${UNAME_MACHINE}-unknown-osf1
fi
- exit 0 ;;
+ exit ;;
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
- exit 0 ;;
+ exit ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
- exit 0 ;;
+ exit ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit 0 ;;
+ exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
- exit 0 ;;
+ exit ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
- exit 0 ;;
+ exit ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
- exit 0 ;;
+ exit ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ exit ;;
CRAY*[A-Z]90:*:*:*)
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ exit ;;
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ exit ;;
CRAY*T3E:*:*:*)
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ exit ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ exit ;;
*:UNICOS/mp:*:*)
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit 0 ;;
+ exit ;;
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr
'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/
/_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit 0 ;;
+ exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
sparc*:BSD/OS:*:*)
echo sparc-unknown-bsdi${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:FreeBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e
's/[-(].*//'`
- exit 0 ;;
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e
's/[-(].*//'` ;;
+ esac
+ exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
- exit 0 ;;
- i*:MINGW*:*)
+ exit ;;
+ *:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
- exit 0 ;;
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
- exit 0 ;;
- x86:Interix*:[34]*)
- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
- exit 0 ;;
+ exit ;;
+ *:Interix*:[3456]*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ EM64T | authenticamd)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
- exit 0 ;;
+ exit ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
# UNAME_MACHINE based on the output of uname instead of i386?
echo i586-pc-interix
- exit 0 ;;
+ exit ;;
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
- exit 0 ;;
- amd64:CYGWIN*:*:*)
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
- exit 0 ;;
+ exit ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin
- exit 0 ;;
+ exit ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ exit ;;
*:GNU:*:*)
# the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo
${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit 0 ;;
+ exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed
's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e
's/[-(].*//'`-gnu
- exit 0 ;;
+ exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
- exit 0 ;;
+ exit ;;
arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
- exit 0 ;;
+ exit ;;
crisv32:Linux:*:*)
echo crisv32-axis-linux-gnu
- exit 0 ;;
+ exit ;;
frv:Linux:*:*)
echo frv-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
mips:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -861,8 +879,12 @@ EOF
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
mips64:Linux:*:*)
eval $set_cc_for_build
@@ -880,15 +902,22 @@ EOF
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
+ exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
@@ -902,7 +931,7 @@ EOF
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit 0 ;;
+ exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -910,25 +939,31 @@ EOF
PA8*) echo hppa2.0-unknown-linux-gnu ;;
*) echo hppa-unknown-linux-gnu ;;
esac
- exit 0 ;;
+ exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
- exit 0 ;;
+ exit ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
@@ -946,15 +981,15 @@ EOF
;;
a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit 0 ;;
+ exit ;;
coff-i386)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit 0 ;;
+ exit ;;
"")
# 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 ;;
+ exit ;;
esac
# Determine whether the default compiler is a.out or elf
eval $set_cc_for_build
@@ -971,7 +1006,7 @@ EOF
LIBC=gnulibc1
# endif
#else
- #ifdef __INTEL_COMPILER
+ #if defined(__INTEL_COMPILER) || defined(__PGI) ||
defined(__SUNPRO_C) || defined(__SUNPRO_CC)
LIBC=gnu
#else
LIBC=gnuaout
@@ -981,16 +1016,23 @@ EOF
LIBC=dietlibc
#endif
EOF
- 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
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^LIBC/{
+ s: ::g
+ p
+ }'`"
+ test x"${LIBC}" != x && {
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit
+ }
+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
;;
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 ;;
+ exit ;;
i*86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
@@ -998,27 +1040,27 @@ EOF
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- exit 0 ;;
+ exit ;;
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 ;;
+ exit ;;
i*86:XTS-300:*:STOP)
echo ${UNAME_MACHINE}-unknown-stop
- exit 0 ;;
+ exit ;;
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos
- exit 0 ;;
- i*86:syllable:*:*)
+ exit ;;
+ i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
- exit 0 ;;
+ exit ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
i*86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit 0 ;;
+ exit ;;
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
@@ -1026,15 +1068,16 @@ EOF
else
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
fi
- exit 0 ;;
- i*86:*:5:[78]*)
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
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 ;;
+ exit ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
@@ -1052,73 +1095,73 @@ EOF
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
- exit 0 ;;
+ exit ;;
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
- exit 0 ;;
+ exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
- exit 0 ;;
+ exit ;;
paragon:*:*:*)
echo i860-intel-osf1
- exit 0 ;;
+ exit ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
fi
- exit 0 ;;
+ exit ;;
mini*:CTIX:SYS*5:*)
# "miniframe"
echo m68010-convergent-sysv
- exit 0 ;;
+ exit ;;
mc68k:UNIX:SYSTEM5:3.51m)
echo m68k-convergent-sysv
- exit 0 ;;
+ exit ;;
M680?0:D-NIX:5.3:*)
echo m68k-diab-dnix
- exit 0 ;;
+ exit ;;
M68*:*:R3V[5678]*:*)
- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
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)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && echo i486-ncr-sysv4 && exit 0 ;;
+ && { echo i486-ncr-sysv4; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
- exit 0 ;;
+ exit ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
RM*:ReliantUNIX-*:*:*)
echo mips-sni-sysv4
- exit 0 ;;
+ exit ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
- exit 0 ;;
+ exit ;;
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
@@ -1126,69 +1169,81 @@ EOF
else
echo ns32k-sni-sysv
fi
- exit 0 ;;
+ exit ;;
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel(a)ccMail.Census.GOV>
echo i586-unisys-sysv4
- exit 0 ;;
+ exit ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes(a)openmarket.com>.
# How about differentiating between stratus architectures? -djm
echo hppa1.1-stratus-sysv4
- exit 0 ;;
+ exit ;;
*:*:*:FTX*)
# From seanf(a)swdc.stratus.com.
echo i860-stratus-sysv4
- exit 0 ;;
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green(a)stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
*:VOS:*:*)
# From Paul.Green(a)stratus.com.
echo hppa1.1-stratus-vos
- exit 0 ;;
+ exit ;;
mc68*:A/UX:*:*)
echo m68k-apple-aux${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
news*:NEWS-OS:6*:*)
echo mips-sony-newsos6
- exit 0 ;;
+ exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
else
echo mips-unknown-sysv${UNAME_RELEASE}
fi
- exit 0 ;;
+ exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
- exit 0 ;;
+ exit ;;
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
echo powerpc-apple-beos
- exit 0 ;;
+ exit ;;
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
- exit 0 ;;
+ exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
SX-5:SUPER-UX:*:*)
echo sx5-nec-superux${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:Rhapsody:*:*)
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
- *86) UNAME_PROCESSOR=i686 ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
if test "$UNAME_PROCESSOR" = "x86"; then
@@ -1196,25 +1251,25 @@ EOF
UNAME_MACHINE=pc
fi
echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:QNX:*:4*)
echo i386-pc-qnx
- exit 0 ;;
+ exit ;;
NSE-?:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
NSR-?:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:NonStop-UX:*:*)
echo mips-compaq-nonstopux
- exit 0 ;;
+ exit ;;
BS2000:POSIX*:*:*)
echo bs2000-siemens-sysv
- exit 0 ;;
+ exit ;;
DS/*:UNIX_System_V:*:*)
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:Plan9:*:*)
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
@@ -1225,41 +1280,47 @@ EOF
UNAME_MACHINE="$cputype"
fi
echo ${UNAME_MACHINE}-unknown-plan9
- exit 0 ;;
+ exit ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
- exit 0 ;;
+ exit ;;
*:TENEX:*:*)
echo pdp10-unknown-tenex
- exit 0 ;;
+ exit ;;
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
echo pdp10-dec-tops20
- exit 0 ;;
+ exit ;;
XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
echo pdp10-xkl-tops20
- exit 0 ;;
+ exit ;;
*:TOPS-20:*:*)
echo pdp10-unknown-tops20
- exit 0 ;;
+ exit ;;
*:ITS:*:*)
echo pdp10-unknown-its
- exit 0 ;;
+ exit ;;
SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e
's/[-(].*//'`
- exit 0 ;;
+ exit ;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "${UNAME_MACHINE}" in
- A*) echo alpha-dec-vms && exit 0 ;;
- I*) echo ia64-dec-vms && exit 0 ;;
- V*) echo vax-dec-vms && exit 0 ;;
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
esac ;;
*:XENIX:*:SysV)
echo i386-pc-xenix
- exit 0 ;;
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1291,7 +1352,7 @@ main ()
#endif
#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix"); exit (0);
+ printf ("arm-acorn-riscix\n"); exit (0);
#endif
#if defined (hp300) && !defined (hpux)
@@ -1380,11 +1441,12 @@ main ()
}
EOF
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
# Apollos put the system type in the environment.
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
# Convex versions that predate uname can use getsysinfo(1)
@@ -1393,22 +1455,22 @@ then
case `getsysinfo -f cpu_type` in
c1*)
echo c1-convex-bsd
- exit 0 ;;
+ exit ;;
c2*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit 0 ;;
+ exit ;;
c34*)
echo c34-convex-bsd
- exit 0 ;;
+ exit ;;
c38*)
echo c38-convex-bsd
- exit 0 ;;
+ exit ;;
c4*)
echo c4-convex-bsd
- exit 0 ;;
+ exit ;;
esac
fi
@@ -1419,7 +1481,9 @@ the operating system you are using. It i
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
- ftp://ftp.gnu.org/pub/gnu/config/
+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.g...
+and
+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
If the version you run ($0) is already up to date, please
send the following data and any information you think might be
diff -r 26ec8d0f3a9c config.sub
--- a/config.sub Sat Dec 08 13:18:49 2007 +0100
+++ b/config.sub Sat Dec 08 21:17:55 2007 -0700
@@ -1,9 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-
-timestamp='2005-02-10'
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
+
+timestamp='2007-12-05'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -21,13 +22,14 @@ timestamp='2005-02-10'
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
+
# Please send patches to <config-patches(a)gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
@@ -83,11 +85,11 @@ while test $# -gt 0 ; do
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
- echo "$timestamp" ; exit 0 ;;
+ echo "$timestamp" ; exit ;;
--version | -v )
- echo "$version" ; exit 0 ;;
+ echo "$version" ; exit ;;
--help | --h* | -h )
- echo "$usage"; exit 0 ;;
+ echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
@@ -99,7 +101,7 @@ while test $# -gt 0 ; do
*local*)
# First pass through any local machine types.
echo $1
- exit 0;;
+ exit ;;
* )
break ;;
@@ -118,8 +120,9 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* |
uclinux-uclibc* | uclinux-gnu* | \
- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* |
os2-emx* | rtmk-nova*)
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* |
netbsd*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -170,6 +173,10 @@ case $os in
-hiux*)
os=-hiuxwe2
;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
-sco5)
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -183,6 +190,10 @@ case $os in
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
@@ -230,14 +241,16 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
- | fr30 | frv \
+ | fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
- | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -246,6 +259,7 @@ case $basic_machine in
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
@@ -254,20 +268,24 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
+ | mt \
| msp430 \
+ | nios | nios2 \
| ns16k | ns32k \
- | openrisc | or32 \
+ | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle
| sh[1234]le | sh3ele \
| sh64 | sh64le \
- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 |
sparcv9 | sparcv9b \
- | strongarm \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
- | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k)
basic_machine=$basic_machine-unknown
;;
@@ -277,6 +295,9 @@ case $basic_machine in
os=-none
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
;;
# We use `pc' rather than `unknown'
@@ -297,18 +318,18 @@ case $basic_machine in
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* \
- | bs2000-* \
+ | avr-* | avr32-* \
+ | bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
- | m32r-* | m32rle-* \
+ | m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@@ -319,6 +340,7 @@ case $basic_machine in
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
@@ -327,26 +349,33 @@ case $basic_machine in
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
+ | mt-* \
| msp430-* \
+ | nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* |
sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
- | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
- | xstormy16-* | xtensa-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa*-* \
| ymp-* \
| z8k-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
@@ -418,6 +447,14 @@ case $basic_machine in
basic_machine=ns32k-sequent
os=-dynix
;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
c90)
basic_machine=c90-cray
os=-unicos
@@ -450,8 +487,8 @@ case $basic_machine in
basic_machine=craynv-cray
os=-unicosmp
;;
- cr16c)
- basic_machine=cr16c-unknown
+ cr16)
+ basic_machine=cr16-unknown
os=-elf
;;
crds | unos)
@@ -643,6 +680,14 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
m88k-omron*)
basic_machine=m88k-omron
;;
@@ -658,6 +703,10 @@ case $basic_machine in
basic_machine=i386-pc
os=-mingw32
;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
miniframe)
basic_machine=m68000-convergent
;;
@@ -682,6 +731,9 @@ case $basic_machine in
msdos)
basic_machine=i386-pc
os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
mvs)
basic_machine=i370-ibm
@@ -758,9 +810,8 @@ case $basic_machine in
basic_machine=hppa1.1-oki
os=-proelf
;;
- or32 | or32-*)
+ openrisc | openrisc-*)
basic_machine=or32-unknown
- os=-coff
;;
os400)
basic_machine=powerpc-ibm
@@ -782,6 +833,14 @@ case $basic_machine in
basic_machine=i860-intel
os=-osf
;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
pbd)
basic_machine=sparc-tti
;;
@@ -790,6 +849,12 @@ case $basic_machine in
;;
pc532 | pc532-*)
basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
@@ -847,6 +912,10 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@@ -873,6 +942,10 @@ case $basic_machine in
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
sei)
basic_machine=mips-sei
os=-seiux
@@ -883,6 +956,9 @@ case $basic_machine in
sh)
basic_machine=sh-hitachi
os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
;;
sh64)
basic_machine=sh64-unknown
@@ -1086,13 +1162,10 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
- sh64)
- basic_machine=sh64-unknown
- ;;
- sparc | sparcv8 | sparcv9 | sparcv9b)
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra)
@@ -1165,20 +1238,23 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* |
-mpeix* | -udk* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1196,7 +1272,7 @@ case $os in
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
@@ -1330,6 +1406,12 @@ else
# system, and we'll never get to this point.
case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
*-acorn)
os=-riscix1.2
;;
@@ -1339,9 +1421,9 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
@@ -1367,6 +1449,9 @@ case $basic_machine in
m68*-cisco)
os=-aout
;;
+ mep-*)
+ os=-elf
+ ;;
mips*-cisco)
os=-elf
;;
@@ -1384,6 +1469,9 @@ case $basic_machine in
;;
*-be)
os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
;;
*-ibm)
os=-aix
@@ -1556,7 +1644,7 @@ esac
esac
echo $basic_machine$os
-exit 0
+exit
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
--
Jerry James
http://loganjerry.googlepages.com/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches