}
}
-#define AR_WRITE_BUFFERSIZE (DEFAULT_BUFFERSIZE * 1024)
+#define AR_WRITE_BUFFERSIZE (8 * 1024 * 1024)
/* FIXME: Find a way to test link_info.reduce_memory_overheads
and change the buffer size. */
do_copy (bfd *out_bfd, bfd *in_bfd)
{
bfd_size_type remaining;
- bfd_byte buffer[DEFAULT_BUFFERSIZE];
+ bfd_byte buffer[8 * 1024];
if (bfd_seek (in_bfd, 0, SEEK_SET) != 0)
return false;
remaining = arelt_size (in_bfd);
- while (remaining >= DEFAULT_BUFFERSIZE)
+ while (remaining >= sizeof (buffer))
{
- if (bfd_read (buffer, DEFAULT_BUFFERSIZE, in_bfd) != DEFAULT_BUFFERSIZE
- || bfd_write (buffer, DEFAULT_BUFFERSIZE, out_bfd) != DEFAULT_BUFFERSIZE)
+ if (bfd_read (buffer, sizeof (buffer), in_bfd) != sizeof (buffer)
+ || bfd_write (buffer, sizeof (buffer), out_bfd) != sizeof (buffer))
return false;
- remaining -= DEFAULT_BUFFERSIZE;
+ remaining -= sizeof (buffer);
}
if (remaining)
extern "C" {
#endif
-/* If you want to read and write large blocks, you might want to do it
- in quanta of this amount */
-#define DEFAULT_BUFFERSIZE 8192
-
/* Set a tdata field. Can't use the other macros for this, since they
do casts, and casting to the left of assignment isn't portable. */
#define set_tdata(bfd, v) ((bfd)->tdata.any = (v))
extern "C" {
#endif
-/* If you want to read and write large blocks, you might want to do it
- in quanta of this amount */
-#define DEFAULT_BUFFERSIZE 8192
-
/* Set a tdata field. Can't use the other macros for this, since they
do casts, and casting to the left of assignment isn't portable. */
#define set_tdata(bfd, v) ((bfd)->tdata.any = (v))
if (amt == VMS_BLOCK_SIZE - sz)
{
/* Copy the remaining. */
- char buffer[DEFAULT_BUFFERSIZE];
+ char buffer[8 * 1024];
while (1)
{