source: branches/samba-3.2.x/source/lib/replace/inet_ntoa.m4

Last change on this file was 133, checked in by Paul Smedley, 17 years ago

Update trunk to 3.2.0pre3

File size: 724 bytes
Line 
1AC_CHECK_FUNCS(inet_ntoa,[],[LIBREPLACEOBJ="${LIBREPLACEOBJ} inet_ntoa.o"])
2
3AC_CACHE_CHECK([for broken inet_ntoa],libreplace_cv_REPLACE_INET_NTOA,[
4AC_TRY_RUN([
5#include <stdio.h>
6#include <unistd.h>
7#include <sys/types.h>
8#include <netinet/in.h>
9#ifdef HAVE_ARPA_INET_H
10#include <arpa/inet.h>
11#endif
12main() { struct in_addr ip; ip.s_addr = 0x12345678;
13if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
14 strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); }
15exit(1);}],
16 libreplace_cv_REPLACE_INET_NTOA=yes,libreplace_cv_REPLACE_INET_NTOA=no,libreplace_cv_REPLACE_INET_NTOA=cross)])
17if test x"$libreplace_cv_REPLACE_INET_NTOA" = x"yes"; then
18 AC_DEFINE(REPLACE_INET_NTOA,1,[Whether inet_ntoa should be replaced])
19fi
Note: See TracBrowser for help on using the repository browser.