Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] How hard would more inlining, more unboxed floats be?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Fox <dsfox@c...>
Subject: [Caml-list] in_channel_length fails for files longer than max_int
The pervasive function in_channel_length fails when the file size is
too large for an int, but it doesn't raise an exception.  The code in
io.c just checks for lseek errors.  Would a check for end > max_int be

long channel_size(struct channel *channel)
  long end;

  end = lseek(channel->fd, 0, SEEK_END);
  if (end == -1 ||
      lseek(channel->fd, channel->offset, SEEK_SET) != channel->offset) {
  return end;
To unsubscribe, mail  Archives: