Try this one:
#include <ns.h>
main()
{
unsigned char b[4];
struct in_addr addr;
addr.s_addr = inet_addr("127.0.0.1");
memcpy(b, &addr.s_addr, 4);
printf("%u.%u.%u.%u\n", b[0], b[1], b[2], b[3]);
}
Stephen Deasey wrote:
On 2/6/07, Vlad Seryakov <[EMAIL PROTECTED]> wrote:
On Linux HAVE_INET_NTOP is defined, i assume on OpenBSD not and
the part with the union is not working
It should be defined, because it seems to have it:
http://www.openbsd.org/cgi-bin/man.cgi?query=inet_ntop
Anyway, our custom test for this seems a bit over the top. Maybe it's
not correct? Other people seem to be just using AC_CHECK_FUNCS():
http://www.google.com/codesearch?q=file%3Aconfigure%5C.ac+inet_ntop
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel
--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/