From: "Ara.T.Howard" Date: 2004-08-04T02:31:33+09:00 Subject: Re: help from *nix ruby users On Wed, 4 Aug 2004, Lothar Scholz wrote: > Why don't you write a small C level function with "offset_of" to access the > values. You will always run in problems with different datasizes, different > compiler alignments, different struct's. lothar- never knew about offset_of... nice macro. however, if i were writing it in C i could just use the stuct members couldn't i? am i missing something here? this should compile on any posix system: struct flock flock; flock.l_type = F_RDLCK; flock.l_whence = SEEK_SET; flock.l_start = 0; flock.l_len = 0; etc. since posix stipultes these members must exist (it just doesn't say where or if there are others before or after!) am i missing something? regards. -a -- =============================================================================== | EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov | PHONE :: 303.497.6469 | A flower falls, even though we love it; | and a weed grows, even though we do not love it. | --Dogen ===============================================================================