changeset 96764:1307c33f5e9a

* ecrt0.c: Remove code depending on m68000, not used anymore. * fns.c (hash_remove): Make static. * lisp.h (hash_remove): Don't prototype. * m/ibmrs6000.h: * m/ibms390x.h: * m/macppc.h: Remove boilerplate comments. * m/sparc.h (A_TEXT_OFFSET, A_TEXT_SEEK): Remove, only used on Solaris, which does not need them. * m/vax.h: Remove comments about unsupported systems. * s/darwin.h: Reorganize ifdefs.
author Dan Nicolaescu <dann@ics.uci.edu>
date Thu, 17 Jul 2008 13:57:13 +0000
parents a27390a84360
children 8b34dc6bbff5
files src/ChangeLog src/ecrt0.c src/fns.c src/lisp.h src/m/ibmrs6000.h src/m/ibms390x.h src/m/macppc.h src/m/sparc.h src/m/vax.h src/s/darwin.h
diffstat 10 files changed, 79 insertions(+), 250 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Thu Jul 17 13:50:30 2008 +0000
+++ b/src/ChangeLog	Thu Jul 17 13:57:13 2008 +0000
@@ -1,4 +1,22 @@
-2008-07-16  Adrian Robert <Adrian.B.Robert@gmail.com>
+2008-07-17  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* ecrt0.c: Remove code depending on m68000, not used anymore.
+
+	* fns.c (hash_remove): Make static.
+	* lisp.h (hash_remove): Don't prototype.
+
+	* m/ibmrs6000.h:
+	* m/ibms390x.h:
+	* m/macppc.h: Remove boilerplate comments.
+
+	* m/sparc.h (A_TEXT_OFFSET, A_TEXT_SEEK): Remove, only used on
+	Solaris, which does not need them.
+
+	* m/vax.h: Remove comments about unsupported systems.
+
+	* s/darwin.h: Reorganize ifdefs.
+
+2008-07-17  Adrian Robert <Adrian.B.Robert@gmail.com>
 
 	* config.in
 	* dispextern.h
--- a/src/ecrt0.c	Thu Jul 17 13:50:30 2008 +0000
+++ b/src/ecrt0.c	Thu Jul 17 13:57:13 2008 +0000
@@ -39,13 +39,6 @@
 	 [next arg string]... 0 or more times
 */
 
-/* On the 16000, at least in the one 4.2 system I know about,
-  the initial data format is
-  sp ->  word containing argc
-         word containing argp
-         word pointing to first arg string, and so on as above
-*/
-
 #ifdef emacs
 #include <config.h>
 #endif
@@ -97,31 +90,12 @@
 asm("	start:		");
 #endif /* NODOT_GLOBAL_START */
 
-#ifdef m68000
-
-/* GCC 2.1, when optimization is turned off, seems to want to push a
-   word of garbage on the stack, which screws up the CRT0_DUMMIES
-   hack.  So we hand-code _start in assembly language.  */
-asm(".text			");
-asm("	.even			");
-asm(".globl __start		");
-asm("__start:			");
-asm("	link a6,#0		");
-asm("	jbsr _start1		");
-asm("	unlk a6			");
-asm("	rts			");
-
-#else /* not m68000 */
-
 _start ()
 {
 /* On vax, nothing is pushed here  */
-/* On sequent, bogus fp is pushed here  */
   start1 ();
 }
 
-#endif /* possibly m68000 */
-
 static
 start1 (CRT0_DUMMIES argc, xargv)
      int argc;
@@ -140,9 +114,7 @@
 }
 #else /* not CRT0_DUMMIES */
 
-/* "m68k" and "m68000" both stand for m68000 processors,
-   but with different program-entry conventions.
-   This is a kludge.  Now that the CRT0_DUMMIES mechanism above exists,
+/* This is a kludge.  Now that the CRT0_DUMMIES mechanism above exists,
    most of these machines could use the vax code above
    with some suitable definition of CRT0_DUMMIES.
    Then the symbol m68k could be flushed.
@@ -162,29 +134,10 @@
 	asm ("	jsr	exit");
 	asm ("	mov.l	&1,%d0");	/* d0 = 1 => exit */
 	asm ("	trap	&0");
-#else /* m68000, not m68k */
 
-#ifdef m68000
-
-_start ()
-{
-#ifdef sun
-  finitfp_();
-#endif
-/* On 68000, _start pushes a6 onto stack  */
-  start1 ();
-}
-#endif /* m68000 */
-#endif /* m68k */
-
-#if defined(m68k) || defined(m68000)
 /* ignore takes care of skipping the a6 value pushed in start.  */
 static
