[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gv] Fwd: Bug#497044: gv: does not work properly with files >~2gb

From: Bernhard R. Link
Subject: [bug-gv] Fwd: Bug#497044: gv: does not work properly with files >~2gb
Date: Mon, 1 Sep 2008 18:16:57 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

----- Forwarded message from Marc Lehmann <debian-reportbug at plan9.de> -----
when viewing a postscript file >2gb, page-down works, but if one is
beyond the 2gb barrier and tries to pg-up, one gets garbe and usually a
ghostscript error message.

the same is true when one directly selects a page that is >2gb within the
----- End forwarded message -----

Fixing this looks a bit complicated (at least on 32 bit architectures,
on 64 bit architectures long is a bit longer and already helps).

I'd suggest to start with adding AC_SYS_LARGEFILE to configure.ac.
This tells autoconf that we want off_t to be 64 bit always. (This
is the default on things like BSDs anyway AFAIK, but Linux has still
quite "backward-compatible" defaults).[1]

Then it needs to make sure to actually use off_t. File descriptor
based functions usually use them, but file stream based not (problem
are fseek and ftell, I guess).

There are fseeko and ftello to help here (things using them need to be
off_t (or long long), though), those are relatively new functions
though. (my manpage says "SUSv2, POSIX.1-2001"), though this might
perhaps need a fallback to use fseek and ftell there for older

        Bernhard R. Link

[1] With glibc that should define _FILE_OFFSET_BITS to 64, so for
that to work ac_config.h needs to be included everywhere before the
first libc header (I think this was already done, but checking again
never harms).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]