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

List:       kfm-devel
Subject:    Re: non-gcc kjs/ build fixes
From:       Adriaan de Groot <groot () kde ! org>
Date:       2007-12-07 19:04:40
Message-ID: 200712072004.45256.groot () kde ! org
[Download RAW message or body]


On Friday 07 December 2007, Harri Porten wrote:
> On Fri, 7 Dec 2007, Adriaan de Groot wrote:
> > I'd like to apply the following to get kjs/ to compile on non-gcc
> > platforms. The patches are similar to earlier fixes I put in, but given
>
> If possible I'd prefer adding a new internal function (ourMunmap()?) that
> has a well-defined API and does the #ifdef/casting ugliness in one place.

OK, I can do that. 


> > using std::max;
> > +using std::memset;
>
> So there are systems that lack the C memset() function - or is it disabled
> by some switch?

GCC's headers automatically place std::memset() also in the global namespace, 
so with GCC you do

	#include <cstring>
	memset(a,0,sizeof(a));

but not all sets of headers do (Sun Studio is the culprit here). This is the 
smallest change to the code to get it to compile again.

> > +#if PLATFORM(SOLARIS_OS)
> > +#include <strings.h>
> > +#endif
>
> Just curious: what was this needed for?

str[n]casecmp(3) is in strings.h according to XPG 4.2; this only affects 
really anal system headers (not on Linux or *BSD).

> P.S. kfm-devel might be a better list.

Recipients duly adjusted.

-- 
These are your friends - Adem
    GPG: FEA2 A3FE Adriaan de Groot

["signature.asc" (application/pgp-signature)]

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

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