-#if defined(m68k)
 start1 (argc, xargv)
-#else
-start1 (ignore, argc, xargv)
-#endif
      int argc;
      char *xargv;
 {
@@ -196,7 +149,7 @@
   exit (main (argc, argv, environ));
 }
 
-#endif /* m68k or m68000 */
+#endif /* m68k */
 
 #endif /* not CRT0_DUMMIES */
 
--- a/src/fns.c	Thu Jul 17 13:50:30 2008 +0000
+++ b/src/fns.c	Thu Jul 17 13:57:13 2008 +0000
@@ -4204,7 +4204,7 @@
 
 /* Remove the entry matching KEY from hash table H, if there is one.  */
 
-void
+static void
 hash_remove (h, key)
      struct Lisp_Hash_Table *h;
      Lisp_Object key;
--- a/src/lisp.h	Thu Jul 17 13:50:30 2008 +0000
+++ b/src/lisp.h	Thu Jul 17 13:57:13 2008 +0000
@@ -2354,7 +2354,6 @@
 int hash_lookup P_ ((struct Lisp_Hash_Table *, Lisp_Object, unsigned *));
 int hash_put P_ ((struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object,
 		  unsigned));
-void hash_remove P_ ((struct Lisp_Hash_Table *, Lisp_Object));
 void hash_clear P_ ((struct Lisp_Hash_Table *));
 void remove_hash_entry P_ ((struct Lisp_Hash_Table *, int));
 extern void init_fns P_ ((void));
--- a/src/m/ibmrs6000.h	Thu Jul 17 13:50:30 2008 +0000
+++ b/src/m/ibmrs6000.h	Thu Jul 17 13:57:13 2008 +0000
@@ -22,15 +22,6 @@
    operating system this machine is likely to run.
    USUAL-OPSYS="aix3-1"  */
 
-/* Define WORDS_BIG_ENDIAN if lowest-numbered byte in a word
-   is the most significant byte.  */
-
-#ifdef USG5_4
-#undef WORDS_BIG_ENDIAN
-#else
-#define WORDS_BIG_ENDIAN
-#endif
-
 /* Define NO_ARG_ARRAY if you cannot take the address of the first of a
  * group of arguments and treat it as an array of the arguments.  */
 
@@ -49,33 +40,40 @@
 
 #define NO_REMAP
 
-#ifndef USG5_4
-#define TEXT_START 0x10000000
-#define TEXT_END 0
-#define DATA_START 0x20000000
-#define DATA_END 0
-#endif
-
 /* The data segment in this machine always starts at address 0x20000000.
    An address of data cannot be stored correctly in a Lisp object;
    we always lose the high bits.  We must tell XPNTR to add them back.  */
 
 #ifndef USG5_4
+#define TEXT_START 0x10000000
+#define TEXT_END 0
+#define DATA_START 0x20000000
+#define DATA_END 0
+#define WORDS_BIG_ENDIAN
 #define DATA_SEG_BITS 0x20000000
-#else
-#define DATA_SEG_BITS 0
+#define C_SWITCH_MACHINE -D_BSD
+
+/* sfreed@unm.edu says add -bI:/usr/lpp/X11/bin/smt.exp for AIX 3.2.4.  */
+/* marc@sti.com (Marc Pawliger) says ibmrs6000.inp is needed to avoid
+   linker error for updated X11R5 libraries, which references pthread library
+   which most machines don't have.  We use the name .inp instead of .imp
+   because .inp is a better convention to use in make-dist for naming
+   random input files.  */
+#ifdef THIS_IS_MAKEFILE /* Don't use this in configure.  */
+#define LD_SWITCH_MACHINE -Wl,-bnodelcsect
+#endif /* THIS_IS_MAKEFILE */
+
+/* Avoid gcc 2.7.x collect2 bug by using /bin/ld instead.  */
+#if __GNUC__ == 2 && __GNUC_MINOR__ == 7
+#define LD_SWITCH_SITE -B/bin/
 #endif
 
-#undef ADDR_CORRECT
-#define ADDR_CORRECT(x) ((int)(x))
-
-/* Here override various assumptions in ymakefile */
-
-#ifndef USG5
-#define C_SWITCH_MACHINE -D_BSD
+#ifndef NLIST_STRUCT
+/* AIX supposedly doesn't use this interface, but on the RS/6000
+   it apparently does.  */
+#define NLIST_STRUCT
 #endif
 
-#ifdef AIX
 /* -lpthreads seems to be necessary for Xlib in X11R6, and should be harmless
    on older versions of X where it happens to exist.  */
 #ifdef HAVE_LIBPTHREADS
