diff options
| author | Dan Nicolaescu | 2010-04-02 17:06:38 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-04-02 17:06:38 -0700 |
| commit | c435b43224dd85c1c13cc982349a009e6d007d0e (patch) | |
| tree | 3cec7204e9e49da63dbca2ae24f0837decba644f /src | |
| parent | 9c13a46e078433f59c6e7e0532c13a1fa3340ec9 (diff) | |
| download | emacs-c435b43224dd85c1c13cc982349a009e6d007d0e.tar.gz emacs-c435b43224dd85c1c13cc982349a009e6d007d0e.zip | |
* ecrt0.c: Remove MSDOS, m68k and __sparc__ conditionals, file not
used on those platforms.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/ecrt0.c | 67 |
2 files changed, 6 insertions, 66 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8859a10ad7a..8287e453ba3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-04-03 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | * ecrt0.c: Remove MSDOS, m68k and __sparc__ conditionals, file not | ||
| 4 | used on those platforms. | ||
| 5 | |||
| 1 | 2010-04-02 Dan Nicolaescu <dann@ics.uci.edu> | 6 | 2010-04-02 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 7 | ||
| 3 | Remove extern errno declarations. | 8 | Remove extern errno declarations. |
diff --git a/src/ecrt0.c b/src/ecrt0.c index 40549884935..0d7d26d3685 100644 --- a/src/ecrt0.c +++ b/src/ecrt0.c | |||
| @@ -59,9 +59,7 @@ And always: | |||
| 59 | 59 | ||
| 60 | int data_start = 0; | 60 | int data_start = 0; |
| 61 | 61 | ||
| 62 | #ifndef MSDOS | ||
| 63 | char **environ; | 62 | char **environ; |
| 64 | #endif | ||
| 65 | 63 | ||
| 66 | #ifndef static | 64 | #ifndef static |
| 67 | /* On systems where the static storage class is usable, this function | 65 | /* On systems where the static storage class is usable, this function |
| @@ -100,70 +98,7 @@ start1 (CRT0_DUMMIES argc, xargv) | |||
| 100 | and optimize it out. */ | 98 | and optimize it out. */ |
| 101 | (void) &start1; | 99 | (void) &start1; |
| 102 | } | 100 | } |
| 103 | #else /* not CRT0_DUMMIES */ | 101 | #endif /* CRT0_DUMMIES */ |
| 104 | |||
| 105 | /* This is a kludge. Now that the CRT0_DUMMIES mechanism above exists, | ||
| 106 | most of these machines could use the vax code above | ||
| 107 | with some suitable definition of CRT0_DUMMIES. | ||
| 108 | Then the symbol m68k could be flushed. | ||
| 109 | But I don't want to risk breaking these machines | ||
| 110 | in a version 17 patch release, so that change is being put off. */ | ||
| 111 | |||
| 112 | #ifdef m68k /* Can't do it all from C */ | ||
| 113 | asm (" global _start"); | ||
| 114 | asm (" text"); | ||
| 115 | asm ("_start:"); | ||
| 116 | asm (" comm splimit%,4"); | ||
| 117 | asm (" global exit"); | ||
| 118 | asm (" text"); | ||
| 119 | asm (" mov.l %d0,splimit%"); | ||
| 120 | asm (" jsr start1"); | ||
| 121 | asm (" mov.l %d0,(%sp)"); | ||
| 122 | asm (" jsr exit"); | ||
| 123 | asm (" mov.l &1,%d0"); /* d0 = 1 => exit */ | ||
| 124 | asm (" trap &0"); | ||
| 125 | |||
| 126 | /* ignore takes care of skipping the a6 value pushed in start. */ | ||
| 127 | static | ||
| 128 | start1 (argc, xargv) | ||
| 129 | int argc; | ||
| 130 | char *xargv; | ||
| 131 | { | ||
| 132 | register char **argv = &xargv; | ||
| 133 | environ = argv + argc + 1; | ||
| 134 | |||
| 135 | if ((char *)environ == xargv) | ||
| 136 | environ--; | ||
| 137 | exit (main (argc, argv, environ)); | ||
| 138 | } | ||
| 139 | |||
| 140 | #endif /* m68k */ | ||
| 141 | |||
| 142 | #endif /* not CRT0_DUMMIES */ | ||
| 143 | |||
| 144 | #ifdef __sparc__ | ||
| 145 | asm (".global __start"); | ||
| 146 | asm (".text"); | ||
| 147 | asm ("__start:"); | ||
| 148 | asm (" mov 0, %fp"); | ||
| 149 | asm (" ld [%sp + 64], %o0"); | ||
| 150 | asm (" add %sp, 68, %o1"); | ||
| 151 | asm (" sll %o0, 2, %o2"); | ||
| 152 | asm (" add %o2, 4, %o2"); | ||
| 153 | asm (" add %o1, %o2, %o2"); | ||
| 154 | asm (" sethi %hi(_environ), %o3"); | ||
| 155 | asm (" st %o2, [%o3+%lo(_environ)]"); | ||
| 156 | asm (" andn %sp, 7, %sp"); | ||
| 157 | asm (" call _main"); | ||
| 158 | asm (" sub %sp, 24, %sp"); | ||
| 159 | asm (" call __exit"); | ||
| 160 | asm (" nop"); | ||
| 161 | |||
| 162 | #endif /* __sparc__ */ | ||
| 163 | |||
| 164 | #if __FreeBSD__ == 2 | ||
| 165 | char *__progname; | ||
| 166 | #endif | ||
| 167 | 102 | ||
| 168 | /* arch-tag: 4025c2fb-d6b1-4d29-b1b6-8100b6bd1e74 | 103 | /* arch-tag: 4025c2fb-d6b1-4d29-b1b6-8100b6bd1e74 |
| 169 | (do not change this comment) */ | 104 | (do not change this comment) */ |