Version française
Home     About     Download     Resources     Contact us    
Browse thread
stat in Unix library
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Ian Zimmerman <itz@b...>
Subject: stat in Unix library

I am looking at the 3.08 source and something about the code for stat
doesn't seem right.

The st_dev member of type Unix.stats is declared as int.  But according
to the Single Unix spec, the corresponding member of the C struct has
a defined type, dev_t; and in fact recent Linux kernels define dev_t
to a 64 bit type, even on 32 bit architectures.  So it looks like
the Ocaml function will lose the high order bits.

I came across this as I was trying to write a Unix interface for another
(unnamed) functional language :)  

-- 
"It's not true or not."  A reality show producer (real quote)