Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3)

Side by Side Diff: Modules/getnameinfo.c

Issue 3871: cross and native build of python for mingw32 with distutils
Patch Set: Created 7 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Modules/getaddrinfo.c ('k') | Modules/_io/fileio.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 2 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 28 matching lines...) Expand all
39 #include <sys/socket.h> 39 #include <sys/socket.h>
40 #include <netinet/in.h> 40 #include <netinet/in.h>
41 #include <arpa/inet.h> 41 #include <arpa/inet.h>
42 #include <arpa/nameser.h> 42 #include <arpa/nameser.h>
43 #include <netdb.h> 43 #include <netdb.h>
44 #include <resolv.h> 44 #include <resolv.h>
45 #include <string.h> 45 #include <string.h>
46 #include <stddef.h> 46 #include <stddef.h>
47 47
48 #include "addrinfo.h" 48 #include "addrinfo.h"
49 #endif
50
51 #ifndef IN_EXPERIMENTAL
52 #define IN_EXPERIMENTAL(i) (((i) & 0xe0000000U) == 0xe0000000U)
53 #endif
54
55 #ifndef IN_LOOPBACKNET
56 #define IN_LOOPBACKNET 127
49 #endif 57 #endif
50 58
51 #define SUCCESS 0 59 #define SUCCESS 0
52 #define YES 1 60 #define YES 1
53 #define NO 0 61 #define NO 0
54 62
55 static struct gni_afd { 63 static struct gni_afd {
56 int a_af; 64 int a_af;
57 int a_addrlen; 65 int a_addrlen;
58 int a_socklen; 66 int a_socklen;
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 if (inet_ntop(gni_afd->a_af, addr, numaddr, sizeof(numaddr)) 213 if (inet_ntop(gni_afd->a_af, addr, numaddr, sizeof(numaddr))
206 == NULL) 214 == NULL)
207 return ENI_NOHOSTNAME; 215 return ENI_NOHOSTNAME;
208 if (strlen(numaddr) > hostlen) 216 if (strlen(numaddr) > hostlen)
209 return ENI_MEMORY; 217 return ENI_MEMORY;
210 strcpy(host, numaddr); 218 strcpy(host, numaddr);
211 } 219 }
212 } 220 }
213 return SUCCESS; 221 return SUCCESS;
214 } 222 }
OLDNEW
« no previous file with comments | « Modules/getaddrinfo.c ('k') | Modules/_io/fileio.c » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+