@@ -84,13 +82,15 @@
 /* IBM's X11R5 use -lIM and -liconv in AIX 3.2.2.  */
 #define LIBS_MACHINE -lrts -lIM -liconv
 #endif
-#else
-#ifdef USG5_4
+
+#else /* USG5_4 */
+#undef WORDS_BIG_ENDIAN
+#define DATA_SEG_BITS 0
 #define LIBS_MACHINE
-#else
-#define LIBS_MACHINE -lIM
-#endif
-#endif
+#endif /* USG5_4 */
+
+#undef ADDR_CORRECT
+#define ADDR_CORRECT(x) ((int)(x))
 
 #define START_FILES
 /*** BUILD 9008 - FIONREAD problem still exists in X-Windows. ***/
@@ -106,36 +106,5 @@
 
 #define ORDINARY_LINK
 
-#ifndef USG5_4
-/* sfreed@unm.edu says add -bI:/usr/lpp/X11/bin/smt.exp for AIX 3.2.4.  */
-/* marc@sti.com (Marc Pawliger) says ibmrs6000.inp is needed to avoid
-   linker error for updated X11R5 libraries, which references pthread library
-   which most machines don't have.  We use the name .inp instead of .imp
-   because .inp is a better convention to use in make-dist for naming
-   random input files.  */
-#ifdef THIS_IS_MAKEFILE /* Don't use this in configure.  */
-#ifdef AIX
-#define LD_SWITCH_MACHINE -Wl,-bnodelcsect
-#else /* not AIX */
-#ifdef HAVE_AIX_SMT_EXP
-#define LD_SWITCH_MACHINE -Wl,-bnso,-bnodelcsect,-bI:/lib/syscalls.exp,-bI:$(srcdir)/m/ibmrs6000.inp,-bI:/usr/lpp/X11/bin/smt.exp
-#else
-#define LD_SWITCH_MACHINE -Wl,-bnso,-bnodelcsect,-bI:/lib/syscalls.exp,-bI:$(srcdir)/m/ibmrs6000.inp
-#endif
-#endif /* not AIX */
-#endif /* THIS_IS_MAKEFILE */
-
-/* Avoid gcc 2.7.x collect2 bug by using /bin/ld instead.  */
-#if __GNUC__ == 2 && __GNUC_MINOR__ == 7
-#define LD_SWITCH_SITE -B/bin/
-#endif
-
-#ifndef NLIST_STRUCT
-/* AIX supposedly doesn't use this interface, but on the RS/6000
-   it apparently does.  */
-#define NLIST_STRUCT
-#endif
-#endif /* USG5_4 */
-
 /* arch-tag: 028318ee-a7ae-4a08-804d-cc1e6588d003
    (do not change this comment) */
--- a/src/m/ibms390x.h	Thu Jul 17 13:50:30 2008 +0000
+++ b/src/m/ibms390x.h	Thu Jul 17 13:57:13 2008 +0000
@@ -87,30 +87,6 @@
 
 #undef NO_REMAP
 
-/* Some really obscure 4.2-based systems (like Sequent DYNIX)
- * do not support asynchronous I/O (using SIGIO) on sockets,
- * even though it works fine on tty's.  If you have one of
- * these systems, define the following, and then use it in
- * config.h (or elsewhere) to decide when (not) to use SIGIO.
- *
- * You'd think this would go in an operating-system description file,
- * but since it only occurs on some, but not all, BSD systems, the
- * reasonable place to select for it is in the machine description
- * file.
- */
-
-#undef NO_SOCK_SIGIO
-
-
-/* After adding support for a new system, modify the large case
-   statement in the `configure' script to recognize reasonable
-   configuration names, and add a description of the system to
-   `etc/MACHINES'.
-
-   If you've just fixed a problem in an existing configuration file,
-   you should also check `etc/MACHINES' to make sure its descriptions
-   of known problems in that configuration should be updated.  */
-
 /* On the 64 bit architecture, we can use 60 bits for addresses */
 
 #define VALBITS         60
--- a/src/m/macppc.h	Thu Jul 17 13:50:30 2008 +0000
+++ b/src/m/macppc.h	Thu Jul 17 13:57:13 2008 +0000
@@ -27,11 +27,6 @@
 
 #define NO_ARG_ARRAY
 
-/* Now define a symbol for the cpu type, if your compiler
-   does not define it automatically:
-   Ones defined so far include vax, m68000, ns16000, pyramid,
-   orion, tahoe, APOLLO and many others */
-
 /* Data type of load average, as read out of kmem.  */
 
 #define LOAD_AVE_TYPE long
