Commit 3cc22c31 by Jeffrey A Law Committed by Jeff Law

crtstuff.c: Use ANSI function definitions.

        * crtstuff.c: Use ANSI function definitions.  Fix minor whitespace
        problems.

From-SVN: r25914
parent e08a8f45
Tue Mar 23 00:39:14 1999 Jeffrey A Law (law@cygnus.com) Tue Mar 23 00:39:14 1999 Jeffrey A Law (law@cygnus.com)
* crtstuff.c: Use ANSI function definitions. Fix minor whitespace
problems.
* i386/openbsd.h (TARGET_DEFAULT): Define. * i386/openbsd.h (TARGET_DEFAULT): Define.
* configure.in: Do not set TARGET_CPU_DEFAULT for x86 OpenBSD * configure.in: Do not set TARGET_CPU_DEFAULT for x86 OpenBSD
configurations. configurations.
......
...@@ -157,7 +157,7 @@ typedef void (*func_ptr) (void); ...@@ -157,7 +157,7 @@ typedef void (*func_ptr) (void);
static char __EH_FRAME_BEGIN__[]; static char __EH_FRAME_BEGIN__[];
static func_ptr __DTOR_LIST__[]; static func_ptr __DTOR_LIST__[];
static void static void
__do_global_dtors_aux () __do_global_dtors_aux (void)
{ {
static func_ptr *p = __DTOR_LIST__ + 1; static func_ptr *p = __DTOR_LIST__ + 1;
static int completed = 0; static int completed = 0;
...@@ -182,7 +182,7 @@ __do_global_dtors_aux () ...@@ -182,7 +182,7 @@ __do_global_dtors_aux ()
/* Stick a call to __do_global_dtors_aux into the .fini section. */ /* Stick a call to __do_global_dtors_aux into the .fini section. */
static void __attribute__ ((__unused__)) static void __attribute__ ((__unused__))
fini_dummy () fini_dummy (void)
{ {
asm (FINI_SECTION_ASM_OP); asm (FINI_SECTION_ASM_OP);
__do_global_dtors_aux (); __do_global_dtors_aux ();
...@@ -198,7 +198,7 @@ fini_dummy () ...@@ -198,7 +198,7 @@ fini_dummy ()
call in another function. */ call in another function. */
static void static void
frame_dummy () frame_dummy (void)
{ {
static struct object object; static struct object object;
if (__register_frame_info) if (__register_frame_info)
...@@ -206,7 +206,7 @@ frame_dummy () ...@@ -206,7 +206,7 @@ frame_dummy ()
} }
static void __attribute__ ((__unused__)) static void __attribute__ ((__unused__))
init_dummy () init_dummy (void)
{ {
asm (INIT_SECTION_ASM_OP); asm (INIT_SECTION_ASM_OP);
frame_dummy (); frame_dummy ();
...@@ -227,7 +227,8 @@ init_dummy () ...@@ -227,7 +227,8 @@ init_dummy ()
to switch to the .text section. */ to switch to the .text section. */
static void __do_global_ctors_aux (); static void __do_global_ctors_aux ();
void __do_global_ctors () void
__do_global_ctors (void)
{ {
#ifdef INVOKE__main /* If __main won't actually call __do_global_ctors #ifdef INVOKE__main /* If __main won't actually call __do_global_ctors
then it doesn't matter what's inside the function. then it doesn't matter what's inside the function.
...@@ -257,7 +258,7 @@ asm (INIT_SECTION_ASM_OP); /* cc1 doesn't know that we are switching! */ ...@@ -257,7 +258,7 @@ asm (INIT_SECTION_ASM_OP); /* cc1 doesn't know that we are switching! */
file-scope static-storage C++ objects within shared libraries. */ file-scope static-storage C++ objects within shared libraries. */
static void static void
__do_global_ctors_aux () /* prologue goes in .init section */ __do_global_ctors_aux (void) /* prologue goes in .init section */
{ {
#ifdef FORCE_INIT_SECTION_ALIGN #ifdef FORCE_INIT_SECTION_ALIGN
FORCE_INIT_SECTION_ALIGN; /* Explicit align before switch to .text */ FORCE_INIT_SECTION_ALIGN; /* Explicit align before switch to .text */
...@@ -279,7 +280,7 @@ __do_global_ctors_aux () /* prologue goes in .init section */ ...@@ -279,7 +280,7 @@ __do_global_ctors_aux () /* prologue goes in .init section */
static char __EH_FRAME_BEGIN__[]; static char __EH_FRAME_BEGIN__[];
static func_ptr __DTOR_LIST__[]; static func_ptr __DTOR_LIST__[];
void void
__do_global_dtors () __do_global_dtors (void)
{ {
func_ptr *p; func_ptr *p;
for (p = __DTOR_LIST__ + 1; *p; p++) for (p = __DTOR_LIST__ + 1; *p; p++)
...@@ -296,7 +297,7 @@ __do_global_dtors () ...@@ -296,7 +297,7 @@ __do_global_dtors ()
after libgcc.a, and hence can't call libgcc.a functions directly. That after libgcc.a, and hence can't call libgcc.a functions directly. That
can lead to unresolved function references. */ can lead to unresolved function references. */
void void
__frame_dummy () __frame_dummy (void)
{ {
static struct object object; static struct object object;
if (__register_frame_info) if (__register_frame_info)
...@@ -360,7 +361,7 @@ char __EH_FRAME_BEGIN__[] = { }; ...@@ -360,7 +361,7 @@ char __EH_FRAME_BEGIN__[] = { };
static func_ptr __CTOR_END__[]; static func_ptr __CTOR_END__[];
static void static void
__do_global_ctors_aux () __do_global_ctors_aux (void)
{ {
func_ptr *p; func_ptr *p;
for (p = __CTOR_END__ - 1; *p != (func_ptr) -1; p--) for (p = __CTOR_END__ - 1; *p != (func_ptr) -1; p--)
...@@ -370,7 +371,7 @@ __do_global_ctors_aux () ...@@ -370,7 +371,7 @@ __do_global_ctors_aux ()
/* Stick a call to __do_global_ctors_aux into the .init section. */ /* Stick a call to __do_global_ctors_aux into the .init section. */
static void __attribute__ ((__unused__)) static void __attribute__ ((__unused__))
init_dummy () init_dummy (void)
{ {
asm (INIT_SECTION_ASM_OP); asm (INIT_SECTION_ASM_OP);
__do_global_ctors_aux (); __do_global_ctors_aux ();
...@@ -419,7 +420,7 @@ init_dummy () ...@@ -419,7 +420,7 @@ init_dummy ()
before we start to execute any of the user's code. */ before we start to execute any of the user's code. */
static void static void
__do_global_ctors_aux () /* prologue goes in .text section */ __do_global_ctors_aux (void) /* prologue goes in .text section */
{ {
asm (INIT_SECTION_ASM_OP); asm (INIT_SECTION_ASM_OP);
DO_GLOBAL_CTORS_BODY; DO_GLOBAL_CTORS_BODY;
...@@ -445,7 +446,7 @@ static func_ptr __CTOR_END__[]; ...@@ -445,7 +446,7 @@ static func_ptr __CTOR_END__[];
extern void __frame_dummy (void); extern void __frame_dummy (void);
#endif #endif
void void
__do_global_ctors () __do_global_ctors (void)
{ {
func_ptr *p; func_ptr *p;
#ifdef EH_FRAME_SECTION_ASM_OP #ifdef EH_FRAME_SECTION_ASM_OP
...@@ -521,7 +522,7 @@ extern const struct section * ...@@ -521,7 +522,7 @@ extern const struct section *
static void __reg_frame_ctor () __attribute__ ((constructor)); static void __reg_frame_ctor () __attribute__ ((constructor));
static void static void
__reg_frame_ctor () __reg_frame_ctor (void)
{ {
static struct object object; static struct object object;
const struct section *eh_frame; const struct section *eh_frame;
...@@ -538,7 +539,8 @@ __reg_frame_ctor () ...@@ -538,7 +539,8 @@ __reg_frame_ctor ()
static void __dereg_frame_dtor () __attribute__ ((destructor)); static void __dereg_frame_dtor () __attribute__ ((destructor));
static static
void __dereg_frame_dtor () void
__dereg_frame_dtor (void)
{ {
const struct section *eh_frame; const struct section *eh_frame;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment