[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    What not to be doing - syscall()
From:       Daniel Stone <dstone () kde ! org>
Date:       2003-12-22 23:09:31
[Download RAW message or body]


Hi guys,
In kdebase/kcontrol/info/memory_linux.cpp:
1.3          (deller   07-Jan-00):   syscall(SYS_sysinfo, &info); /* Get Information 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.

-- 
Daniel Stone                                                    <dstone@kde.org>
Developer, KDE project:                                       http://www.kde.org

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic