diff --git a/src/ChangeLog b/src/ChangeLog index b5464d9f8d4..b88ea4108ae 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,16 @@ 2010-04-23 Dan Nicolaescu + 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 diff --git a/src/ecrt0.c b/src/ecrt0.c index 0d7d26d3685..458771319c7 100644 --- a/src/ecrt0.c +++ b/src/ecrt0.c @@ -61,15 +61,7 @@ int data_start = 0; 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 @@ _start () } static -start1 (CRT0_DUMMIES argc, xargv) +start1 (bogus_fp, argc, xargv) int argc; char *xargv; { @@ -98,7 +90,6 @@ start1 (CRT0_DUMMIES argc, xargv) and optimize it out. */ (void) &start1; } -#endif /* CRT0_DUMMIES */ /* arch-tag: 4025c2fb-d6b1-4d29-b1b6-8100b6bd1e74 (do not change this comment) */ diff --git a/src/m/intel386.h b/src/m/intel386.h index dc50d5ea6a2..1bf3462d2ad 100644 --- a/src/m/intel386.h +++ b/src/m/intel386.h @@ -44,43 +44,6 @@ NOTE-END */ /* #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 */ diff --git a/src/s/unixware.h b/src/s/unixware.h index 9fedb426868..27fd41b7416 100644 --- a/src/s/unixware.h +++ b/src/s/unixware.h @@ -67,6 +67,17 @@ along with GNU Emacs. If not, see . */ (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