aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2010-08-10 10:24:32 +0900
committerKenichi Handa2010-08-10 10:24:32 +0900
commitf6b495fad779117cb1bf3a2cf635e695811854cf (patch)
treee9092d053ff467b01ae1327fee935e451ea60133 /src
parent2948599b87eef32145ec30e4ebb688178c494b5a (diff)
parent09d93395c3ceeb0bd23d9fd9c7ef316dc03af08b (diff)
downloademacs-f6b495fad779117cb1bf3a2cf635e695811854cf.tar.gz
emacs-f6b495fad779117cb1bf3a2cf635e695811854cf.zip
merge trunk
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog35
-rw-r--r--src/config.in15
-rw-r--r--src/font.c12
-rw-r--r--src/font.h8
-rw-r--r--src/fringe.c2
-rw-r--r--src/lisp.h6
-rw-r--r--src/m/alpha.h4
-rw-r--r--src/m/amdx86-64.h4
-rw-r--r--src/m/arm.h4
-rw-r--r--src/m/hp800.h4
-rw-r--r--src/m/ia64.h4
-rw-r--r--src/m/ibmrs6000.h1
-rw-r--r--src/m/ibms390.h4
-rw-r--r--src/m/intel386.h4
-rw-r--r--src/m/iris4d.h4
-rw-r--r--src/m/m68k.h4
-rw-r--r--src/m/macppc.h4
-rw-r--r--src/m/mips.h6
-rw-r--r--src/m/sh3.h4
-rw-r--r--src/m/sparc.h4
-rw-r--r--src/m/template.h4
-rw-r--r--src/m/vax.h4
-rw-r--r--src/m/xtensa.h6
-rw-r--r--src/md5.c6
-rw-r--r--src/sound.c8
25 files changed, 71 insertions, 90 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 6fd89a6339d..a3e08cf699d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,40 @@
12010-08-09 Dan Nicolaescu <dann@ics.uci.edu> 12010-08-09 Dan Nicolaescu <dann@ics.uci.edu>
2 2
3 * font.h (font_parse_xlfd, font_parse_fcname, font_unparse_fcname)
4 (font_parse_name): font_open_by_name):
5 * font.c (font_parse_xlfd, font_parse_fcname, font_unparse_fcname)
6 (font_parse_name): font_open_by_name): Remove const.
7
82010-08-09 Andreas Schwab <schwab@linux-m68k.org>
9
10 Use autoconf determined WORDS_BIGENDIAN instead of hardcoded
11 definition.
12
13 * m/alpha.h: Don't define/undef WORDS_BIG_ENDIAN.
14 * m/amdx86-64.h: Likewise.
15 * m/arm.h: Likewise.
16 * m/hp800.h: Likewise.
17 * m/ia64.h: Likewise.
18 * m/ibmrs6000.h: Likewise.
19 * m/ibms390.h: Likewise.
20 * m/intel386.h: Likewise.
21 * m/iris4d.h: Likewise.
22 * m/m68k.h: Likewise.
23 * m/macppc.h: Likewise.
24 * m/mips.h: Likewise.
25 * m/sh3.h: Likewise.
26 * m/sparc.h: Likewise.
27 * m/template.h: Likewise.
28 * m/vax.h: Likewise.
29 * m/xtensa.h: Likewise.
30 * fringe.c (init_fringe_bitmap): Test WORDS_BIGENDIAN instead of
31 WORDS_BIG_ENDIAN.
32 * lisp.h: Likewise.
33 * md5.c: Likewise.
34 * sound.c (le2hl, le2hs, be2hl, be2hs): Likewise.
35
362010-08-09 Dan Nicolaescu <dann@ics.uci.edu>
37
3 Use const char* instead of char*. 38 Use const char* instead of char*.
4 Reduce the number of warnings with -Wwrite-strings. 39 Reduce the number of warnings with -Wwrite-strings.
5 * xrdb.c (get_environ_db, get_system_name): 40 * xrdb.c (get_environ_db, get_system_name):
diff --git a/src/config.in b/src/config.in
index 19ed94376c1..ea17a54d913 100644
--- a/src/config.in
+++ b/src/config.in
@@ -27,6 +27,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
27#define EMACS_CONFIG_H 27#define EMACS_CONFIG_H
28 28
29 29
30/* Define if building universal (internal helper macro) */
31#undef AC_APPLE_UNIVERSAL_BUILD
32
30/* Define to 1 if the mktime function is broken. */ 33/* Define to 1 if the mktime function is broken. */
31#undef BROKEN_MKTIME 34#undef BROKEN_MKTIME
32 35
@@ -976,6 +979,18 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
976/* Define to 1 if using an X toolkit. */ 979/* Define to 1 if using an X toolkit. */
977#undef USE_X_TOOLKIT 980#undef USE_X_TOOLKIT
978 981
982/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
983 significant byte first (like Motorola and SPARC, unlike Intel). */
984#if defined AC_APPLE_UNIVERSAL_BUILD
985# if defined __BIG_ENDIAN__
986# define WORDS_BIGENDIAN 1
987# endif
988#else
989# ifndef WORDS_BIGENDIAN
990# undef WORDS_BIGENDIAN
991# endif
992#endif
993
979/* Define this to check for malloc buffer overrun. */ 994/* Define this to check for malloc buffer overrun. */
980#undef XMALLOC_OVERRUN_CHECK 995#undef XMALLOC_OVERRUN_CHECK
981 996
diff --git a/src/font.c b/src/font.c
index 1ac994d6375..eba75c11b2f 100644
--- a/src/font.c
+++ b/src/font.c
@@ -701,7 +701,7 @@ font_put_extra (Lisp_Object font, Lisp_Object prop, Lisp_Object val)
701 701
702static int parse_matrix (const char *); 702static int parse_matrix (const char *);
703static int font_expand_wildcards (Lisp_Object *, int); 703static int font_expand_wildcards (Lisp_Object *, int);
704static int font_parse_name (const char *, Lisp_Object); 704static int font_parse_name (char *, Lisp_Object);
705 705
706/* An enumerator for each field of an XLFD font name. */ 706/* An enumerator for each field of an XLFD font name. */
707enum xlfd_field_index 707enum xlfd_field_index
@@ -981,7 +981,7 @@ font_expand_wildcards (Lisp_Object *field, int n)
981 a fully specified XLFD. */ 981 a fully specified XLFD. */
982 982
983int 983int
984font_parse_xlfd (const char *name, Lisp_Object font) 984font_parse_xlfd (char *name, Lisp_Object font)
985{ 985{
986 int len = strlen (name); 986 int len = strlen (name);
987 int i, j, n; 987 int i, j, n;
@@ -1306,7 +1306,7 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
1306 This function tries to guess which format it is. */ 1306 This function tries to guess which format it is. */
1307 1307
1308int 1308int
1309font_parse_fcname (const char *name, Lisp_Object font) 1309font_parse_fcname (char *name, Lisp_Object font)
1310{ 1310{
1311 char *p, *q; 1311 char *p, *q;
1312 char *size_beg = NULL, *size_end = NULL; 1312 char *size_beg = NULL, *size_end = NULL;
@@ -1563,7 +1563,7 @@ font_parse_fcname (const char *name, Lisp_Object font)
1563 FONT_SIZE_INDEX of FONT is 0, use PIXEL_SIZE instead. */ 1563 FONT_SIZE_INDEX of FONT is 0, use PIXEL_SIZE instead. */
1564 1564
1565int 1565int
1566font_unparse_fcname (Lisp_Object font, int pixel_size, const char *name, int nbytes) 1566font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int nbytes)
1567{ 1567{
1568 Lisp_Object family, foundry; 1568 Lisp_Object family, foundry;
1569 Lisp_Object tail, val; 1569 Lisp_Object tail, val;
@@ -1765,7 +1765,7 @@ font_unparse_gtkname (Lisp_Object font, struct frame *f, char *name, int nbytes)
1765 0. Otherwise return -1. */ 1765 0. Otherwise return -1. */
1766 1766
1767static int 1767static int
1768font_parse_name (const char *name, Lisp_Object font) 1768font_parse_name (char *name, Lisp_Object font)
1769{ 1769{
1770 if (name[0] == '-' || strchr (name, '*') || strchr (name, '?')) 1770 if (name[0] == '-' || strchr (name, '*') || strchr (name, '?'))
1771 return font_parse_xlfd (name, font); 1771 return font_parse_xlfd (name, font);
@@ -3506,7 +3506,7 @@ font_open_by_spec (FRAME_PTR f, Lisp_Object spec)
3506 found, return Qnil. */ 3506 found, return Qnil. */
3507 3507
3508Lisp_Object 3508Lisp_Object
3509font_open_by_name (FRAME_PTR f, const char *name) 3509font_open_by_name (FRAME_PTR f, char *name)
3510{ 3510{
3511 Lisp_Object args[2]; 3511 Lisp_Object args[2];
3512 Lisp_Object spec, ret; 3512 Lisp_Object spec, ret;
diff --git a/src/font.h b/src/font.h
index d37f0c86a23..5f1a442b59e 100644
--- a/src/font.h
+++ b/src/font.h
@@ -783,7 +783,7 @@ extern void font_prepare_for_face (FRAME_PTR f, struct face *face);
783extern void font_done_for_face (FRAME_PTR f, struct face *face); 783extern void font_done_for_face (FRAME_PTR f, struct face *face);
784 784
785extern Lisp_Object font_open_by_spec (FRAME_PTR f, Lisp_Object spec); 785extern Lisp_Object font_open_by_spec (FRAME_PTR f, Lisp_Object spec);
786extern Lisp_Object font_open_by_name (FRAME_PTR f, const char *name); 786extern Lisp_Object font_open_by_name (FRAME_PTR f, char *name);
787extern void font_close_object (FRAME_PTR f, Lisp_Object font_object); 787extern void font_close_object (FRAME_PTR f, Lisp_Object font_object);
788 788
789extern Lisp_Object font_intern_prop (const char *str, int len, int force_symbol); 789extern Lisp_Object font_intern_prop (const char *str, int len, int force_symbol);
@@ -795,12 +795,12 @@ extern void font_parse_family_registry (Lisp_Object family,
795extern Lisp_Object font_spec_from_family_registry (Lisp_Object family, 795extern Lisp_Object font_spec_from_family_registry (Lisp_Object family,
796 Lisp_Object registry); 796 Lisp_Object registry);
797 797
798extern int font_parse_xlfd (const char *name, Lisp_Object font); 798extern int font_parse_xlfd (char *name, Lisp_Object font);
799extern int font_unparse_xlfd (Lisp_Object font, int pixel_size, 799extern int font_unparse_xlfd (Lisp_Object font, int pixel_size,
800 char *name, int bytes); 800 char *name, int bytes);
801extern int font_parse_fcname (const char *name, Lisp_Object font); 801extern int font_parse_fcname (char *name, Lisp_Object font);
802extern int font_unparse_fcname (Lisp_Object font, int pixel_size, 802extern int font_unparse_fcname (Lisp_Object font, int pixel_size,
803 const char *name, int bytes); 803 char *name, int bytes);
804extern int font_unparse_gtkname (Lisp_Object, struct frame *, char *, int); 804extern int font_unparse_gtkname (Lisp_Object, struct frame *, char *, int);
805extern void register_font_driver (struct font_driver *driver, FRAME_PTR f); 805extern void register_font_driver (struct font_driver *driver, FRAME_PTR f);
806extern void free_font_driver_list (FRAME_PTR f); 806extern void free_font_driver_list (FRAME_PTR f);
diff --git a/src/fringe.c b/src/fringe.c
index f24365a1e23..fce100b1463 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -1494,7 +1494,7 @@ init_fringe_bitmap (int which, struct fringe_bitmap *fb, int once_p)
1494 | (swap_nibble[(b>>8) & 0xf] << 4) 1494 | (swap_nibble[(b>>8) & 0xf] << 4)
1495 | (swap_nibble[(b>>12) & 0xf])); 1495 | (swap_nibble[(b>>12) & 0xf]));
1496 b >>= (16 - fb->width); 1496 b >>= (16 - fb->width);
1497#ifdef WORDS_BIG_ENDIAN 1497#ifdef WORDS_BIGENDIAN
1498 b = ((b >> 8) | (b << 8)); 1498 b = ((b >> 8) | (b << 8));
1499#endif 1499#endif
1500 *bits++ = b; 1500 *bits++ = b;
diff --git a/src/lisp.h b/src/lisp.h
index 218c6e630fc..89514bf9ecb 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -254,7 +254,7 @@ enum Lisp_Fwd_Type
254 254
255#ifdef USE_LISP_UNION_TYPE 255#ifdef USE_LISP_UNION_TYPE
256 256
257#ifndef WORDS_BIG_ENDIAN 257#ifndef WORDS_BIGENDIAN
258 258
259/* Definition of Lisp_Object for little-endian machines. */ 259/* Definition of Lisp_Object for little-endian machines. */
260 260
@@ -278,7 +278,7 @@ union Lisp_Object
278 } 278 }
279Lisp_Object; 279Lisp_Object;
280 280
281#else /* If WORDS_BIG_ENDIAN */ 281#else /* If WORDS_BIGENDIAN */
282 282
283typedef 283typedef
284union Lisp_Object 284union Lisp_Object
@@ -300,7 +300,7 @@ union Lisp_Object
300 } 300 }
301Lisp_Object; 301Lisp_Object;
302 302
303#endif /* WORDS_BIG_ENDIAN */ 303#endif /* WORDS_BIGENDIAN */
304 304
305#ifdef __GNUC__ 305#ifdef __GNUC__
306static __inline__ Lisp_Object 306static __inline__ Lisp_Object
diff --git a/src/m/alpha.h b/src/m/alpha.h
index 5a0168417cb..3b6d7da92df 100644
--- a/src/m/alpha.h
+++ b/src/m/alpha.h
@@ -25,10 +25,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
25#define _LP64 /* This doesn't appear to be necessary on OSF 4/5 -- fx. */ 25#define _LP64 /* This doesn't appear to be necessary on OSF 4/5 -- fx. */
26#endif 26#endif
27 27
28/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
29 is the most significant byte. */
30#undef WORDS_BIG_ENDIAN
31
32/* Now define a symbol for the cpu type, if your compiler 28/* Now define a symbol for the cpu type, if your compiler
33 does not define it automatically. */ 29 does not define it automatically. */
34/* __alpha defined automatically */ 30/* __alpha defined automatically */
diff --git a/src/m/amdx86-64.h b/src/m/amdx86-64.h
index 1910c37bffc..30aa2678717 100644
--- a/src/m/amdx86-64.h
+++ b/src/m/amdx86-64.h
@@ -21,10 +21,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21#define BITS_PER_LONG 64 21#define BITS_PER_LONG 64
22#define BITS_PER_EMACS_INT 64 22#define BITS_PER_EMACS_INT 64
23 23
24/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
25 is the most significant byte. */
26#undef WORDS_BIG_ENDIAN
27
28/* Now define a symbol for the cpu type, if your compiler 24/* Now define a symbol for the cpu type, if your compiler
29 does not define it automatically: 25 does not define it automatically:
30 Ones defined so far include vax, m68000, ns16000, pyramid, 26 Ones defined so far include vax, m68000, ns16000, pyramid,
diff --git a/src/m/arm.h b/src/m/arm.h
index ee5d6c77844..8b659bb5bd0 100644
--- a/src/m/arm.h
+++ b/src/m/arm.h
@@ -18,9 +18,5 @@ GNU General Public License for more details.
18You should have received a copy of the GNU General Public License 18You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
22 is the most significant byte. */
23#undef WORDS_BIG_ENDIAN
24
25/* arch-tag: 07856f0c-f0c8-4bd8-99af-0b7fa1e5ee42 21/* arch-tag: 07856f0c-f0c8-4bd8-99af-0b7fa1e5ee42
26 (do not change this comment) */ 22 (do not change this comment) */
diff --git a/src/m/hp800.h b/src/m/hp800.h
index 3889a1a3e60..9998f701a6b 100644
--- a/src/m/hp800.h
+++ b/src/m/hp800.h
@@ -18,10 +18,6 @@ GNU General Public License for more details.
18You should have received a copy of the GNU General Public License 18You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
22 is the most significant byte. */
23#define WORDS_BIG_ENDIAN
24
25/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend 21/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
26 the bit field into an int. In other words, if bit fields 22 the bit field into an int. In other words, if bit fields
27 are always unsigned. 23 are always unsigned.
diff --git a/src/m/ia64.h b/src/m/ia64.h
index 5266c682c78..bbf09ac878b 100644
--- a/src/m/ia64.h
+++ b/src/m/ia64.h
@@ -23,10 +23,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
23#define BITS_PER_LONG 64 23#define BITS_PER_LONG 64
24#define BITS_PER_EMACS_INT 64 24#define BITS_PER_EMACS_INT 64
25 25
26/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
27 is the most significant byte. */
28#undef WORDS_BIG_ENDIAN
29
30/* Now define a symbol for the cpu type, if your compiler 26/* Now define a symbol for the cpu type, if your compiler
31 does not define it automatically. */ 27 does not define it automatically. */
32/* __ia64__ defined automatically */ 28/* __ia64__ defined automatically */
diff --git a/src/m/ibmrs6000.h b/src/m/ibmrs6000.h
index a44b2c4ec3b..785719e908b 100644
--- a/src/m/ibmrs6000.h
+++ b/src/m/ibmrs6000.h
@@ -23,7 +23,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
23 An address of data cannot be stored correctly in a Lisp object; 23 An address of data cannot be stored correctly in a Lisp object;
24 we always lose the high bits. We must tell XPNTR to add them back. */ 24 we always lose the high bits. We must tell XPNTR to add them back. */
25#define DATA_START 0x20000000 25#define DATA_START 0x20000000
26#define WORDS_BIG_ENDIAN
27#define DATA_SEG_BITS 0x20000000 26#define DATA_SEG_BITS 0x20000000
28 27
29#ifndef NLIST_STRUCT 28#ifndef NLIST_STRUCT
diff --git a/src/m/ibms390.h b/src/m/ibms390.h
index 087607b547d..0acc826a1ea 100644
--- a/src/m/ibms390.h
+++ b/src/m/ibms390.h
@@ -19,10 +19,6 @@ You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21 21
22/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
23 is the most significant byte. */
24#define WORDS_BIG_ENDIAN
25
26/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend 22/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
27 the 24-bit bit field into an int. In other words, if bit fields 23 the 24-bit bit field into an int. In other words, if bit fields
28 are always unsigned. 24 are always unsigned.
diff --git a/src/m/intel386.h b/src/m/intel386.h
index 2931e9a2284..15601fae76e 100644
--- a/src/m/intel386.h
+++ b/src/m/intel386.h
@@ -19,10 +19,6 @@ You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21 21
22/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
23 is the most significant byte. */
24#undef WORDS_BIG_ENDIAN
25
26#ifdef WINDOWSNT 22#ifdef WINDOWSNT
27#define VIRT_ADDR_VARIES 23#define VIRT_ADDR_VARIES
28#define DATA_START get_data_start () 24#define DATA_START get_data_start ()
diff --git a/src/m/iris4d.h b/src/m/iris4d.h
index 526d68ee5fc..31f08d05cfc 100644
--- a/src/m/iris4d.h
+++ b/src/m/iris4d.h
@@ -19,10 +19,6 @@ You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21 21
22/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
23 is the most significant byte. */
24#define WORDS_BIG_ENDIAN
25
26/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend 22/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
27 the bit field into an int. In other words, if bit fields 23 the bit field into an int. In other words, if bit fields
28 are always unsigned. 24 are always unsigned.
diff --git a/src/m/m68k.h b/src/m/m68k.h
index 2286cbce5e6..8d53424ccec 100644
--- a/src/m/m68k.h
+++ b/src/m/m68k.h
@@ -18,10 +18,6 @@ GNU General Public License for more details.
18You should have received a copy of the GNU General Public License 18You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
22 is the most significant byte. */
23#define WORDS_BIG_ENDIAN
24
25/* Now define a symbol for the cpu type, if your compiler 21/* Now define a symbol for the cpu type, if your compiler
26 does not define it automatically. */ 22 does not define it automatically. */
27#ifndef m68k 23#ifndef m68k
diff --git a/src/m/macppc.h b/src/m/macppc.h
index 2764ae56115..01735790b20 100644
--- a/src/m/macppc.h
+++ b/src/m/macppc.h
@@ -18,10 +18,6 @@ GNU General Public License for more details.
18You should have received a copy of the GNU General Public License 18You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
22 is the most significant byte. */
23#define WORDS_BIG_ENDIAN
24
25/* Data type of load average, as read out of kmem. */ 21/* Data type of load average, as read out of kmem. */
26#define LOAD_AVE_TYPE long 22#define LOAD_AVE_TYPE long
27 23
diff --git a/src/m/mips.h b/src/m/mips.h
index 39a948c0cde..b3a754c2b61 100644
--- a/src/m/mips.h
+++ b/src/m/mips.h
@@ -18,12 +18,6 @@ GNU General Public License for more details.
18You should have received a copy of the GNU General Public License 18You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
22 is the most significant byte. */
23#if ! (defined (__MIPSEL__) || defined (MIPSEL) || defined (_MIPSEL))
24#define WORDS_BIG_ENDIAN
25#endif
26
27/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend 21/* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
28 the 24-bit bit field into an int. In other words, if bit fields 22 the 24-bit bit field into an int. In other words, if bit fields
29 are always unsigned. 23 are always unsigned.
diff --git a/src/m/sh3.h b/src/m/sh3.h
index 703513d23f7..ebfdb5b2d64 100644
--- a/src/m/sh3.h
+++ b/src/m/sh3.h
@@ -1,8 +1,4 @@
1/* Machine description file for SuperH. */ 1/* Machine description file for SuperH. */
2 2
3#ifdef __BIG_ENDIAN__
4# define WORDS_BIG_ENDIAN
5#endif
6
7/* arch-tag: 1b01b84f-f044-4afa-aa4b-caa54ec38966 3/* arch-tag: 1b01b84f-f044-4afa-aa4b-caa54ec38966
8 (do not change this comment) */ 4 (do not change this comment) */
diff --git a/src/m/sparc.h b/src/m/sparc.h
index 6c2c71c4045..26ca3caaebe 100644
--- a/src/m/sparc.h
+++ b/src/m/sparc.h
@@ -18,10 +18,6 @@ GNU General Public License for more details.
18You should have received a copy of the GNU General Public License 18You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
22 is the most significant byte. */
23#define WORDS_BIG_ENDIAN
24
25/* __sparc__ is defined by the compiler by default. */ 21/* __sparc__ is defined by the compiler by default. */
26 22
27/* XINT must explicitly sign-extend 23/* XINT must explicitly sign-extend
diff --git a/src/m/template.h b/src/m/template.h
index 7e067849813..4efc9158a45 100644
--- a/src/m/template.h
+++ b/src/m/template.h
@@ -18,10 +18,6 @@ GNU General Public License for more details.
18You should have received a copy of the GNU General Public License 18You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
22 is the most significant byte. */
23#define WORDS_BIG_ENDIAN
24
25/* Now define a symbol for the cpu type, if your compiler 21/* Now define a symbol for the cpu type, if your compiler
26 does not define it automatically. 22 does not define it automatically.
27 Ones defined so far include m68k and many others */ 23 Ones defined so far include m68k and many others */
diff --git a/src/m/vax.h b/src/m/vax.h
index 3426a20d55e..16e790a2769 100644
--- a/src/m/vax.h
+++ b/src/m/vax.h
@@ -19,10 +19,6 @@ You should have received a copy of the GNU General Public License
19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 19along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20 20
21 21
22/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
23 is the most significant byte. */
24#undef WORDS_BIG_ENDIAN
25
26/* #define vax -- appears to be done automatically */ 22/* #define vax -- appears to be done automatically */
27 23
28/* USG systems I know of running on Vaxes do not actually 24/* USG systems I know of running on Vaxes do not actually
diff --git a/src/m/xtensa.h b/src/m/xtensa.h
index 664f18dcb10..8e1da54b25b 100644
--- a/src/m/xtensa.h
+++ b/src/m/xtensa.h
@@ -2,11 +2,5 @@
2 2
3Add a license notice if this grows to > 10 lines of code. */ 3Add a license notice if this grows to > 10 lines of code. */
4 4
5#ifdef __LITTLE_ENDIAN
6#undef WORDS_BIG_ENDIAN
7#else
8#define WORDS_BIG_ENDIAN
9#endif
10
11/* arch-tag: fe5872de-d565-4d81-8fe0-ea19865b3e6a 5/* arch-tag: fe5872de-d565-4d81-8fe0-ea19865b3e6a
12 (do not change this comment) */ 6 (do not change this comment) */
diff --git a/src/md5.c b/src/md5.c
index 1840c2ac92b..6e7f651189e 100644
--- a/src/md5.c
+++ b/src/md5.c
@@ -1,7 +1,7 @@
1/* Functions to compute MD5 message digest of files or memory blocks. 1/* Functions to compute MD5 message digest of files or memory blocks.
2 according to the definition of MD5 in RFC 1321 from April 1992. 2 according to the definition of MD5 in RFC 1321 from April 1992.
3 Copyright (C) 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 3 Copyright (C) 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004,
4 2005, 2006, 2007 Free Software Foundation, Inc. 4 2005, 2006, 2007, 2010 Free Software Foundation, Inc.
5 5
6 This file is part of the GNU C Library. 6 This file is part of the GNU C Library.
7 7
@@ -40,7 +40,7 @@
40#ifdef _LIBC 40#ifdef _LIBC
41# include <endian.h> 41# include <endian.h>
42# if __BYTE_ORDER == __BIG_ENDIAN 42# if __BYTE_ORDER == __BIG_ENDIAN
43# define WORDS_BIG_ENDIAN 1 43# define WORDS_BIGENDIAN 1
44# endif 44# endif
45/* We need to keep the namespace clean so define the MD5 function 45/* We need to keep the namespace clean so define the MD5 function
46 protected using leading __ . */ 46 protected using leading __ . */
@@ -55,7 +55,7 @@
55 55
56#include "md5.h" 56#include "md5.h"
57 57
58#ifdef WORDS_BIG_ENDIAN 58#ifdef WORDS_BIGENDIAN
59# define SWAP(n) \ 59# define SWAP(n) \
60 (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24)) 60 (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
61#else 61#else
diff --git a/src/sound.c b/src/sound.c
index 55804c328a8..b93099283da 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -481,7 +481,7 @@ sound_cleanup (Lisp_Object arg)
481static u_int32_t 481static u_int32_t
482le2hl (u_int32_t value) 482le2hl (u_int32_t value)
483{ 483{
484#ifdef WORDS_BIG_ENDIAN 484#ifdef WORDS_BIGENDIAN
485 unsigned char *p = (unsigned char *) &value; 485 unsigned char *p = (unsigned char *) &value;
486 value = p[0] + (p[1] << 8) + (p[2] << 16) + (p[3] << 24); 486 value = p[0] + (p[1] << 8) + (p[2] << 16) + (p[3] << 24);
487#endif 487#endif
@@ -495,7 +495,7 @@ le2hl (u_int32_t value)
495static u_int16_t 495static u_int16_t
496le2hs (u_int16_t value) 496le2hs (u_int16_t value)
497{ 497{
498#ifdef WORDS_BIG_ENDIAN 498#ifdef WORDS_BIGENDIAN
499 unsigned char *p = (unsigned char *) &value; 499 unsigned char *p = (unsigned char *) &value;
500 value = p[0] + (p[1] << 8); 500 value = p[0] + (p[1] << 8);
501#endif 501#endif
@@ -509,7 +509,7 @@ le2hs (u_int16_t value)
509static u_int32_t 509static u_int32_t
510be2hl (u_int32_t value) 510be2hl (u_int32_t value)
511{ 511{
512#ifndef WORDS_BIG_ENDIAN 512#ifndef WORDS_BIGENDIAN
513 unsigned char *p = (unsigned char *) &value; 513 unsigned char *p = (unsigned char *) &value;
514 value = p[3] + (p[2] << 8) + (p[1] << 16) + (p[0] << 24); 514 value = p[3] + (p[2] << 8) + (p[1] << 16) + (p[0] << 24);
515#endif 515#endif
@@ -525,7 +525,7 @@ be2hl (u_int32_t value)
525static u_int16_t 525static u_int16_t
526be2hs (u_int16_t value) 526be2hs (u_int16_t value)
527{ 527{
528#ifndef WORDS_BIG_ENDIAN 528#ifndef WORDS_BIGENDIAN
529 unsigned char *p = (unsigned char *) &value; 529 unsigned char *p = (unsigned char *) &value;
530 value = p[1] + (p[0] << 8); 530 value = p[1] + (p[0] << 8);
531#endif 531#endif