From: Shivkumar Chandrasekaran <shiv@ece.ucsb.edu>
To: caml-list <caml-list@inria.fr>
Subject: Bug: mingw in_channel_length fails
Date: Tue, 30 Nov 2004 12:04:26 -0800 [thread overview]
Message-ID: <094A5274-430B-11D9-BD00-003065BDAA76@ece.ucsb.edu> (raw)
Hi,
I just noticed that both in_channel_length and
LargeFile.in_channel_length report the wrong values on files that are
greater than some number (in my case 2GB) using ocaml 3.08.1 mingw
(WindowsXP SP2) build (compiled following instructions).
In particular I ran the same snippet of code:
let fd_in = open_in_bin "fname";;
in_channel_length fd_in;;
LargeFile.in_channel_length fd_in;;
on the same file in Mac OS X, Linux (x86), and mingw.
In the first two cases in_channel_length throws an exception:
Exception: Sys_error "Value too large to be stored in data type".
while LargeFile.in_channel_length returns:
- : int64 = 2621440000L
which is correct (doing ls -l in shell).
In the mingw version I get 473956352 for in_channel_length and
-1673527296L for LargeFile.in_channel_length (note the negative value)!
EIther I messed up while building from ocaml sources, or this seems to
be a mingw specific bug.
Thanks for any help.
--shiv--
PS: I can send the file if somebody wishes to cross-check.
next reply other threads:[~2004-11-30 20:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-30 20:04 Shivkumar Chandrasekaran [this message]
2004-12-01 23:14 ` [Caml-list] " Damien Doligez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=094A5274-430B-11D9-BD00-003065BDAA76@ece.ucsb.edu \
--to=shiv@ece.ucsb.edu \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox