[Box Backup-dev] RC 3 testing: NetBSD 3.0 fails

Ben Summers boxbackup-dev at fluffy.co.uk
Tue Feb 21 17:51:25 GMT 2006


On 21 Feb 2006, at 17:30, Per Thomsen wrote:

> I have the full set of diffs that create a working set of executables
> (with test failures, mind you).
>
> I have attached the diff.
>
> WARNING: this is very much a work in progress, I just thought that if
> someone else was working on the same thing, it would be useful to  
> share
> the diffs.
>
>
[snip]

>  	//  
> ---------------------------------------------------------------------- 
> ----
>  	void FillInKEvent(struct kevent &rEvent, int Flags = 0) const
>  	{
> -		EV_SET(&rEvent, mSocketHandle, EVFILT_READ, 0, 0, 0, (void*)this);
> +		EV_SET(&rEvent, mSocketHandle, EVFILT_READ, 0, 0, 0, (int)this);
>  	}

... etc ...

Is this 64 bit clean? I suspect it'll fail nastily if sizeof(void*) ! 
= sizeof(int).

I suspect on a platform where udata is an int rather than a pointer,  
we're going to have to keep an array full of our pointers, and use  
udata as an index into it.

Or give up and use poll() on those platforms, because it's not  
exactly much of a performance hit. It'll only have to make the poll  
structure once per incoming connection.

Is is possible to use autoconf to test for the type of a structure  
member?

Ben







More information about the Boxbackup-dev mailing list