@@ -40,20 +35,6 @@
 
 #define LOAD_AVE_CVT(x) (int) (((double) (x)) * 100.0 / FSCALE)
 
-/* Some really obscure 4.2-based systems (like Sequent DYNIX)
- * do not support asynchronous I/O (using SIGIO) on sockets,
- * even though it works fine on tty's.  If you have one of
- * these systems, define the following, and then use it in
- * config.h (or elsewhere) to decide when (not) to use SIGIO.
- *
- * You'd think this would go in an operating-system description file,
- * but since it only occurs on some, but not all, BSD systems, the
- * reasonable place to select for it is in the machine description
- * file.
- */
-
-/* #define NO_SOCK_SIGIO */
-
 #if defined (GNU_LINUX) || defined (__NetBSD__) || defined (__OpenBSD__)
 # define TEXT_END ({ extern int _etext; &_etext; })
 #endif
--- a/src/m/sparc.h	Thu Jul 17 13:50:30 2008 +0000
+++ b/src/m/sparc.h	Thu Jul 17 13:57:13 2008 +0000
@@ -55,21 +55,6 @@
 
 #define SEGMENT_MASK (SEGSIZ - 1)
 
-#if !defined (__NetBSD__) && !defined (__linux__) && !defined (__OpenBSD__)
-/* This really belongs in s/sun.h.  */
-
-/* Say that the text segment of a.out includes the header;
-   the header actually occupies the first few bytes of the text segment
-   and is counted in hdr.a_text.  */
-
-#define A_TEXT_OFFSET(HDR) sizeof (HDR)
-
-/* This is the offset of the executable's text, from the start of the file.  */
-
-#define A_TEXT_SEEK(HDR) (N_TXTOFF (hdr) + sizeof (hdr))
-
-#endif /* not __NetBSD__ and not __linux__ and not __OpenBSD__ */
-
 #ifdef __arch64__		/* GCC, 64-bit ABI.  */
 #define BITS_PER_LONG 64
 #ifdef __linux__
--- a/src/m/vax.h	Thu Jul 17 13:50:30 2008 +0000
+++ b/src/m/vax.h	Thu Jul 17 13:57:13 2008 +0000
@@ -25,24 +25,6 @@
 NOTE-START
 The vax (-machine=vax) runs zillions of different operating systems.
 
-Vax running Berkeley Unix (-opsystem=bsd4-1, -opsystem=bsd4-2 or
-			   -opsystem=bsd4-3)
-
-  Works.
-
-Vax running Ultrix (-opsystem=bsd4-2)
-
-  Works.  See under Ultrix in share-lib/MACHINES for problems using X
-  windows on Ultrix.
-
-Vax running System V rel 2 (-opsystem=usg5-2)
-
-  18.27 Works.
-
-Vax running System V rel 0 (-opsystem=usg5-0)
-
-  Works as of 18.36.
-
 Vax running VMS (-opsystem=vms)
 
   18.36 believed to work.  Addition of features is necessary to make
--- a/src/s/darwin.h	Thu Jul 17 13:50:30 2008 +0000
+++ b/src/s/darwin.h	Thu Jul 17 13:57:13 2008 +0000
@@ -26,16 +26,12 @@
 #define BSD4_2
 /* BSD4_3 and BSD4_4 are already defined in sys/param.h */
 #define BSD_SYSTEM
-/* #define VMS */
 
 /* MAC_OS is used to conditionally compile code common to both MAC_OS8
    and MAC_OSX.  */
 #ifdef MAC_OSX
 #ifdef HAVE_CARBON
 #define MAC_OS
-/* We need a little extra space, see ../../lisp/loadup.el. */
-#define SYSTEM_PURESIZE_EXTRA 30000
-
 #endif
 #endif
 
@@ -85,7 +81,6 @@
  */
 
 #define HAVE_TERMIOS
-/* #define HAVE_TERMIO */
 
 #define NO_TERMIO
 
@@ -128,27 +123,6 @@
 
 #define CLASH_DETECTION
 
-/* ============================================================ */
-
-/* Here, add any special hacks needed
-   to make Emacs work on this system.  For example,
-   you might define certain system call names that don't
-   exist on your system, or that do different things on
-   your system and must be used only through an encapsulation
-   (Which you should place, by convention, in sysdep.c).  */
-
-/* ============================================================ */
-
-/* After adding support for a new system, modify the large case
-   statement in the `configure' script to recognize reasonable
-   configuration names, and add a description of the system to
-   `etc/MACHINES'.
-
-   If you've just fixed a problem in an existing configuration file,
-   you should also check `etc/MACHINES' to make sure its descriptions
-   of known problems in that configuration should be updated.  */
-
-
 /* Avoid the use of the name init_process (process.c) because it is
    also the name of a Mach system call.  */
 #define init_process emacs_init_process
