From: Paul Duncan Date: 2002-04-19T01:45:24+09:00 Subject: Re: Help wanted for statvfs extension --lx6+J6gHrzwEpYNy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Daniel Berger (djberg96@hotmail.com) wrote: > Mike Hall wrote in message > > >=20 > > I just uploaded my version for the Linux 'statfs' and 'getmntent' calls. > > Might be OK for BSD, also? > > It's modeled after the standard 'etc' extension. > >=20 > > http://www.enteract.com/~mghall/ruby/filesystem-0.1.tgz >=20 > I just downloaded and tried this. I made one adjustment first: >=20 > - #include > + #include >=20 > Is the mntent.h file in different locations depending on the OS? That > will need to be solved if that's the case. Yes, unfortunately.=20 $ uname -a SunOS happy 5.7 Generic_106541-18 sun4u sparc SUNW,Ultra-Enterprise $ ls /usr/include/sys/mntent.h =20 /usr/include/sys/mntent.h vs. pabs@white:~> uname -a Linux white 2.2.18-raid-mosix #2 SMP Tue Jan 2 12:40:13 EST 2001 i686 unknown pabs@white:~> ls /usr/include/{,sys/}mntent.h=20 ls: /usr/include/sys/mntent.h: No such file or directory /usr/include/mntent.h [snipped the rest] Maybe something like this in the extconf.rb is the solution: prefixes =3D ['', 'sys/'] file =3D 'mntent.h' prefixes.each { |p| path =3D p + file $CFLAGS << '-I' << p if have_header path and p.length > 0 } > Dan --=20 Paul Duncan pabs in #gah (OPN IRC) http://www.pablotron.org/ OpenPGP Key ID: 0x82C29562 --lx6+J6gHrzwEpYNy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8vvghzdlT34LClWIRAuMVAJsHb8liKJmZg6l15mERVEteNq80bACeKz3w ZDfLXMGTHlnezDEcr2SkZMQ= =+1iV -----END PGP SIGNATURE----- --lx6+J6gHrzwEpYNy--