bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gdomap bug - patch


From: Pete French
Subject: Re: gdomap bug - patch
Date: Fri, 25 Jan 2002 22:19:41 +0000

> Thanks ... I added your patch with a slight modification and all the
> associated autoconf stuff to decide whether the system has variable 

Hmm, how did you do that ? It doesnt seem to work here (and I re-ran
the configure script). Is it supposed to set HAVE_SA_LEN if the
system has variable length records ? It doesnt seem to do so
on this machine...

I dont know of a way to detect this behaviour either, how is
autoconf doing it ? I did think about tyring to detect this at runtime,
but couldnt come up with a suitable way to do it. A Linux box should
have the sa_len field in it anyway, and hopefully it will be correct?

> data structures with an sa_length field or not ... presumably only the 
> recent BSDs do (certainly linux doesn't).

I was assuming it would work unmodified on older systems. What
does Linux give for the contents of sa_len in the socket structure ?
The only older UNIX I have to hand is the OpenStep BSD 4.3 system
and I havent had a chance to try that yet.

BTW, I did notice that I made an error in my code anyway - the pointer
advance line should read:

ifr_ptr += sizeof(ifreq) - sizeof(ifreq.ifr_addr) + ifreq.ifr_addr.sa_len;

as it needs to subtract the old (wrong) address of the structure before adding
the correct one. I was subtracting the size of the name field, which gives
the same result at the moment as both are 16, but that cant be guaranteed
in the future.

cheers,

-pete. [off to try some tests]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]