2002-02-10 Daniel Jacobowitz <drow@mvista.com>
authorDaniel Jacobowitz <drow@false.org>
Sun, 10 Feb 2002 19:12:13 +0000 (19:12 +0000)
committerDaniel Jacobowitz <drow@false.org>
Sun, 10 Feb 2002 19:12:13 +0000 (19:12 +0000)
* ldmain.c: Add prototype for main ().
* lexsup.c: Guard declaration of strtoul with HAVE_STDLIB_H.
* emultempl/lnk960.em (lnk960_choose_target): Function should
take two arguments.

ld/ChangeLog
ld/emultempl/lnk960.em
ld/ldmain.c
ld/lexsup.c

index 4d0f866..b70fbc5 100644 (file)
@@ -1,3 +1,10 @@
+2002-02-10  Daniel Jacobowitz  <drow@mvista.com>
+
+       * ldmain.c: Add prototype for main ().
+       * lexsup.c: Guard declaration of strtoul with HAVE_STDLIB_H.
+       * emultempl/lnk960.em (lnk960_choose_target): Function should
+       take two arguments.
+
 2002-02-10  Alan Modra  <amodra@bigpond.net.au>
 
        * ldlang.c (entry_section): New initialised variable.
index 6d90da9..f5741b4 100644 (file)
@@ -2,7 +2,7 @@
 # It does some substitutions.
 cat >e${EMULATION_NAME}.c <<EOF
 /* intel coff loader emulation specific stuff
-   Copyright 1991, 1992, 1994, 1995, 1996, 1999, 2000, 2001
+   Copyright 1991, 1992, 1994, 1995, 1996, 1999, 2000, 2001, 2002
    Free Software Foundation, Inc.
    Written by Steve Chamberlain steve@cygnus.com
 
@@ -56,7 +56,7 @@ static void lnk960_after_parse PARAMS ((void));
 static void lnk960_before_allocation PARAMS ((void));
 static void lnk960_after_allocation PARAMS ((void));
 static void lnk960_set_output_arch PARAMS ((void));
-static char *lnk960_choose_target PARAMS ((void));
+static char *lnk960_choose_target PARAMS ((int, char **));
 static char *lnk960_get_script PARAMS ((int *));
 
 
@@ -246,7 +246,9 @@ lnk960_set_output_arch()
 }
 
 static char *
-lnk960_choose_target()
+lnk960_choose_target (argc, argv)
+    int argc ATTRIBUTE_UNUSED;
+    char **argv ATTRIBUTE_UNUSED;
 {
 #ifdef GNU960
 
index eac23ae..12e31dd 100644 (file)
@@ -1,5 +1,6 @@
 /* Main program of GNU linker.
-   Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+   Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+   2002
    Free Software Foundation, Inc.
    Written by Steve Chamberlain steve@cygnus.com
 
@@ -54,6 +55,8 @@ extern PTR sbrk ();
 #endif
 #endif
 
+int main PARAMS ((int, char **));
+
 static char *get_emulation PARAMS ((int, char **));
 static void set_scripts_dir PARAMS ((void));
 
index ca2e9a1..7208074 100644 (file)
@@ -1,6 +1,6 @@
 /* Parse options for the GNU linker.
    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001
+   2001, 2002
    Free Software Foundation, Inc.
 
 This file is part of GLD, the Gnu Linker.
@@ -53,9 +53,12 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #define        S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
 #endif
 
+#ifndef HAVE_STDLIB_H
+/* If we have <stdlib.h>, assume it defines strtoul.  */
 /* Omit args to avoid the possibility of clashing with a system header
    that might disagree about consts.  */
 unsigned long strtoul ();
+#endif
 
 static int is_num PARAMS ((const char *, int, int, int));
 static void set_default_dirlist PARAMS ((char *dirlist_ptr));