From kde-core-devel Mon Dec 22 23:09:31 2003 From: Daniel Stone Date: Mon, 22 Dec 2003 23:09:31 +0000 To: kde-core-devel Subject: What not to be doing - syscall() X-MARC-Message: https://marc.info/?l=kde-core-devel&m=107217421907719 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--9MdG657QzbOEWl1C" --9MdG657QzbOEWl1C Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi guys, In kdebase/kcontrol/info/memory_linux.cpp: 1.3 (deller 07-Jan-00): syscall(SYS_sysinfo, &info); /* Get In= formation from system... */ This is a pretty good example of what *not* to do. syscall() is not portable across architectures (it caused a recent FTBFS[1] on mips/mipsel for Debian packages). To do this, use sysinfo(&info) instead. There are more instances in kdeadmin/kuser/quota.cpp, kdenetwork/ksirc/filters.pl (seriously, what is that? use Timers::HiRes anyway), and kdeutils/ksim/systeminfo.cpp; I've CCed the people that cvs bla^H^H^Hannotate identified as responsible for those lines. I intend to start fixing this on *both* HEAD and _BRANCH, because it's just wrong, and causes a world of hurt (the world is more than just i386). Cheers, Daniel [1]: Failure to build from source - my link is too slow for me to easily change that, so I footnoted it. [2]: If you desperately need some defines, like from cdrom.h, copy them into a header of your own. --=20 Daniel Stone Developer, KDE project: http://www.kd= e.org --9MdG657QzbOEWl1C Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE/53mrcPClnTztfv0RAgf+AJsELstvjLYE11XG0lw4vHF+eFX2UwCcCpl9 GpbsfZJP+9DHR2pDPrcQIYo= =W8ny -----END PGP SIGNATURE----- --9MdG657QzbOEWl1C--