Changeset 1538


Ignore:
Timestamp:
Dec 21, 2018, 6:53:57 PM (7 years ago)
Author:
Silvan Scherrer
Message:

adjust getaddrinfo and friends to latest libcx

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk/Modules/socketmodule.h

    r391 r1538  
    1212#  include <netinet/tcp.h>
    1313# endif
     14#ifdef __OS2__
     15#include <libcx/net.h>
     16#endif
    1417
    1518#else /* MS_WINDOWS */
  • python/trunk/configure.ac

    r1150 r1538  
    32493249#include <sys/socket.h>
    32503250#include <netinet/in.h>
     3251#ifdef __OS2__
     3252#include <libcx/net.h>
     3253#endif
    32513254
    32523255int main()
     
    32543257  int passive, gaierr, inet4 = 0, inet6 = 0;
    32553258  struct addrinfo hints, *ai, *aitop;
     3259#ifndef __OS2__
    32563260  char straddr[INET6_ADDRSTRLEN], strport[16];
     3261#else
     3262  char straddr[NI_MAXHOST], strport[NI_MAXSERV];
     3263#endif
    32573264
    32583265  for (passive = 0; passive <= 1; passive++) {
     
    32903297        inet4++;
    32913298        break;
     3299#ifndef __OS2__
    32923300      case AF_INET6:
    32933301        if (strcmp(strport, "54321") != 0) {
     
    33053313        inet6++;
    33063314        break;
     3315#endif
    33073316      case AF_UNSPEC:
    33083317        goto bad;
     
    33943403AC_MSG_CHECKING(for addrinfo)
    33953404AC_CACHE_VAL(ac_cv_struct_addrinfo,
    3396 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]], [[struct addrinfo a]])],
     3405AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
     3406  #include <netdb.h>
     3407  #ifdef __OS2__
     3408  #include <libcx/net.h>
     3409  #endif
     3410  ]], [[struct addrinfo a]])],
    33973411  [ac_cv_struct_addrinfo=yes],
    33983412  [ac_cv_struct_addrinfo=no]))
     
    45194533#include <sys/socket.h>
    45204534#endif
     4535#ifdef __OS2__
     4536#include <libcx/net.h>
     4537#endif
    45214538])
    45224539
Note: See TracChangeset for help on using the changeset viewer.