This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mmap stdio breaks GNU ld


'od -j' is also broken by mmap stdio.

I found this by code inspection: I happened to be looking at GNU
textutils when reading this thread, so I quickly scanned it for mmap
stdio problems.  The 'od -j' problem is the only breakage that I found
in textutils.  I'll send a patch to the textutils maintainer.

The obvious fix for 'od' is to use fseeko instead of lseek.  This is a
tiny bit tricky since fseeko isn't available on older implementations.
I vaguely recall that the current 'od' code avoids fseeko because of
the portability hassle.

I wouldn't be surprised if other GNU programs also are broken by mmap
stdio, but I don't think it'll be a major catastrophe.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]