Ignore:
Timestamp:
Mar 19, 2014, 11:11:30 AM (11 years ago)
Author:
dmik
Message:

python: Update vendor to 2.7.6.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/vendor/current/Modules/addrinfo.h

    r2 r388  
    22 * Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
    33 * All rights reserved.
    4  * 
     4 *
    55 * Redistribution and use in source and binary forms, with or without
    66 * modification, are permitted provided that the following conditions
     
    1414 *    may be used to endorse or promote products derived from this software
    1515 *    without specific prior written permission.
    16  * 
     16 *
    1717 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
    1818 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     
    5656#endif /* EAI_ADDRFAMILY */
    5757
    58 #define EAI_ADDRFAMILY   1      /* address family for hostname not supported */
    59 #define EAI_AGAIN        2      /* temporary failure in name resolution */
    60 #define EAI_BADFLAGS     3      /* invalid value for ai_flags */
    61 #define EAI_FAIL         4      /* non-recoverable failure in name resolution */
    62 #define EAI_FAMILY       5      /* ai_family not supported */
    63 #define EAI_MEMORY       6      /* memory allocation failure */
    64 #define EAI_NODATA       7      /* no address associated with hostname */
    65 #define EAI_NONAME       8      /* hostname nor servname provided, or not known */
    66 #define EAI_SERVICE      9      /* servname not supported for ai_socktype */
    67 #define EAI_SOCKTYPE    10      /* ai_socktype not supported */
    68 #define EAI_SYSTEM      11      /* system error returned in errno */
    69 #define EAI_BADHINTS    12
    70 #define EAI_PROTOCOL    13
    71 #define EAI_MAX         14
     58#define EAI_ADDRFAMILY   1      /* address family for hostname not supported */
     59#define EAI_AGAIN        2      /* temporary failure in name resolution */
     60#define EAI_BADFLAGS     3      /* invalid value for ai_flags */
     61#define EAI_FAIL         4      /* non-recoverable failure in name resolution */
     62#define EAI_FAMILY       5      /* ai_family not supported */
     63#define EAI_MEMORY       6      /* memory allocation failure */
     64#define EAI_NODATA       7      /* no address associated with hostname */
     65#define EAI_NONAME       8      /* hostname nor servname provided, or not known */
     66#define EAI_SERVICE      9      /* servname not supported for ai_socktype */
     67#define EAI_SOCKTYPE    10      /* ai_socktype not supported */
     68#define EAI_SYSTEM      11      /* system error returned in errno */
     69#define EAI_BADHINTS    12
     70#define EAI_PROTOCOL    13
     71#define EAI_MAX         14
    7272
    7373/*
     
    8686#endif /* AI_PASSIVE */
    8787
    88 #define AI_PASSIVE      0x00000001 /* get address to use bind() */
    89 #define AI_CANONNAME    0x00000002 /* fill ai_canonname */
    90 #define AI_NUMERICHOST  0x00000004 /* prevent name resolution */
     88#define AI_PASSIVE      0x00000001 /* get address to use bind() */
     89#define AI_CANONNAME    0x00000002 /* fill ai_canonname */
     90#define AI_NUMERICHOST  0x00000004 /* prevent name resolution */
    9191/* valid flags for addrinfo */
    92 #define AI_MASK         (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST)
     92#define AI_MASK         (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST)
    9393
    94 #define AI_ALL          0x00000100 /* IPv6 and IPv4-mapped (with AI_V4MAPPED) */
    95 #define AI_V4MAPPED_CFG 0x00000200 /* accept IPv4-mapped if kernel supports */
    96 #define AI_ADDRCONFIG   0x00000400 /* only if any address is assigned */
    97 #define AI_V4MAPPED     0x00000800 /* accept IPv4-mapped IPv6 address */
     94#define AI_ALL          0x00000100 /* IPv6 and IPv4-mapped (with AI_V4MAPPED) */
     95#define AI_V4MAPPED_CFG 0x00000200 /* accept IPv4-mapped if kernel supports */
     96#define AI_ADDRCONFIG   0x00000400 /* only if any address is assigned */
     97#define AI_V4MAPPED     0x00000800 /* accept IPv4-mapped IPv6 address */
    9898/* special recommended flags for getipnodebyname */
    99 #define AI_DEFAULT      (AI_V4MAPPED_CFG | AI_ADDRCONFIG)
     99#define AI_DEFAULT      (AI_V4MAPPED_CFG | AI_ADDRCONFIG)
    100100
    101101#endif /* !HAVE_GETADDRINFO */
     
    107107 */
    108108#ifndef NI_MAXHOST
    109 #define NI_MAXHOST      1025
    110 #define NI_MAXSERV      32
     109#define NI_MAXHOST      1025
     110#define NI_MAXSERV      32
    111111#endif /* !NI_MAXHOST */
    112112
     
    115115 */
    116116#ifndef NI_NOFQDN
    117 #define NI_NOFQDN       0x00000001
    118 #define NI_NUMERICHOST  0x00000002
    119 #define NI_NAMEREQD     0x00000004
    120 #define NI_NUMERICSERV  0x00000008
    121 #define NI_DGRAM        0x00000010
     117#define NI_NOFQDN       0x00000001
     118#define NI_NUMERICHOST  0x00000002
     119#define NI_NAMEREQD     0x00000004
     120#define NI_NUMERICSERV  0x00000008
     121#define NI_DGRAM        0x00000010
    122122#endif /* !NI_NOFQDN */
    123123
     
    126126#ifndef HAVE_ADDRINFO
    127127struct addrinfo {
    128         int     ai_flags;       /* AI_PASSIVE, AI_CANONNAME */
    129         int     ai_family;      /* PF_xxx */
    130         int     ai_socktype;    /* SOCK_xxx */
    131         int     ai_protocol;    /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
    132         size_t  ai_addrlen;     /* length of ai_addr */
    133         char    *ai_canonname;  /* canonical name for hostname */
    134         struct sockaddr *ai_addr;       /* binary address */
    135         struct addrinfo *ai_next;       /* next structure in linked list */
     128    int         ai_flags;       /* AI_PASSIVE, AI_CANONNAME */
     129    int         ai_family;      /* PF_xxx */
     130    int         ai_socktype;    /* SOCK_xxx */
     131    int         ai_protocol;    /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
     132    size_t      ai_addrlen;     /* length of ai_addr */
     133    char        *ai_canonname;  /* canonical name for hostname */
     134    struct sockaddr *ai_addr;           /* binary address */
     135    struct addrinfo *ai_next;           /* next structure in linked list */
    136136};
    137137#endif /* !HAVE_ADDRINFO */
     
    141141 * RFC 2553: protocol-independent placeholder for socket addresses
    142142 */
    143 #define _SS_MAXSIZE     128
     143#define _SS_MAXSIZE     128
    144144#ifdef HAVE_LONG_LONG
    145 #define _SS_ALIGNSIZE   (sizeof(PY_LONG_LONG))
     145#define _SS_ALIGNSIZE   (sizeof(PY_LONG_LONG))
    146146#else
    147 #define _SS_ALIGNSIZE   (sizeof(double))
     147#define _SS_ALIGNSIZE   (sizeof(double))
    148148#endif /* HAVE_LONG_LONG */
    149 #define _SS_PAD1SIZE    (_SS_ALIGNSIZE - sizeof(u_char) * 2)
    150 #define _SS_PAD2SIZE    (_SS_MAXSIZE - sizeof(u_char) * 2 - \
    151                                 _SS_PAD1SIZE - _SS_ALIGNSIZE)
     149#define _SS_PAD1SIZE    (_SS_ALIGNSIZE - sizeof(u_char) * 2)
     150#define _SS_PAD2SIZE    (_SS_MAXSIZE - sizeof(u_char) * 2 - \
     151                _SS_PAD1SIZE - _SS_ALIGNSIZE)
    152152
    153153struct sockaddr_storage {
    154154#ifdef HAVE_SOCKADDR_SA_LEN
    155         unsigned char ss_len;           /* address length */
    156         unsigned char ss_family;        /* address family */
     155    unsigned char ss_len;               /* address length */
     156    unsigned char ss_family;            /* address family */
    157157#else
    158         unsigned short ss_family;       /* address family */
     158    unsigned short ss_family;           /* address family */
    159159#endif /* HAVE_SOCKADDR_SA_LEN */
    160         char    __ss_pad1[_SS_PAD1SIZE];
     160    char        __ss_pad1[_SS_PAD1SIZE];
    161161#ifdef HAVE_LONG_LONG
    162         PY_LONG_LONG __ss_align;        /* force desired structure storage alignment */
     162    PY_LONG_LONG __ss_align;            /* force desired structure storage alignment */
    163163#else
    164         double __ss_align;      /* force desired structure storage alignment */
     164    double __ss_align;          /* force desired structure storage alignment */
    165165#endif /* HAVE_LONG_LONG */
    166         char    __ss_pad2[_SS_PAD2SIZE];
     166    char        __ss_pad2[_SS_PAD2SIZE];
    167167};
    168168#endif /* !HAVE_SOCKADDR_STORAGE */
Note: See TracChangeset for help on using the changeset viewer.