lynx-dev
[Top][All Lists]
Advanced

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

Re: [Lynx-dev] Huge files on Win32


From: Gisle Vanem
Subject: Re: [Lynx-dev] Huge files on Win32
Date: Fri, 09 Jan 2015 11:34:38 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:34.0) Gecko/20100101 Firefox/34.0 SeaMonkey/2.31

Thomas Dickey wrote:

MinGW in that area is just plain broken.

MingW *can* use >4 GB 'st_size' from stat() just fine in other
programs. E.g. curl + Wget.

You probably can't get that with 32-bit MSVC.

MSVC v16 (32-bit too). I think the problem is in StrAllocVsprintf()
(via HTSprintf0). It doesn't understand formats such as 'I64d'.
But the code around this so messy I don't know what to do about it.

In HTFile.c I have asserted that 'off_t' really is 64-bits.
So in:

static char *FormatSize(char **bufp,
                        char *start,
                        off_t entry)
{
    char fmt[512];

    if (*start) {
        sprintf(fmt, "%%%.*s" PRI_off_t, (int) sizeof(fmt) - 3, start);

        HTSprintf0(bufp, fmt, entry);
    } else {
        sprintf(fmt, "%" PRI_off_t, CAST_off_t (entry));

On Win32, what should 'fmt' become for HTSprintf0() to do it right?
Since "%I64d" is not supported, should PRI_OFF_t be forced to "lld"
on Windows too?

--
--gv



reply via email to

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