This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author plusk
Recipients
Date 2004-08-05.12:25:17
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=1083789

But configure thinks it's buggy:

configure:14229: checking getaddrinfo bug
configure:14332: gcc -o conftest -g -O2   conftest.c -lcl -
lnsl -lrt -ldld  -lpthread >&5
configure:14335: $? = 0
configure:14337: ./conftest
configure:14340: $? = 1
configure: program exited with status 1
configure: failed program was:
| #line 14236 "configure"
| /* confdefs.h.  */
|
| #define _GNU_SOURCE 1
| #define _NETBSD_SOURCE 1
| #define __BSD_VISIBLE 1
| #define _XOPEN_SOURCE 600
| #define _XOPEN_SOURCE_EXTENDED 1
| #define _POSIX_C_SOURCE 200112L
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define HAVE_FCNTL_H 1
| #define HAVE_GRP_H 1
| #define HAVE_LANGINFO_H 1
| #define HAVE_POLL_H 1
| #define HAVE_PTHREAD_H 1
| #define HAVE_STROPTS_H 1
| #define HAVE_TERMIOS_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_UTIME_H 1
| #define HAVE_SYS_BSDTTY_H 1
| #define HAVE_SYS_FILE_H 1
| #define HAVE_SYS_LOCK_H 1
| #define HAVE_SYS_MODEM_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_POLL_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TIMES_H 1
| #define HAVE_SYS_UN_H 1
| #define HAVE_SYS_UTSNAME_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_TERM_H 1
| #define HAVE_SYS_RESOURCE_H 1
| #define HAVE_SYSEXITS_H 1
| #define HAVE_DIRENT_H 1
| #define MAJOR_IN_SYSMACROS 1
| #define _LARGEFILE_SOURCE 1
| #define _FILE_OFFSET_BITS 64
| #if defined(SCO_DS)
| #undef _OFF_T
| #endif
| #define RETSIGTYPE void
| #define SIZEOF_INT 4
| #define SIZEOF_LONG 4
| #define SIZEOF_VOID_P 4
| #define SIZEOF_SHORT 2
| #define SIZEOF_FLOAT 4
| #define SIZEOF_DOUBLE 8
| #define SIZEOF_FPOS_T 8
| #define HAVE_LONG_LONG 1
| #define SIZEOF_LONG_LONG 8
| #define SIZEOF_OFF_T 8
| #define HAVE_LARGEFILE_SUPPORT 1
| #define SIZEOF_TIME_T 4
| #define SIZEOF_PTHREAD_T 4
| #define HAVE_LIBDLD 1
| #define _REENTRANT 1
| #define WITH_THREAD 1
| #define _POSIX_THREADS 1
| #define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
| #define HAVE_PTHREAD_SIGMASK 1
| #define WITH_DOC_STRINGS 1
| #define WITH_PYMALLOC 1
| #define HAVE_DLOPEN 1
| #define HAVE_DYNAMIC_LOADING 1
| #define HAVE_ALARM 1
| #define HAVE_CHOWN 1
| #define HAVE_CLOCK 1
| #define HAVE_CONFSTR 1
| #define HAVE_CTERMID 1
| #define HAVE_EXECV 1
| #define HAVE_FORK 1
| #define HAVE_FPATHCONF 1
| #define HAVE_FTIME 1
| #define HAVE_FTRUNCATE 1
| #define HAVE_GAI_STRERROR 1
| #define HAVE_GETGROUPS 1
| #define HAVE_GETLOGIN 1
| #define HAVE_GETPEERNAME 1
| #define HAVE_GETPGID 1
| #define HAVE_GETPID 1
| #define HAVE_GETPRIORITY 1
| #define HAVE_GETPWENT 1
| #define HAVE_GETSID 1
| #define HAVE_GETWD 1
| #define HAVE_KILL 1
| #define HAVE_KILLPG 1
| #define HAVE_LCHOWN 1
| #define HAVE_LSTAT 1
| #define HAVE_MKFIFO 1
| #define HAVE_MKNOD 1
| #define HAVE_MKTIME 1
| #define HAVE_NICE 1
| #define HAVE_PATHCONF 1
| #define HAVE_PAUSE 1
| #define HAVE_PLOCK 1
| #define HAVE_POLL 1
| #define HAVE_PUTENV 1
| #define HAVE_READLINK 1
| #define HAVE_REALPATH 1
| #define HAVE_SELECT 1
| #define HAVE_SETGID 1
| #define HAVE_SETLOCALE 1
| #define HAVE_SETREGID 1
| #define HAVE_SETREUID 1
| #define HAVE_SETSID 1
| #define HAVE_SETPGID 1
| #define HAVE_SETPGRP 1
| #define HAVE_SETUID 1
| #define HAVE_SETVBUF 1
| #define HAVE_SNPRINTF 1
| #define HAVE_SIGACTION 1
| #define HAVE_SIGINTERRUPT 1
| #define HAVE_SIGRELSE 1
| #define HAVE_STRFTIME 1
| #define HAVE_SYSCONF 1
| #define HAVE_TCGETPGRP 1
| #define HAVE_TCSETPGRP 1
| #define HAVE_TEMPNAM 1
| #define HAVE_TIMES 1
| #define HAVE_TMPFILE 1
| #define HAVE_TMPNAM 1
| #define HAVE_TRUNCATE 1
| #define HAVE_UNAME 1
| #define HAVE_UTIMES 1
| #define HAVE_WAITPID 1
| #define HAVE_WCSCOLL 1
| #define HAVE_CHROOT 1
| #define HAVE_LINK 1
| #define HAVE_SYMLINK 1
| #define HAVE_FCHDIR 1
| #define HAVE_FSYNC 1
| #define HAVE_FDATASYNC 1
| #define HAVE_GETPAGESIZE 1
| #define HAVE_INET_ATON 1
| #define HAVE_INET_PTON 1
| #define HAVE_SETGROUPS 1
| #define HAVE_FSEEKO 1
| #define HAVE_FSTATVFS 1
| #define HAVE_FTELLO 1
| #define HAVE_STATVFS 1
| #define HAVE_DUP2 1
| #define HAVE_GETCWD 1
| #define HAVE_STRDUP 1
| #define HAVE_STRERROR 1
| #define HAVE_MEMMOVE 1
| #define HAVE_GETPGRP 1
| #define HAVE_SETPGRP 1
| #define HAVE_GETTIMEOFDAY 1
| /* end confdefs.h.  */
|
| #include <sys/types.h>
| #include <netdb.h>
| #include <string.h>
| #include <sys/socket.h>
| #include <netinet/in.h>
|
| main()
| {
|   int passive, gaierr, inet4 = 0, inet6 = 0;
|   struct addrinfo hints, *ai, *aitop;
|   char straddr[INET6_ADDRSTRLEN], strport[16];
|
|   for (passive = 0; passive <= 1; passive++) {
|     memset(&hints, 0, sizeof(hints));
|     hints.ai_family = AF_UNSPEC;
|     hints.ai_flags = passive ? AI_PASSIVE : 0;
|     hints.ai_socktype = SOCK_STREAM;
|     hints.ai_protocol = IPPROTO_TCP;
|     if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) !
= 0) {
|       (void)gai_strerror(gaierr);
|       goto bad;
|     }
|     for (ai = aitop; ai; ai = ai->ai_next) {
|       if (ai->ai_addr == NULL ||
|           ai->ai_addrlen == 0 ||
|           getnameinfo(ai->ai_addr, ai->ai_addrlen,
|                       straddr, sizeof(straddr), strport, sizeof
(strport),
|                       NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
|         goto bad;
|       }
|       switch (ai->ai_family) {
|       case AF_INET:
|         if (strcmp(strport, "54321") != 0) {
|           goto bad;
|         }
|         if (passive) {
|           if (strcmp(straddr, "0.0.0.0") != 0) {
|             goto bad;
|           }
|         } else {
|           if (strcmp(straddr, "127.0.0.1") != 0) {
|             goto bad;
|           }
|         }
|         inet4++;
|         break;
|       case AF_INET6:
|         if (strcmp(strport, "54321") != 0) {
|           goto bad;
|         }
|         if (passive) {
|           if (strcmp(straddr, "::") != 0) {
|             goto bad;
|           }
|         } else {
|           if (strcmp(straddr, "::1") != 0) {
|             goto bad;
|           }
|         }
|         inet6++;
|         break;
|       case AF_UNSPEC:
|         goto bad;
|         break;
|       default:
|         /* another family support? */
|         break;
|       }
|     }
|   }
|
|   if (!(inet4 == 0 || inet4 == 2))
|     goto bad;
|   if (!(inet6 == 0 || inet6 == 2))
|     goto bad;
|
|   if (aitop)
|     freeaddrinfo(aitop);
|   exit(0);
|
|  bad:
|   if (aitop)
|     freeaddrinfo(aitop);
|   exit(1);
| }
|
configure:14351: result: buggy
History
Date User Action Args
2007-08-23 14:23:40adminlinkissue991125 messages
2007-08-23 14:23:40admincreate