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
Objective Caml's Unix libraries
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Pawel Wojciechowski <Pawel.Wojciechowski@c...>
Subject: Objective Caml's Unix libraries
It seems to me that in the interface file unix.mli (from the directory
otherlibs/unix of the Objective Caml release 1.03), one line should be
amended. Instead of 

(*** Basic file input/output *)

type file_descr

there should be:

(*** Basic file input/output *)

type file_descr = int 

This allowed me to avoid some problems when using file descriptors 
(I recently signalled my problem on the mailing list).

File descriptors are integers indeed. On the other hand, there is 
a correct definition of this type (ie as above) in the main file,
so everything should be ok (or I am wrong?). Unfortunately without that 
small amendment in the library files, I couldn't compile my program
without an error: "This expression has type int but is here used with 
type Unix.file_descr"