diff options
-rw-r--r-- | lib/libgnutls.map | 2 | ||||
-rw-r--r-- | lib/str-unicode.c | 6 | ||||
-rw-r--r-- | lib/str.h | 7 | ||||
-rw-r--r-- | tests/str-idna.c | 6 |
4 files changed, 11 insertions, 10 deletions
diff --git a/lib/libgnutls.map b/lib/libgnutls.map index 25de038dbd..a15c1a3ca9 100644 --- a/lib/libgnutls.map +++ b/lib/libgnutls.map @@ -1198,5 +1198,5 @@ GNUTLS_PRIVATE_3_4 { # Internal symbols needed by tests/name-constraints-merge: _gnutls_x509_name_constraints_merge; _gnutls_server_name_set_raw; - gnutls_idna_map; + _gnutls_idna_map; }; diff --git a/lib/str-unicode.c b/lib/str-unicode.c index f8d6880e63..4be4b6e2a6 100644 --- a/lib/str-unicode.c +++ b/lib/str-unicode.c @@ -147,7 +147,7 @@ int gnutls_utf8_password_normalize(const unsigned char *password, unsigned passw #ifdef HAVE_LIBIDN /*- - * gnutls_idna_map: + * _gnutls_idna_map: * @input: contain the UTF-8 formatted domain name * @ilen: the length of the provided string * @out: the result in an null-terminated allocated string @@ -163,7 +163,7 @@ int gnutls_utf8_password_normalize(const unsigned char *password, unsigned passw * * Since: 3.5.7 -*/ -int gnutls_idna_map(const char *input, unsigned ilen, gnutls_datum_t *out, unsigned flags) +int _gnutls_idna_map(const char *input, unsigned ilen, gnutls_datum_t *out, unsigned flags) { char *idna = NULL; int rc, ret; @@ -207,7 +207,7 @@ int gnutls_idna_map(const char *input, unsigned ilen, gnutls_datum_t *out, unsig #else # undef gnutls_idna_map -int gnutls_idna_map(const char *input, unsigned ilen, gnutls_datum_t *out, unsigned flags) +int _gnutls_idna_map(const char *input, unsigned ilen, gnutls_datum_t *out, unsigned flags) { return gnutls_assert_val(GNUTLS_E_UNIMPLEMENTED_FEATURE); } @@ -46,7 +46,7 @@ int gnutls_utf8_password_normalize(const uint8_t *password, unsigned password_le #ifndef HAVE_LIBIDN inline static -int _gnutls_idna_map(const char *input, unsigned ilen, gnutls_datum_t *out, unsigned flags) +int __gnutls_idna_map(const char *input, unsigned ilen, gnutls_datum_t *out, unsigned flags) { out->data = gnutls_malloc(ilen+1); if (out->data == NULL) @@ -56,9 +56,10 @@ int _gnutls_idna_map(const char *input, unsigned ilen, gnutls_datum_t *out, unsi out->data[ilen] = 0; return 0; } -# define gnutls_idna_map _gnutls_idna_map +# define gnutls_idna_map __gnutls_idna_map #else -int gnutls_idna_map(const char * input, unsigned ilen, gnutls_datum_t *out, unsigned flags); +# define gnutls_idna_map _gnutls_idna_map +int _gnutls_idna_map(const char * input, unsigned ilen, gnutls_datum_t *out, unsigned flags); #endif void _gnutls_str_cpy(char *dest, size_t dest_tot_size, const char *src); diff --git a/tests/str-idna.c b/tests/str-idna.c index 1931647399..af32bfce8b 100644 --- a/tests/str-idna.c +++ b/tests/str-idna.c @@ -31,13 +31,13 @@ #include <gnutls/gnutls.h> #include <cmocka.h> -int gnutls_idna_map(const char *input, unsigned ilen, gnutls_datum_t *out, unsigned flags); +int _gnutls_idna_map(const char *input, unsigned ilen, gnutls_datum_t *out, unsigned flags); #define MATCH_FUNC(fname, str, normalized) \ static void fname(void **glob_state) \ { \ gnutls_datum_t out; \ - int ret = gnutls_idna_map(str, strlen(str), &out, 0); \ + int ret = _gnutls_idna_map(str, strlen(str), &out, 0); \ if (normalized == NULL) { /* expect failure */ \ assert_int_not_equal(ret, 0); \ return; \ @@ -86,7 +86,7 @@ int main(void) cmocka_unit_test(test_dots) }; - ret = gnutls_idna_map("x", 1, &tmp, 0); + ret = _gnutls_idna_map("x", 1, &tmp, 0); if (ret == GNUTLS_E_UNIMPLEMENTED_FEATURE) exit(77); gnutls_free(tmp.data); |