13-fix-punycode.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. --- contrib/libs/libidn/lib/punycode.c (index)
  2. +++ contrib/libs/libidn/lib/punycode.c (working tree)
  3. @@ -88,11 +88,11 @@ enum
  4. /* point (for use in representing integers) in the range 0 to */
  5. /* base-1, or base if cp does not represent a value. */
  6. -static unsigned
  7. -decode_digit (int cp)
  8. +static punycode_uint
  9. +decode_digit (punycode_uint cp)
  10. {
  11. - return (unsigned) (cp - 48 < 10 ? cp - 22 : cp - 65 < 26 ? cp - 65 :
  12. - cp - 97 < 26 ? cp - 97 : base);
  13. + return cp - 48 < 10 ? cp - 22 : cp - 65 < 26 ? cp - 65 :
  14. + cp - 97 < 26 ? cp - 97 : base;
  15. }
  16. /* encode_digit(d,flag) returns the basic code point whose value */
  17. --- contrib/libs/libidn/lib/punycode.h (index)
  18. +++ contrib/libs/libidn/lib/punycode.h (working tree)
  19. @@ -75,15 +75,7 @@
  20. */
  21. # ifndef IDNAPI
  22. -# if defined LIBIDN_BUILDING && defined HAVE_VISIBILITY && HAVE_VISIBILITY
  23. -# define IDNAPI __attribute__((__visibility__("default")))
  24. -# elif defined LIBIDN_BUILDING && defined _MSC_VER && ! defined LIBIDN_STATIC
  25. -# define IDNAPI __declspec(dllexport)
  26. -# elif defined _MSC_VER && ! defined LIBIDN_STATIC
  27. -# define IDNAPI __declspec(dllimport)
  28. -# else
  29. # define IDNAPI
  30. -# endif
  31. # endif
  32. # ifdef __cplusplus
  33. @@ -182,11 +174,11 @@ extern "C"
  34. and output might contain garbage.
  35. */
  36. - extern IDNAPI int punycode_decode (size_t input_length,
  37. - const char input[],
  38. - size_t *output_length,
  39. - punycode_uint output[],
  40. - unsigned char case_flags[]);
  41. + extern int punycode_decode (size_t input_length,
  42. + const char input[],
  43. + size_t *output_length,
  44. + punycode_uint output[],
  45. + unsigned char case_flags[]);
  46. /*
  47. punycode_decode() converts Punycode to a sequence of code points