* Bug: mingw in_channel_length fails
@ 2004-11-30 20:04 Shivkumar Chandrasekaran
2004-12-01 23:14 ` [Caml-list] " Damien Doligez
0 siblings, 1 reply; 2+ messages in thread
From: Shivkumar Chandrasekaran @ 2004-11-30 20:04 UTC (permalink / raw)
To: caml-list
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] Bug: mingw in_channel_length fails
2004-11-30 20:04 Bug: mingw in_channel_length fails Shivkumar Chandrasekaran
@ 2004-12-01 23:14 ` Damien Doligez
0 siblings, 0 replies; 2+ messages in thread
From: Damien Doligez @ 2004-12-01 23:14 UTC (permalink / raw)
To: caml-list
Hello,
On 30 Nov 2004, at 21:04, Shivkumar Chandrasekaran wrote:
> EIther I messed up while building from ocaml sources, or this seems to
> be a mingw specific bug.
Just a reminder for all OCaml users: use our bug tracking system to
report bugs, or we'll surely forget to fix them.
Thanks,
-- Damien
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-12-01 23:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-30 20:04 Bug: mingw in_channel_length fails Shivkumar Chandrasekaran
2004-12-01 23:14 ` [Caml-list] " Damien Doligez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox