From 10b214c2fd837d534eda75510a118f862d57da02 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Thu, 13 Feb 2003 02:11:10 +0000 Subject: [PATCH] Use configure to check for inet_aton. --- Modules/socketmodule.c | 2 +- configure | 5 +++-- configure.in | 2 +- pyconfig.h.in | 3 +++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 26e5e01be3a..d3ace6b70b5 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -2713,7 +2713,7 @@ socket_inet_aton(PyObject *self, PyObject *args) /* Have to use inet_addr() instead */ char *ip_addr; -#if 1 +#if HAVE_INET_ATON struct in_addr buf; if (!PyArg_ParseTuple(args, "s:inet_aton", &ip_addr)) { diff --git a/configure b/configure index c94f2a15169..e0837f7a7a5 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.386 . +# From configure.in Revision: 1.387 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53 for python 2.3. # @@ -12092,13 +12092,14 @@ echo "${ECHO_T}MACHDEP_OBJS" >&6 + for ac_func in alarm chown clock confstr ctermid execv \ fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \ gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \ getpriority getpwent getwd \ - hstrerror inet_pton kill killpg lchown lstat mkfifo mknod mktime \ + hstrerror inet_aton inet_pton kill killpg lchown lstat mkfifo mknod mktime \ mremap nice pathconf pause plock poll pthread_init \ putenv readlink \ select setegid seteuid setgid \ diff --git a/configure.in b/configure.in index 8011c970b13..8fce1cd9be0 100644 --- a/configure.in +++ b/configure.in @@ -1841,7 +1841,7 @@ AC_CHECK_FUNCS(alarm chown clock confstr ctermid execv \ fchdir flock fork fsync fdatasync fpathconf ftime ftruncate \ gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \ getpriority getpwent getwd \ - hstrerror inet_pton kill killpg lchown lstat mkfifo mknod mktime \ + hstrerror inet_aton inet_pton kill killpg lchown lstat mkfifo mknod mktime \ mremap nice pathconf pause plock poll pthread_init \ putenv readlink \ select setegid seteuid setgid \ diff --git a/pyconfig.h.in b/pyconfig.h.in index dea4722ea8b..c1697975bf5 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -207,6 +207,9 @@ /* Define to 1 if you have the `hypot' function. */ #undef HAVE_HYPOT +/* Define to 1 if you have the `inet_aton' function. */ +#undef HAVE_INET_ATON + /* Define to 1 if you have the `inet_pton' function. */ #undef HAVE_INET_PTON