1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
commit 1c9170065b107672a47e467abb6807bba8adf28e
Author: Francois Gouget <fgouget@codeweavers.com>
Date: Tue Dec 20 18:48:52 2011 +0100
ar: Fix handling of archive elements larger than 2GB.
diff --git a/binutils/ar.c b/binutils/ar.c
index 0310b6f..e47779f 100644
--- a/binutils/ar.c
+++ b/binutils/ar.c
@@ -927,10 +927,10 @@ open_inarch (const char *archive_filename, const char *file)
static void
print_contents (bfd *abfd)
{
- size_t ncopied = 0;
+ bfd_size_type ncopied = 0;
char *cbuf = (char *) xmalloc (BUFSIZE);
struct stat buf;
- size_t size;
+ bfd_size_type size;
if (bfd_stat_arch_elt (abfd, &buf) != 0)
/* xgettext:c-format */
fatal (_("internal stat error on %s"), bfd_get_filename (abfd));
@@ -944,12 +944,12 @@ print_contents (bfd *abfd)
while (ncopied < size)
{
- size_t nread;
- size_t tocopy = size - ncopied;
+ bfd_size_type nread;
+ bfd_size_type tocopy = size - ncopied;
if (tocopy > BUFSIZE)
tocopy = BUFSIZE;
- nread = bfd_bread (cbuf, (bfd_size_type) tocopy, abfd);
+ nread = bfd_bread (cbuf, tocopy, abfd);
if (nread != tocopy)
/* xgettext:c-format */
fatal (_("%s is not a valid archive"),
@@ -980,9 +980,9 @@ extract_file (bfd *abfd)
{
FILE *ostream;
char *cbuf = (char *) xmalloc (BUFSIZE);
- size_t nread, tocopy;
- size_t ncopied = 0;
- size_t size;
+ bfd_size_type nread, tocopy;
+ bfd_size_type ncopied = 0;
+ bfd_size_type size;
struct stat buf;
if (bfd_stat_arch_elt (abfd, &buf) != 0)
@@ -1017,7 +1017,7 @@ extract_file (bfd *abfd)
if (tocopy > BUFSIZE)
tocopy = BUFSIZE;
- nread = bfd_bread (cbuf, (bfd_size_type) tocopy, abfd);
+ nread = bfd_bread (cbuf, tocopy, abfd);
if (nread != tocopy)
/* xgettext:c-format */
fatal (_("%s is not a valid archive"),
|