Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/csu/common_elf Make sure this still compiles with gcc-2....



details:   https://anonhg.NetBSD.org/src/rev/86c223246f52
branches:  trunk
changeset: 555886:86c223246f52
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Dec 03 18:41:35 2003 +0000

description:
Make sure this still compiles with gcc-2.95. Hello vaxen!

diffstat:

 lib/csu/common_elf/crtbegin.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (40 lines):

diff -r 77b84525857d -r 86c223246f52 lib/csu/common_elf/crtbegin.c
--- a/lib/csu/common_elf/crtbegin.c     Wed Dec 03 18:40:07 2003 +0000
+++ b/lib/csu/common_elf/crtbegin.c     Wed Dec 03 18:41:35 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: crtbegin.c,v 1.23 2003/12/02 03:01:19 lukem Exp $      */
+/*     $NetBSD: crtbegin.c,v 1.24 2003/12/03 18:41:35 christos Exp $   */
 
 /*-
  * Copyright (c) 1998, 2001, 2002 The NetBSD Foundation, Inc.
@@ -52,6 +52,12 @@
 #include <sys/exec_elf.h>
 #include <stdlib.h>
 
+#if __GNUC_PREREQ__(3, 0)
+#define        USED_NOINLINE __attribute__((__used__,__noinline__))
+#else
+#define        USED_NOINLINE __attribute__((__unused__))
+#endif
+
 #ifdef DWARF2_EH
 #include "dwarf2_eh.h"
 #endif
@@ -133,7 +139,7 @@
                (**p++)();
 }
 
-static void __attribute__((__used__,__noinline__))
+static void USED_NOINLINE
 __do_global_ctors_aux(void)
 {
        static int initialized;
@@ -166,7 +172,7 @@
 }
 MD_CALL_STATIC_FUNCTION(.init, __do_global_ctors_aux)
 
-static void __attribute__((__used__,__noinline__))
+static void USED_NOINLINE
 __do_global_dtors_aux(void)
 {
        static int finished;



Home | Main Index | Thread Index | Old Index