projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Silence warnings about incompatible plugins.
[deliverable/binutils-gdb.git]
/
binutils
/
windres.c
diff --git
a/binutils/windres.c
b/binutils/windres.c
index 7de73ef2f553830c0c5f382908bd93cb91cd7719..427e9823ce784edc6cd852cf3141b6cd998af2e5 100644
(file)
--- a/
binutils/windres.c
+++ b/
binutils/windres.c
@@
-1,6
+1,5
@@
/* windres.c -- a program to manipulate Windows resources
/* windres.c -- a program to manipulate Windows resources
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008,
- 2009, 2011, 2012 Free Software Foundation, Inc.
+ Copyright (C) 1997-2020 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
Rewritten by Kai Tietz, Onevision.
Written by Ian Lance Taylor, Cygnus Support.
Rewritten by Kai Tietz, Onevision.
@@
-37,7
+36,6
@@
#include "sysdep.h"
#include <assert.h>
#include "sysdep.h"
#include <assert.h>
-#include <time.h>
#include "bfd.h"
#include "getopt.h"
#include "bucomm.h"
#include "bfd.h"
#include "getopt.h"
#include "bucomm.h"
@@
-206,6
+204,7
@@
open_file_search (const char *filename, const char *mode, const char *errmsg,
*real_filename = n;
return e;
}
*real_filename = n;
return e;
}
+ free (n);
if (errno != ENOENT)
break;
if (errno != ENOENT)
break;
@@
-339,17
+338,12
@@
define_resource (rc_res_directory **resources, int cids,
if (*resources == NULL)
{
if (*resources == NULL)
{
- static unsigned int timeval;
-
- /* Use the same timestamp for every resource created in a
- single run. */
- if (timeval == 0)
- timeval = time (NULL);
-
*resources = ((rc_res_directory *)
res_alloc (sizeof (rc_res_directory)));
(*resources)->characteristics = 0;
*resources = ((rc_res_directory *)
res_alloc (sizeof (rc_res_directory)));
(*resources)->characteristics = 0;
- (*resources)->time = timeval;
+ /* Using a real timestamp only serves to create non-deterministic
+ results. Use zero instead. */
+ (*resources)->time = 0;
(*resources)->major = 0;
(*resources)->minor = 0;
(*resources)->entries = NULL;
(*resources)->major = 0;
(*resources)->minor = 0;
(*resources)->entries = NULL;
@@
-710,8
+704,7
@@
quot (const char *string)
if ((buflen < slen * 2 + 2) || ! buf)
{
buflen = slen * 2 + 2;
if ((buflen < slen * 2 + 2) || ! buf)
{
buflen = slen * 2 + 2;
- if (buf)
- free (buf);
+ free (buf);
buf = (char *) xmalloc (buflen);
}
buf = (char *) xmalloc (buflen);
}
@@
-814,10
+807,12
@@
main (int argc, char **argv)
program_name = argv[0];
xmalloc_set_program_name (program_name);
program_name = argv[0];
xmalloc_set_program_name (program_name);
+ bfd_set_error_program_name (program_name);
expandargv (&argc, &argv);
expandargv (&argc, &argv);
- bfd_init ();
+ if (bfd_init () != BFD_INIT_MAGIC)
+ fatal (_("fatal error: libbfd ABI mismatch"));
set_default_bfd_target ();
res_init ();
set_default_bfd_target ();
res_init ();
@@
-944,7
+939,7
@@
main (int argc, char **argv)
{
struct stat statbuf;
char modebuf[11];
{
struct stat statbuf;
char modebuf[11];
-
+
if (stat (optarg, & statbuf) == 0
/* Coded this way to avoid importing knowledge of S_ISDIR into this file. */
&& (mode_string (statbuf.st_mode, modebuf), modebuf[0] == 'd'))
if (stat (optarg, & statbuf) == 0
/* Coded this way to avoid importing knowledge of S_ISDIR into this file. */
&& (mode_string (statbuf.st_mode, modebuf), modebuf[0] == 'd'))
@@
-1121,7
+1116,7
@@
windres_open_as_binary (const char *filename, int rdmode)
if (rdmode && ! bfd_check_format (abfd, bfd_object))
fatal ("can't open `%s' for input.", filename);
if (rdmode && ! bfd_check_format (abfd, bfd_object))
fatal ("can't open `%s' for input.", filename);
-
+
return abfd;
}
return abfd;
}
@@
-1316,7
+1311,7
@@
static rc_uint_type
target_get_8 (const void *p, rc_uint_type length)
{
rc_uint_type ret;
target_get_8 (const void *p, rc_uint_type length)
{
rc_uint_type ret;
-
+
if (length < 1)
fatal ("Resource too small for getting 8-bit value.");
if (length < 1)
fatal ("Resource too small for getting 8-bit value.");
@@
-1329,7
+1324,7
@@
target_get_16 (const void *p, rc_uint_type length)
{
if (length < 2)
fatal ("Resource too small for getting 16-bit value.");
{
if (length < 2)
fatal ("Resource too small for getting 16-bit value.");
-
+
if (target_is_bigendian)
return bfd_getb16 (p);
else
if (target_is_bigendian)
return bfd_getb16 (p);
else
@@
-1341,7
+1336,7
@@
target_get_32 (const void *p, rc_uint_type length)
{
if (length < 4)
fatal ("Resource too small for getting 32-bit value.");
{
if (length < 4)
fatal ("Resource too small for getting 32-bit value.");
-
+
if (target_is_bigendian)
return bfd_getb32 (p);
else
if (target_is_bigendian)
return bfd_getb32 (p);
else
@@
-1359,7
+1354,7
@@
static void
target_put_16 (void *p, rc_uint_type value)
{
assert (!! p);
target_put_16 (void *p, rc_uint_type value)
{
assert (!! p);
-
+
if (target_is_bigendian)
bfd_putb16 (value, p);
else
if (target_is_bigendian)
bfd_putb16 (value, p);
else
@@
-1370,7
+1365,7
@@
static void
target_put_32 (void *p, rc_uint_type value)
{
assert (!! p);
target_put_32 (void *p, rc_uint_type value)
{
assert (!! p);
-
+
if (target_is_bigendian)
bfd_putb32 (value, p);
else
if (target_is_bigendian)
bfd_putb32 (value, p);
else
@@
-1409,5
+1404,5
@@
int wr_print (FILE *e, const char *fmt, ...)
va_start (arg, fmt);
r += vfprintf (e, fmt, arg);
va_end (arg);
va_start (arg, fmt);
r += vfprintf (e, fmt, arg);
va_end (arg);
- return r;
+ return r;
}
}
This page took
0.061234 seconds
and
4
git commands to generate.