summaryrefslogtreecommitdiff
path: root/binutils/dllwrap.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2002-05-05 23:25:27 +0000
committerAlan Modra <amodra@bigpond.net.au>2002-05-05 23:25:27 +0000
commit23e6107b767f8a93ac4f8314d44ad8077a0c29d8 (patch)
tree9f8f08e8b641aa44041e81a7d6442ea93a7c36ad /binutils/dllwrap.c
parent59c950ab95ab98cd9fc795720658a29c14511166 (diff)
downloadbinutils-redhat-23e6107b767f8a93ac4f8314d44ad8077a0c29d8.tar.gz
* dlltool.c (process_def_file): Add missing prototype.
(new_directive, assemble_file, main): Likewise. (process_def_file, new_directive): Make static. (inform): Rewrite using VA_FIXEDARG. * dllwrap.c (mybasename): Add missing prototype. (strhash, main): Likewise. (inform): Rewrite using VA_FIXEDARG. (warn): Likewise. (cleanup_and_exit): Use old style function definition. (strhash): Likewise. * windres.c (define_resource): Use one memset to clear all of struct res_resource.
Diffstat (limited to 'binutils/dllwrap.c')
-rw-r--r--binutils/dllwrap.c60
1 files changed, 19 insertions, 41 deletions
diff --git a/binutils/dllwrap.c b/binutils/dllwrap.c
index f8449a8a78..7c9496ce43 100644
--- a/binutils/dllwrap.c
+++ b/binutils/dllwrap.c
@@ -115,14 +115,16 @@ static int delete_exp_file = 1;
static int delete_def_file = 1;
static int run PARAMS ((const char *, char *));
+static char *mybasename PARAMS ((const char *));
+static int strhash PARAMS ((const char *));
static void usage PARAMS ((FILE *, int));
static void display PARAMS ((const char *, va_list));
static void inform PARAMS ((const char *, ...));
-static void warn PARAMS ((const char *format, ...));
+static void warn PARAMS ((const char *, ...));
static char *look_for_prog PARAMS ((const char *, const char *, int));
static char *deduce_name PARAMS ((const char *));
static void delete_temp_files PARAMS ((void));
-static void cleanup_and_exit PARAMS ((int status));
+static void cleanup_and_exit PARAMS ((int));
/**********************************************************************/
@@ -147,58 +149,30 @@ display (message, args)
}
-#ifdef __STDC__
static void
-inform (const char * message, ...)
+inform VPARAMS ((const char *message, ...))
{
- va_list args;
+ VA_OPEN (args, message);
+ VA_FIXEDARG (args, const char *, message);
if (!verbose)
return;
- va_start (args, message);
display (message, args);
- va_end (args);
-}
-
-static void
-warn (const char *format, ...)
-{
- va_list args;
-
- va_start (args, format);
- display (format, args);
- va_end (args);
-}
-#else
-
-static void
-inform (message, va_alist)
- const char * message;
- va_dcl
-{
- va_list args;
-
- if (!verbose)
- return;
- va_start (args);
- display (message, args);
- va_end (args);
+ VA_CLOSE (args);
}
static void
-warn (format, va_alist)
- const char *format;
- va_dcl
+warn VPARAMS ((const char *format, ...))
{
- va_list args;
+ VA_OPEN (args, format);
+ VA_FIXEDARG (args, const char *, format);
- va_start (args);
display (format, args);
- va_end (args);
+
+ VA_CLOSE (args);
}
-#endif
/* Look for the program formed by concatenating PROG_NAME and the
string running from PREFIX to END_PREFIX. If the concatenated
@@ -375,7 +349,8 @@ delete_temp_files ()
}
static void
-cleanup_and_exit (int status)
+cleanup_and_exit (status)
+ int status;
{
delete_temp_files ();
exit (status);
@@ -487,7 +462,8 @@ mybasename (name)
}
static int
-strhash (const char *str)
+strhash (str)
+ const char *str;
{
const unsigned char *s;
unsigned long hash;
@@ -635,6 +611,8 @@ static const struct option long_options[] =
{0, 0, 0, 0}
};
+int main PARAMS ((int, char **));
+
int
main (argc, argv)
int argc;