changeset 108091:992e676c0285

Simplify m/intel386.h. * m/intel386.h (CRT0_DUMMIES): Remove, inline value in the only user: ecrt0.c. (SOLARIS2): Remove LOAD_AVE_TYPE, LOAD_AVE_CVT, LIBS_MACHINE, unused. (USG5_4): Move LOAD_AVE_TYPE, LOAD_AVE_CVT, FSCALE definitions to the only user: s/unixware.h. * ecrt0.c: Remove #ifndef static. Inline CRT0_DUMMIES definition from m/intel386.h. * s/unixware.h (LOAD_AVE_TYPE, LOAD_AVE_CVT, FSCALE): Definitions moved here from m/intel386.h.
author Dan Nicolaescu <dann@ics.uci.edu>
date Fri, 23 Apr 2010 15:14:14 -0700
parents b8f821937636
children a1271a8f377e
files src/ChangeLog src/ecrt0.c src/m/intel386.h src/s/unixware.h
diffstat 4 files changed, 23 insertions(+), 47 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Fri Apr 23 14:58:07 2010 -0700
+++ b/src/ChangeLog	Fri Apr 23 15:14:14 2010 -0700
@@ -1,5 +1,16 @@
 2010-04-23  Dan Nicolaescu  <dann@ics.uci.edu>
 
+	Simplify m/intel386.h.
+	* m/intel386.h (CRT0_DUMMIES): Remove, inline value in the only
+	user: ecrt0.c.
+	(SOLARIS2): Remove LOAD_AVE_TYPE, LOAD_AVE_CVT, LIBS_MACHINE, unused.
+	(USG5_4): Move LOAD_AVE_TYPE, LOAD_AVE_CVT, FSCALE definitions to
+	the only user: s/unixware.h.
+	* ecrt0.c: Remove #ifndef static.  Inline CRT0_DUMMIES definition
+	from m/intel386.h.
+	* s/unixware.h (LOAD_AVE_TYPE, LOAD_AVE_CVT, FSCALE): Definitions
+	moved here from m/intel386.h.
+
 	* m/mips.h: Remove #if 0 code.
 
 2010-04-23  Eli Zaretskii  <eliz@gnu.org>
--- a/src/ecrt0.c	Fri Apr 23 14:58:07 2010 -0700
+++ b/src/ecrt0.c	Fri Apr 23 15:14:14 2010 -0700
@@ -61,15 +61,7 @@
 
 char **environ;
 
-#ifndef static
-/* On systems where the static storage class is usable, this function
-   should be declared as static.  Otherwise, the static keyword has
-   been defined to be something else, and code for those systems must
-   take care of this declaration appropriately.  */
 static start1 ();
-#endif
-
-#ifdef CRT0_DUMMIES
 
 /* Define symbol "start": here; some systems want that symbol.  */
 asm("	.text		");
@@ -83,7 +75,7 @@
 }
 
 static
-start1 (CRT0_DUMMIES argc, xargv)
+start1 (bogus_fp, argc, xargv)
      int argc;
      char *xargv;
 {
@@ -98,7 +90,6 @@
      and optimize it out.  */
   (void) &start1;
 }
-#endif /* CRT0_DUMMIES */
 
 /* arch-tag: 4025c2fb-d6b1-4d29-b1b6-8100b6bd1e74
    (do not change this comment) */
--- a/src/m/intel386.h	Fri Apr 23 14:58:07 2010 -0700
+++ b/src/m/intel386.h	Fri Apr 23 15:14:14 2010 -0700
@@ -44,43 +44,6 @@
 
 /* #define NO_ARG_ARRAY */
 
-/* crt0.c, if it is used, should use the i386-bsd style of entry.
-   with no extra dummy args.  On USG and XENIX,
-   NO_REMAP says this isn't used. */
-
-#define CRT0_DUMMIES bogus_fp,
-
-#ifdef SOLARIS2
-/* Data type of load average, as read out of kmem.  */
-#define LOAD_AVE_TYPE long
-
-/* Convert that into an integer that is 100 for a load average of 1.0  */
-/* This is totally uncalibrated. */
-#define LOAD_AVE_CVT(x) ((int) (((double) (x)) * 100.0 / FSCALE))
-
-/* J.W.Hawtin@lut.ac.uk say Solaris 2.4 as well as Solaris 2.1 on X86
-   requires -lkvm as well.
-   And handa@etl.gov.jp says that -lkvm needs -llelf, at least on 2.5.  */
-#define LIBS_MACHINE -lkvm -lelf
-
-/* configure thinks solaris X86 has gethostname, but it does not work,
-   so undefine it.  */
-#undef HAVE_GETHOSTNAME
-
-#else /* not SOLARIS2 */
-#ifdef USG5_4 /* Older USG systems do not support the load average.  */
-/* Data type of load average, as read out of kmem.  */
-
-#define LOAD_AVE_TYPE long
-
-/* Convert that into an integer that is 100 for a load average of 1.0  */
-/* This is totally uncalibrated. */
-
-#define LOAD_AVE_CVT(x) ((int) (((double) (x)) * 100.0 / FSCALE))
-#define FSCALE 256.0
-#endif /* USG5_4 */
-#endif /* not SOLARIS2 */
-
 #ifdef USG
 #define TEXT_START 0
 #endif /* USG */
--- a/src/s/unixware.h	Fri Apr 23 14:58:07 2010 -0700
+++ b/src/s/unixware.h	Fri Apr 23 15:14:14 2010 -0700
@@ -67,6 +67,17 @@
    (do not change this comment) */
 
 
+/* Data type of load average, as read out of kmem.  */
+
+#define LOAD_AVE_TYPE long
+
+/* Convert that into an integer that is 100 for a load average of 1.0  */
+/* This is totally uncalibrated. */
+
+#define LOAD_AVE_CVT(x) ((int) (((double) (x)) * 100.0 / FSCALE))
+#define FSCALE 256.0
+
+
 #define	PENDING_OUTPUT_COUNT(FILE) ((FILE)->__ptr - (FILE)->__base)
 
 /* arch-tag: d82e92e7-9443-4a60-a581-7f293cbae8a3