@@ -198,27 +172,36 @@
 
 /* Definitions for how to compile & link.  */
 
-/* This is for the Carbon port.  Under the NeXTstep port, this is still picked
-   up during preprocessing, but is undone in config.in. */
-#ifndef HAVE_NS
-#define C_SWITCH_SYSTEM -fpascal-strings -DMAC_OSX
-#endif
-
 /* Link in the Carbon or AppKit lib. */
 #ifdef HAVE_NS
+/* PENDING: can this target be specified in a clearer way? */
+#define OTHER_FILES ns-app
 /* XXX: lresolv is here because configure when testing #undefs res_init,
         a macro in /usr/include/resolv.h for res_9_init, not in stdc lib. */
 #define LIBS_MACGUI -framework AppKit -lresolv
 #define SYSTEM_PURESIZE_EXTRA 200000
 #define HEADERPAD_EXTRA 6C8
-#else
+#else /* !HAVE_NS */
 #define HEADERPAD_EXTRA 690
 
+/* This is for the Carbon port.  Under the NeXTstep port, this is still picked
+   up during preprocessing, but is undone in config.in. */
+#define C_SWITCH_SYSTEM -fpascal-strings -DMAC_OSX
+
 #ifdef HAVE_CARBON
 
+/* We need a little extra space, see ../../lisp/loadup.el. */
+#define SYSTEM_PURESIZE_EXTRA 30000
+
+/* Link in the Carbon lib. */
+#define LIBS_MACGUI -framework Carbon LIBS_IMAGE
+
 #ifdef HAVE_AVAILABILITYMACROS_H
 #include <AvailabilityMacros.h>
 #endif
+/* Tell src/Makefile.in to create files in the Mac OS X application
+   bundle mac/Emacs.app.  */
+#define OTHER_FILES macosx-app
 
 /* Whether to use the Image I/O framework for reading images.  */
 #ifndef USE_MAC_IMAGE_IO
@@ -234,14 +217,17 @@
 #define LIBS_IMAGE -framework QuickTime
 #endif
 
+/* Reroute calls to SELECT to the version defined in mac.c to fix the
+   problem of Emacs requiring an extra return to be typed to start
+   working when started from the command line.  */
+#if defined (emacs) || defined (temacs)
+#define select sys_select
+#endif
+
+#else   /* !HAVE_CARBON */
+#define LIBS_MACGUI
 #endif	/* HAVE_CARBON */
 
-/* Link in the Carbon lib. */
-#ifdef HAVE_CARBON
-#define LIBS_MACGUI -framework Carbon LIBS_IMAGE
-#else
-#define LIBS_MACGUI
-#endif /* !HAVE_CARBON */
 #endif /* !HAVE_NS */
 
 /* The -headerpad option tells ld (see man page) to leave room at the
@@ -271,18 +257,6 @@
 /* Adding -lm confuses the dynamic linker, so omit it.  */
 #define LIB_MATH
 
-/* Tell src/Makefile.in to create files in the Mac OS X application
-   bundle mac/Emacs.app.  */
-#ifdef HAVE_CARBON
-#define OTHER_FILES macosx-app
-#endif
-
-/* PENDING: can this target be specified in a clearer way? */
-#ifdef HAVE_NS
-#define OTHER_FILES ns-app
-#endif
-
-
 /* Define the following so emacs symbols will not conflict with those
    in the System framework.  Otherwise -prebind will not work.  */
 
@@ -292,7 +266,6 @@
 /* Do not define matherr in floatfns.c.  */
 #define NO_MATHERR
 
-
 /* The following solves the problem that Emacs hangs when evaluating
    (make-comint "test0" "/nodir/nofile" nil "") when /nodir/nofile
    does not exist.  */
@@ -314,13 +287,6 @@
    handlers correctly.  Suggested by Nozomu Ando.*/
 #define POSIX_SIGNALS
 
-/* Reroute calls to SELECT to the version defined in mac.c to fix the
-   problem of Emacs requiring an extra return to be typed to start
-   working when started from the command line.  */
-#if defined (HAVE_CARBON) && (defined (emacs) || defined (temacs))
-#define select sys_select
-#endif
-
 /* Use the GC_MAKE_GCPROS_NOOPS (see lisp.h) method for marking the
    stack.  */
 #define GC_MARK_STACK   GC_MAKE_GCPROS_NOOPS