On Sun, 30 Oct 2005, Theodoros V. Kalamatianos wrote:

And after all of this is finished I end up with the tests/tail-2/big-4gb skipped because the new dd is unable to handle large files. After a strace on my current and the new dd I discovered the following difference:

dd 5.2.1:
.
.
.
open("big", O_RDWR|O_CREAT|O_LARGEFILE, 0666) = 1
.
.
.

but in the following trace the O_LARGEFILE flag is missing:

dd 5.92
.
.
.
open("big", O_RDWR|O_CREAT, 0666)       = 1
.
.
.

I tracked this down to lib/fd-reopen.c. In order to have large file support the following define must be present:

#define _FILE_OFFSET_BITS 64

This normally resides in config.h, which is produced by configure, but fd-reopen.c does not include config.h. The following patch fixes the problem:

diff -uNr coreutils-5.92/lib/fd-reopen.c coreutils-5.92/lib/fd-reopen.c
--- coreutils-5.92/lib/fd-reopen.c      2005-07-03 12:09:11.000000000 +0300
+++ coreutils-5.92/lib/fd-reopen.c      2005-10-30 21:48:32.000000000 +0200
@@ -18,6 +18,8 @@

 /* Written by Paul Eggert.  */

+#include <config.h>
+
 #include "fd-reopen.h"

 #include <errno.h>


I did some grepping and I think that this is the only open() instance where config.h has not been included. Hopefully I am correct...


Regards,

Theodoros Kalamatianos


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to