From kde-core-devel Thu Jul 24 18:23:23 2008 From: Sebastian =?iso-8859-1?q?Tr=FCg?= Date: Thu, 24 Jul 2008 18:23:23 +0000 To: kde-core-devel Subject: Re: Help with making stuff compile on non-Linux Message-Id: <200807242023.23633.strueg () mandriva ! com> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=121692387131648 On Thursday 24 July 2008 19:35:01 Alex Merry wrote: > On Thursday 24 July 2008 08:05:25 Sebastian Trüg wrote: > > On Wednesday 23 July 2008 22:10:21 Alex Merry wrote: > > > I don't really see why you need to bother with the HAVE_* macros - why > > > not just use #ifdef SCHED_BATCH and #ifdef SYS_ioprio_set directly? > > > > > > IMO, this make the code more readable, because it's immediately obvious > > > what the #ifdefs guard against. The HAVE_* macros are really for CMake > > > checks. > > > > Only one reason: in case there is a fancier check one would only have to > > replace it in one place. > > But each check is only used in one place. And since whether SCHED_BATCH > and SYS_ioprio_set are defined are exactly what you want to check, there > are no possible fancier checks that could do a better job. So it just > looks like needless obfuscation to me. OK then. :) will do the simple checks. Thanks for your help.