OLD | NEW |
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 /* ***** BEGIN LICENSE BLOCK ***** | 2 /* ***** BEGIN LICENSE BLOCK ***** |
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
4 * | 4 * |
5 * The contents of this file are subject to the Mozilla Public License Version | 5 * The contents of this file are subject to the Mozilla Public License Version |
6 * 1.1 (the "License"); you may not use this file except in compliance with | 6 * 1.1 (the "License"); you may not use this file except in compliance with |
7 * the License. You may obtain a copy of the License at | 7 * the License. You may obtain a copy of the License at |
8 * http://www.mozilla.org/MPL/ | 8 * http://www.mozilla.org/MPL/ |
9 * | 9 * |
10 * Software distributed under the License is distributed on an "AS IS" basis, | 10 * Software distributed under the License is distributed on an "AS IS" basis, |
(...skipping 2012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2023 #if !defined(_PR_HAVE_GETADDRINFO) | 2023 #if !defined(_PR_HAVE_GETADDRINFO) |
2024 return pr_GetAddrInfoByNameFB(hostname, af, flags); | 2024 return pr_GetAddrInfoByNameFB(hostname, af, flags); |
2025 #else | 2025 #else |
2026 #if defined(_PR_INET6_PROBE) | 2026 #if defined(_PR_INET6_PROBE) |
2027 if (!_pr_ipv6_is_present()) { | 2027 if (!_pr_ipv6_is_present()) { |
2028 return pr_GetAddrInfoByNameFB(hostname, af, flags); | 2028 return pr_GetAddrInfoByNameFB(hostname, af, flags); |
2029 } | 2029 } |
2030 #endif | 2030 #endif |
2031 { | 2031 { |
2032 PRADDRINFO *res, hints; | 2032 PRADDRINFO *res, hints; |
2033 PRStatus rv; | 2033 int rv; |
2034 | 2034 |
2035 /* | 2035 /* |
2036 * we assume a RFC 2553 compliant getaddrinfo. this may at some | 2036 * we assume a RFC 2553 compliant getaddrinfo. this may at some |
2037 * point need to be customized as platforms begin to adopt the | 2037 * point need to be customized as platforms begin to adopt the |
2038 * RFC 3493. | 2038 * RFC 3493. |
2039 */ | 2039 */ |
2040 | 2040 |
2041 memset(&hints, 0, sizeof(hints)); | 2041 memset(&hints, 0, sizeof(hints)); |
2042 if (!(flags & PR_AI_NOCANONNAME)) | 2042 if (!(flags & PR_AI_NOCANONNAME)) |
2043 hints.ai_flags |= AI_CANONNAME; | 2043 hints.ai_flags |= AI_CANONNAME; |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2365 #if !defined(_PR_HAVE_GETADDRINFO) | 2365 #if !defined(_PR_HAVE_GETADDRINFO) |
2366 return pr_NetAddrToStringFB(addr, string, size); | 2366 return pr_NetAddrToStringFB(addr, string, size); |
2367 #else | 2367 #else |
2368 #if defined(_PR_INET6_PROBE) | 2368 #if defined(_PR_INET6_PROBE) |
2369 if (!_pr_ipv6_is_present()) | 2369 if (!_pr_ipv6_is_present()) |
2370 return pr_NetAddrToStringFB(addr, string, size); | 2370 return pr_NetAddrToStringFB(addr, string, size); |
2371 #endif | 2371 #endif |
2372 return pr_NetAddrToStringGNI(addr, string, size); | 2372 return pr_NetAddrToStringGNI(addr, string, size); |
2373 #endif | 2373 #endif |
2374 } /* PR_NetAddrToString */ | 2374 } /* PR_NetAddrToString */ |
OLD | NEW |