From: Lothar Scholz Date: 2004-08-04T00:13:04+09:00 Subject: Re: help from *nix ruby users Hello Ara.T.Howard, ATH> On Tue, 3 Aug 2004, David Ross wrote: >> >> >> The output is from my DragonFlyBSD systems. It is the >> same in FreeBSD4.x >> >> >>> ruby -r rbconfig -e 'p Config::CONFIG["arch"]' >> "i386-dragonfly1.1" >> >> >> struct flock { >> off_t l_start; /* starting offset */ >> off_t l_len; /* len = 0 means until >> end of file */ >> pid_t l_pid; /* lock owner */ >> short l_type; /* lock type: >> read/write, etc. */ >> short l_whence; /* type of l_start */ >> }; ATH> wow - they just do it backwards (or linux does) - why can't they all just get ATH> along ;-( ATH> thanks - i'll add this one in! 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. -- Best regards, emailto: scholz at scriptolutions dot com Lothar Scholz http://www.ruby-ide.com CTO Scriptolutions Ruby, PHP, Python IDE 's