Remove declaration of h_errno, since it is supposedly declared in netdb.h.
Changes proposed by itojun.
struct gai_afd *gai_afd;
int i, error = 0, h_error;
char *ap;
-#if !defined(INET6) && !defined(h_errno)
- /* In winsock.h, h_errno is #defined as a function call. */
- extern int h_errno;
-#endif
top = NULL;
sentinel.ai_next = NULL;
if (h == NULL) {
/* Let's get real error message to return */
-#ifndef h_errno
- extern int h_errno;
-#endif
PyH_Err(h_errno);
return NULL;
}
return NULL;
}
if (PyInt_Check(pobj)) {
+#ifndef HAVE_SNPRINTF
+ sprintf(pbuf, "%ld", PyInt_AsLong(pobj));
+#else
snprintf(pbuf, sizeof(pbuf), "%ld", PyInt_AsLong(pobj));
+#endif
pptr = pbuf;
} else if (PyString_Check(pobj)) {
pptr = PyString_AsString(pobj);
n = PyArg_ParseTuple(sa, "si|ii", &hostp, &port, &flowinfo, scope_id);
if (n == 0)
goto fail;
+#ifdef HAVE_SPRINTF
snprintf(pbuf, sizeof(pbuf), "%d", port);
+#else
+ sprintf(pbuf, "%d", port);
+#endif
memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC;
error = getaddrinfo(hostp, pbuf, &hints, &res);
/* Define if you have the sigrelse function. */
#undef HAVE_SIGRELSE
+/* Define if you have the snprintf function. */
+#undef HAVE_SNPRINTF
+
/* Define if you have the statvfs function. */
#undef HAVE_STATVFS
#! /bin/sh
-# From configure.in Revision: 1.232
+# From configure.in Revision: 1.233
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13
nice pathconf pause plock poll pthread_init \
putenv readlink \
select setegid seteuid setgid \
- setlocale setregid setreuid setsid setpgid setuid setvbuf \
+ setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
truncate uname waitpid _getpty getpriority
nice pathconf pause plock poll pthread_init \
putenv readlink \
select setegid seteuid setgid \
- setlocale setregid setreuid setsid setpgid setuid setvbuf \
+ setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
truncate uname waitpid _getpty getpriority)