diff options
| author | Tobias Markmann <tm@ayena.de> | 2015-09-24 18:59:52 (GMT) |
|---|---|---|
| committer | Swift Review <review@swift.im> | 2015-10-30 14:13:39 (GMT) |
| commit | 3d62970e1b929cf676202fc6cebc1cf426c14ff2 (patch) | |
| tree | a68c82c3829a001c6f8cadbb2d68d91c98f617bf /3rdParty/LibIDN/src/idna.h | |
| parent | 3cc7e86420e4b3d67c5882d8d68e1e6a003c6154 (diff) | |
| download | swift-3d62970e1b929cf676202fc6cebc1cf426c14ff2.zip swift-3d62970e1b929cf676202fc6cebc1cf426c14ff2.tar.bz2 | |
Update libIDN in 3rdParty to version 1.32
Updated existing libIDN files in 3rdParty folder to latest
1.32 version and added remaining dependencies for compilation.
Updated SConscript file accordingly.
Test-Information:
Build and ran test=unit on OS X 10.10.
Change-Id: Iec6506e1cc88fe2983b2019aca95a42580d1c80e
Diffstat (limited to '3rdParty/LibIDN/src/idna.h')
| -rw-r--r-- | 3rdParty/LibIDN/src/idna.h | 117 |
1 files changed, 70 insertions, 47 deletions
diff --git a/3rdParty/LibIDN/src/idna.h b/3rdParty/LibIDN/src/idna.h index f6b24ac..f214075 100644 --- a/3rdParty/LibIDN/src/idna.h +++ b/3rdParty/LibIDN/src/idna.h | |||
| @@ -1,37 +1,57 @@ | |||
| 1 | /* idna.h --- Declarations for Internationalized Domain Name in Applications. | 1 | /* idna.h --- Prototypes for Internationalized Domain Name library. |
| 2 | * Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Simon Josefsson | 2 | Copyright (C) 2002-2015 Simon Josefsson |
| 3 | * | ||
| 4 | * This file is part of GNU Libidn. | ||
| 5 | * | ||
| 6 | * GNU Libidn is free software; you can redistribute it and/or | ||
| 7 | * modify it under the terms of the GNU Lesser General Public | ||
| 8 | * License as published by the Free Software Foundation; either | ||
| 9 | * version 2.1 of the License, or (at your option) any later version. | ||
| 10 | * | ||
| 11 | * GNU Libidn is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 14 | * Lesser General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU Lesser General Public | ||
| 17 | * License along with GNU Libidn; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA | ||
| 19 | * | ||
| 20 | */ | ||
| 21 | |||
| 22 | #ifndef _IDNA_H | ||
| 23 | # define _IDNA_H | ||
| 24 | 3 | ||
| 25 | # ifdef __cplusplus | 4 | This file is part of GNU Libidn. |
| 26 | extern "C" | 5 | |
| 27 | { | 6 | GNU Libidn is free software: you can redistribute it and/or |
| 7 | modify it under the terms of either: | ||
| 8 | |||
| 9 | * the GNU Lesser General Public License as published by the Free | ||
| 10 | Software Foundation; either version 3 of the License, or (at | ||
| 11 | your option) any later version. | ||
| 12 | |||
| 13 | or | ||
| 14 | |||
| 15 | * the GNU General Public License as published by the Free | ||
| 16 | Software Foundation; either version 2 of the License, or (at | ||
| 17 | your option) any later version. | ||
| 18 | |||
| 19 | or both in parallel, as here. | ||
| 20 | |||
| 21 | GNU Libidn is distributed in the hope that it will be useful, | ||
| 22 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 24 | General Public License for more details. | ||
| 25 | |||
| 26 | You should have received copies of the GNU General Public License and | ||
| 27 | the GNU Lesser General Public License along with this program. If | ||
| 28 | not, see <http://www.gnu.org/licenses/>. */ | ||
| 29 | |||
| 30 | #ifndef IDNA_H | ||
| 31 | # define IDNA_H | ||
| 32 | |||
| 33 | # ifndef IDNAPI | ||
| 34 | # if defined LIBIDN_BUILDING && defined HAVE_VISIBILITY && HAVE_VISIBILITY | ||
| 35 | # define IDNAPI __attribute__((__visibility__("default"))) | ||
| 36 | # elif defined LIBIDN_BUILDING && defined _MSC_VER && ! defined LIBIDN_STATIC | ||
| 37 | # define IDNAPI __declspec(dllexport) | ||
| 38 | # elif defined _MSC_VER && ! defined LIBIDN_STATIC | ||
| 39 | # define IDNAPI __declspec(dllimport) | ||
| 40 | # else | ||
| 41 | # define IDNAPI | ||
| 42 | # endif | ||
| 28 | # endif | 43 | # endif |
| 29 | 44 | ||
| 30 | # include <stddef.h> /* size_t */ | 45 | # include <stddef.h> /* size_t */ |
| 31 | # include <idn-int.h> /* uint32_t */ | 46 | # include <idn-int.h> /* uint32_t */ |
| 32 | 47 | ||
| 48 | # ifdef __cplusplus | ||
| 49 | extern "C" | ||
| 50 | { | ||
| 51 | # endif | ||
| 52 | |||
| 33 | /* Error codes. */ | 53 | /* Error codes. */ |
| 34 | typedef enum | 54 | typedef enum |
| 35 | { | 55 | { |
| 36 | IDNA_SUCCESS = 0, | 56 | IDNA_SUCCESS = 0, |
| 37 | IDNA_STRINGPREP_ERROR = 1, | 57 | IDNA_STRINGPREP_ERROR = 1, |
| @@ -59,42 +79,45 @@ extern "C" | |||
| 59 | 79 | ||
| 60 | # ifndef IDNA_ACE_PREFIX | 80 | # ifndef IDNA_ACE_PREFIX |
| 61 | # define IDNA_ACE_PREFIX "xn--" | 81 | # define IDNA_ACE_PREFIX "xn--" |
| 62 | # endif | 82 | # endif |
| 63 | 83 | ||
| 64 | extern const char *idna_strerror (Idna_rc rc); | 84 | extern IDNAPI const char *idna_strerror (Idna_rc rc); |
| 65 | 85 | ||
| 66 | /* Core functions */ | 86 | /* Core functions */ |
| 67 | extern int idna_to_ascii_4i (const uint32_t * in, size_t inlen, | 87 | extern IDNAPI int idna_to_ascii_4i (const uint32_t * in, size_t inlen, |
| 68 | char *out, int flags); | 88 | char *out, int flags); |
| 69 | extern int idna_to_unicode_44i (const uint32_t * in, size_t inlen, | 89 | extern IDNAPI int idna_to_unicode_44i (const uint32_t * in, size_t inlen, |
| 70 | uint32_t * out, size_t * outlen, int flags); | 90 | uint32_t * out, size_t * outlen, |
| 91 | int flags); | ||
| 71 | 92 | ||
| 72 | /* Wrappers that handle several labels */ | 93 | /* Wrappers that handle several labels */ |
| 73 | 94 | ||
| 74 | extern int idna_to_ascii_4z (const uint32_t * input, | 95 | extern IDNAPI int idna_to_ascii_4z (const uint32_t * input, |
| 75 | char **output, int flags); | 96 | char **output, int flags); |
| 76 | 97 | ||
| 77 | extern int idna_to_ascii_8z (const char *input, char **output, int flags); | 98 | extern IDNAPI int idna_to_ascii_8z (const char *input, char **output, |
| 99 | int flags); | ||
| 78 | 100 | ||
| 79 | extern int idna_to_ascii_lz (const char *input, char **output, int flags); | 101 | extern IDNAPI int idna_to_ascii_lz (const char *input, char **output, |
| 102 | int flags); | ||
| 80 | 103 | ||
| 104 | extern IDNAPI int idna_to_unicode_4z4z (const uint32_t * input, | ||
| 105 | uint32_t ** output, int flags); | ||
| 81 | 106 | ||
| 82 | extern int idna_to_unicode_4z4z (const uint32_t * input, | 107 | extern IDNAPI int idna_to_unicode_8z4z (const char *input, |
| 83 | uint32_t ** output, int flags); | 108 | uint32_t ** output, int flags); |
| 84 | 109 | ||
| 85 | extern int idna_to_unicode_8z4z (const char *input, | 110 | extern IDNAPI int idna_to_unicode_8z8z (const char *input, |
| 86 | uint32_t ** output, int flags); | 111 | char **output, int flags); |
| 87 | 112 | ||
| 88 | extern int idna_to_unicode_8z8z (const char *input, | 113 | extern IDNAPI int idna_to_unicode_8zlz (const char *input, |
| 89 | char **output, int flags); | 114 | char **output, int flags); |
| 90 | 115 | ||
| 91 | extern int idna_to_unicode_8zlz (const char *input, | 116 | extern IDNAPI int idna_to_unicode_lzlz (const char *input, |
| 92 | char **output, int flags); | 117 | char **output, int flags); |
| 93 | |||
| 94 | extern int idna_to_unicode_lzlz (const char *input, | ||
| 95 | char **output, int flags); | ||
| 96 | 118 | ||
| 97 | # ifdef __cplusplus | 119 | # ifdef __cplusplus |
| 98 | } | 120 | } |
| 99 | # endif | 121 | # endif |
| 100 | #endif /* _IDNA_H */ | 122 | |
| 123 | #endif /* IDNA_H */ | ||
Swift