diff options
author | markm <markm@FreeBSD.org> | 2002-07-16 12:28:50 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2002-07-16 12:28:50 +0000 |
commit | bedd05ccecbd002c4865f3dff35af258f0e5dd94 (patch) | |
tree | 4dcd84e724c9495af7116ae6dbbcee1b0420fb84 /lib/csu/alpha | |
parent | 4de6bef14519eb23505d35e15226e5711028252c (diff) | |
download | FreeBSD-src-bedd05ccecbd002c4865f3dff35af258f0e5dd94.zip FreeBSD-src-bedd05ccecbd002c4865f3dff35af258f0e5dd94.tar.gz |
The main reason for this is to reduce diffs between all the crt1.c's.
Assembler macros are tidied up and made as similar as sanely possible.
The macros are translated into C (__inline static) functions for lint.
Declaration orders are made the same.
Declarations are all ISOfied and tidied up.
Comment contents have gratuitous diffs removed.
The net result is a bunch of crt1.c's that are 90% the same.
It may be possible to now encapsulate the differences in one
MD header, and have only one MI crt1.c file (although the macros
to do this may be ugly).
Helpful comments by: obrien, bde
Alpha tested by: des
i386-elf tested by: markm
Diffstat (limited to 'lib/csu/alpha')
-rw-r--r-- | lib/csu/alpha/crt1.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/csu/alpha/crt1.c b/lib/csu/alpha/crt1.c index a173842..e871ab6 100644 --- a/lib/csu/alpha/crt1.c +++ b/lib/csu/alpha/crt1.c @@ -1,5 +1,5 @@ -/* - * Copyright 2001 David E. O'Brien +/*- + * Copyright 2001 David E. O'Brien. * All rights reserved. * Copyright 1996-1998 John D. Polstra. * All rights reserved. @@ -35,22 +35,25 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef lint #ifndef __GNUC__ #error "GCC is needed to compile this file" #endif +#endif /* lint */ #include <stdlib.h> + #include "libc_private.h" #include "crtbrand.c" struct Struct_Obj_Entry; struct ps_strings; -#pragma weak _DYNAMIC extern int _DYNAMIC; +#pragma weak _DYNAMIC -extern void _init(void); extern void _fini(void); +extern void _init(void); extern int main(int, char **, char **); extern void _start(char **, void (*)(void), struct Struct_Obj_Entry *, struct ps_strings *); @@ -66,18 +69,17 @@ char **environ; const char *__progname = ""; /* The entry function. */ +/* ARGSUSED */ void -_start(char **ap, - void (*cleanup)(void), /* from shared loader */ - struct Struct_Obj_Entry *obj __unused, /* from shared loader */ - struct ps_strings *ps_strings __unused) +_start(char **ap, void (*cleanup)(void), struct Struct_Obj_Entry *obj __unused, + struct ps_strings *ps_strings __unused) { int argc; char **argv; char **env; const char *s; - argc = * (long *) ap; + argc = *(long *)(void *)ap; argv = ap + 1; env = ap + 2 + argc; environ = env; |