[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
inet_addr() (Was: back-ldap)
At 08:06 AM 5/26/99 -0400, Ben Collins wrote:
>On Tue, May 25, 1999 at 05:31:35PM -0700, Howard Chu wrote:
>> I've committed all the changes for the slapd LDAP backend to devel. This
>> includes additions to configure.in and a new configure script, along with
>> the actual new code. It built and ran with no real difficulty, except:
>>
>> In slapd/main.c, "inet_aton" is undefined on my Solaris 2.5 box. I used the
>> inet_addr line instead (lines 130-135) to get past this hiccup. (Local patch
>> only, I didn't commit this change.) I don't believe inet_aton is commonly
>> present on older Unix libraries, but I haven't checked in depth.
>
>I noticed this same problem on BeOS. It seems a configure check and a few
>#ifdef's are needed, or stick with the least common denominator of
>inet_addr().
Replacing inet_aton() with inet_addr() is not as straight forward
as one might think. Besides the INADDR_NONE issue, special care
to use in a portable manner.
I guess we should configure define HAVE_INET_NTOA for us and
use this where inet_ntoa is needed. Of course, I rather use
a wrapper of some sort to localize the #ifdef hell.
Kurt