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

List:       kde-devel
Subject:    Re: [PATCH] second try at fixing up socklen issues on Solaris
From:       Waldo Bastian <bastian () kde ! org>
Date:       2001-04-04 21:53:43
[Download RAW message or body]

On Wednesday 04 April 2001 14:52, Oswald Buddenhagen wrote:
> if we don't want to install a system-dependend include file, we
> "simply" should not export any functions with the questionable
> parameter type - simply use int for this. inside the kde sources we
> can use socklen_t, as our configure detected it. if we have to receive
> lengths from users, we can put code like this in the exported
> functions:
>
> public KSocket::SockFunc(int fd, struct sockaddr *addr, int *len)
> {
>    socklen_t ouraddr = (socklen_t) *len;
>
>    ::sockfunc(fd, addr, &ouraddr);
>
>    *len = (int) ouraddr;
> }
>
> that way we would basically hide this whole size_t-instead-of-int
> braindamage the posix bozos created from our users (and ourselves).
> hmm ... this sounds too simple to be possible. i surely overlooked
> something. :)

Yes, this is the way to go IMO. I did send a proof-of-concept patch according 
these lines to George last week or so. Dunno what came from that.

Cheers,
Waldo
-- 
bastian@kde.org | SuSE Labs KDE Developer | bastian@suse.com
 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

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

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