Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Mar 2010 13:28:05 +0000 (UTC)
From:      Ulrich Spoerlein <uqs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r204756 - in head/lib/csu: amd64 arm mips powerpc sparc64
Message-ID:  <201003051328.o25DS5o6009614@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: uqs
Date: Fri Mar  5 13:28:05 2010
New Revision: 204756
URL: http://svn.freebsd.org/changeset/base/204756

Log:
  Properly declare non-extern functions in crt1
  
  Also move the declarations after __progname consistently to
  make the distinction clearer.
  
  Reviewed by:	jmallett
  Approved by:	ed (co-mentor)

Modified:
  head/lib/csu/amd64/crt1.c
  head/lib/csu/arm/crt1.c
  head/lib/csu/mips/crt1.c
  head/lib/csu/powerpc/crt1.c
  head/lib/csu/sparc64/crt1.c

Modified: head/lib/csu/amd64/crt1.c
==============================================================================
--- head/lib/csu/amd64/crt1.c	Fri Mar  5 13:13:35 2010	(r204755)
+++ head/lib/csu/amd64/crt1.c	Fri Mar  5 13:28:05 2010	(r204756)
@@ -43,7 +43,6 @@ typedef void (*fptr)(void);
 extern void _fini(void);
 extern void _init(void);
 extern int main(int, char **, char **);
-extern void _start(char **, void (*)(void));
 
 #ifdef GCRT
 extern void _mcleanup(void);
@@ -55,6 +54,8 @@ extern int etext;
 char **environ;
 const char *__progname = "";
 
+void _start(char **, void (*)(void));
+
 /* The entry function. */
 void
 _start(char **ap, void (*cleanup)(void))

Modified: head/lib/csu/arm/crt1.c
==============================================================================
--- head/lib/csu/arm/crt1.c	Fri Mar  5 13:13:35 2010	(r204755)
+++ head/lib/csu/arm/crt1.c	Fri Mar  5 13:28:05 2010	(r204756)
@@ -74,6 +74,9 @@ char **environ;
 const char *__progname = "";
 struct ps_strings *__ps_strings;
 
+void __start(int, char **, char **, struct ps_strings *,
+    const struct Struct_Obj_Entry *, void (*)(void));
+
 /* The entry function. */
 __asm("	.text			\n"
 "	.align	0		\n"

Modified: head/lib/csu/mips/crt1.c
==============================================================================
--- head/lib/csu/mips/crt1.c	Fri Mar  5 13:13:35 2010	(r204755)
+++ head/lib/csu/mips/crt1.c	Fri Mar  5 13:28:05 2010	(r204756)
@@ -66,6 +66,8 @@ extern int etext;
 char **environ;
 const char *__progname = "";
 
+void __start(char **, void (*)(void), struct Struct_Obj_Entry *, struct ps_strings *);
+
 /* The entry function. */
 void
 __start(char **ap,

Modified: head/lib/csu/powerpc/crt1.c
==============================================================================
--- head/lib/csu/powerpc/crt1.c	Fri Mar  5 13:13:35 2010	(r204755)
+++ head/lib/csu/powerpc/crt1.c	Fri Mar  5 13:28:05 2010	(r204756)
@@ -59,8 +59,6 @@ extern int _DYNAMIC;
 extern void _fini(void);
 extern void _init(void);
 extern int main(int, char **, char **);
-extern void _start(int, char **, char **, const struct Struct_Obj_Entry *,
-    void (*)(void), struct ps_strings *);
 
 #ifdef GCRT
 extern void _mcleanup(void);
@@ -73,6 +71,9 @@ char **environ;
 const char *__progname = "";
 struct ps_strings *__ps_strings;
 
+void _start(int, char **, char **, const struct Struct_Obj_Entry *,
+    void (*)(void), struct ps_strings *);
+
 /* The entry function. */
 /*
  * First 5 arguments are specified by the PowerPC SVR4 ABI.

Modified: head/lib/csu/sparc64/crt1.c
==============================================================================
--- head/lib/csu/sparc64/crt1.c	Fri Mar  5 13:13:35 2010	(r204755)
+++ head/lib/csu/sparc64/crt1.c	Fri Mar  5 13:28:05 2010	(r204756)
@@ -50,8 +50,6 @@ extern int _DYNAMIC;
 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 *);
 extern void __sparc_utrap_setup(void);
 
 #ifdef GCRT
@@ -64,6 +62,9 @@ extern int etext;
 char **environ;
 const char *__progname = "";
 
+void _start(char **, void (*)(void), struct Struct_Obj_Entry *,
+    struct ps_strings *);
+
 /* The entry function. */
 /*
  * %o0 holds ps_strings pointer.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003051328.o25DS5o6009614>