diff options
Diffstat (limited to 'meta/recipes-extended')
| -rw-r--r-- | meta/recipes-extended/libidn/libidn/0001-idn-fix-printf-format-security-warnings.patch | 694 | ||||
| -rw-r--r-- | meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch | 25 | ||||
| -rw-r--r-- | meta/recipes-extended/libidn/libidn/gcc7-compatibility.patch | 334 | ||||
| -rw-r--r-- | meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch | 19 | ||||
| -rw-r--r-- | meta/recipes-extended/libidn/libidn_1.34.bb (renamed from meta/recipes-extended/libidn/libidn_1.33.bb) | 8 |
5 files changed, 34 insertions, 1046 deletions
diff --git a/meta/recipes-extended/libidn/libidn/0001-idn-fix-printf-format-security-warnings.patch b/meta/recipes-extended/libidn/libidn/0001-idn-fix-printf-format-security-warnings.patch deleted file mode 100644 index 2d5faabb24..0000000000 --- a/meta/recipes-extended/libidn/libidn/0001-idn-fix-printf-format-security-warnings.patch +++ /dev/null | |||
| @@ -1,694 +0,0 @@ | |||
| 1 | From 7148adf34dae30345c2e4d9d437838a45ba6f6e8 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?utf8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de> | ||
| 3 | Date: Wed, 1 Feb 2017 11:06:39 +0100 | ||
| 4 | Subject: [PATCH] Fix -Wformat warnings | ||
| 5 | |||
| 6 | --- | ||
| 7 | Upstream-Status: Backport | ||
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 9 | |||
| 10 | examples/example.c | 6 +++--- | ||
| 11 | examples/example3.c | 4 ++-- | ||
| 12 | examples/example4.c | 4 ++-- | ||
| 13 | examples/example5.c | 2 +- | ||
| 14 | src/idn.c | 2 +- | ||
| 15 | tests/tst_idna.c | 25 +++++++++++++------------ | ||
| 16 | tests/tst_idna2.c | 8 ++++---- | ||
| 17 | tests/tst_idna3.c | 8 ++++---- | ||
| 18 | tests/tst_nfkc.c | 8 ++++---- | ||
| 19 | tests/tst_pr29.c | 12 ++++++------ | ||
| 20 | tests/tst_punycode.c | 13 +++++++------ | ||
| 21 | tests/tst_strerror.c | 20 ++++++++++---------- | ||
| 22 | tests/tst_stringprep.c | 12 ++++++------ | ||
| 23 | tests/tst_tld.c | 20 ++++++++++---------- | ||
| 24 | tests/utils.c | 6 +++--- | ||
| 25 | 15 files changed, 76 insertions(+), 74 deletions(-) | ||
| 26 | |||
| 27 | diff --git a/examples/example.c b/examples/example.c | ||
| 28 | index 6e91783..24f64e0 100644 | ||
| 29 | --- a/examples/example.c | ||
| 30 | +++ b/examples/example.c | ||
| 31 | @@ -55,7 +55,7 @@ main (void) | ||
| 32 | |||
| 33 | printf ("Before locale2utf8 (length %ld): ", (long int) strlen (buf)); | ||
| 34 | for (i = 0; i < strlen (buf); i++) | ||
| 35 | - printf ("%02x ", buf[i] & 0xFF); | ||
| 36 | + printf ("%02x ", (unsigned) buf[i] & 0xFF); | ||
| 37 | printf ("\n"); | ||
| 38 | |||
| 39 | p = stringprep_locale_to_utf8 (buf); | ||
| 40 | @@ -69,7 +69,7 @@ main (void) | ||
| 41 | |||
| 42 | printf ("Before stringprep (length %ld): ", (long int) strlen (buf)); | ||
| 43 | for (i = 0; i < strlen (buf); i++) | ||
| 44 | - printf ("%02x ", buf[i] & 0xFF); | ||
| 45 | + printf ("%02x ", (unsigned) buf[i] & 0xFF); | ||
| 46 | printf ("\n"); | ||
| 47 | |||
| 48 | rc = stringprep (buf, BUFSIZ, 0, stringprep_nameprep); | ||
| 49 | @@ -79,7 +79,7 @@ main (void) | ||
| 50 | { | ||
| 51 | printf ("After stringprep (length %ld): ", (long int) strlen (buf)); | ||
| 52 | for (i = 0; i < strlen (buf); i++) | ||
| 53 | - printf ("%02x ", buf[i] & 0xFF); | ||
| 54 | + printf ("%02x ", (unsigned) buf[i] & 0xFF); | ||
| 55 | printf ("\n"); | ||
| 56 | } | ||
| 57 | |||
| 58 | diff --git a/examples/example3.c b/examples/example3.c | ||
| 59 | index fc11c1c..ffb9042 100644 | ||
| 60 | --- a/examples/example3.c | ||
| 61 | +++ b/examples/example3.c | ||
| 62 | @@ -56,7 +56,7 @@ main (void) | ||
| 63 | |||
| 64 | printf ("Read string (length %ld): ", (long int) strlen (buf)); | ||
| 65 | for (i = 0; i < strlen (buf); i++) | ||
| 66 | - printf ("%02x ", buf[i] & 0xFF); | ||
| 67 | + printf ("%02x ", (unsigned) buf[i] & 0xFF); | ||
| 68 | printf ("\n"); | ||
| 69 | |||
| 70 | rc = idna_to_ascii_lz (buf, &p, 0); | ||
| 71 | @@ -68,7 +68,7 @@ main (void) | ||
| 72 | |||
| 73 | printf ("ACE label (length %ld): '%s'\n", (long int) strlen (p), p); | ||
| 74 | for (i = 0; i < strlen (p); i++) | ||
| 75 | - printf ("%02x ", p[i] & 0xFF); | ||
| 76 | + printf ("%02x ", (unsigned) p[i] & 0xFF); | ||
| 77 | printf ("\n"); | ||
| 78 | |||
| 79 | free (p); | ||
| 80 | diff --git a/examples/example4.c b/examples/example4.c | ||
| 81 | index 1b319c9..a3315a1 100644 | ||
| 82 | --- a/examples/example4.c | ||
| 83 | +++ b/examples/example4.c | ||
| 84 | @@ -56,7 +56,7 @@ main (void) | ||
| 85 | |||
| 86 | printf ("Read string (length %ld): ", (long int) strlen (buf)); | ||
| 87 | for (i = 0; i < strlen (buf); i++) | ||
| 88 | - printf ("%02x ", buf[i] & 0xFF); | ||
| 89 | + printf ("%02x ", (unsigned) buf[i] & 0xFF); | ||
| 90 | printf ("\n"); | ||
| 91 | |||
| 92 | rc = idna_to_unicode_lzlz (buf, &p, 0); | ||
| 93 | @@ -68,7 +68,7 @@ main (void) | ||
| 94 | |||
| 95 | printf ("ACE label (length %ld): '%s'\n", (long int) strlen (p), p); | ||
| 96 | for (i = 0; i < strlen (p); i++) | ||
| 97 | - printf ("%02x ", p[i] & 0xFF); | ||
| 98 | + printf ("%02x ", (unsigned) p[i] & 0xFF); | ||
| 99 | printf ("\n"); | ||
| 100 | |||
| 101 | free (p); | ||
| 102 | diff --git a/examples/example5.c b/examples/example5.c | ||
| 103 | index df55798..29d40b9 100644 | ||
| 104 | --- a/examples/example5.c | ||
| 105 | +++ b/examples/example5.c | ||
| 106 | @@ -68,7 +68,7 @@ main (void) | ||
| 107 | |||
| 108 | printf ("Read string (length %ld): ", (long int) strlen (buf)); | ||
| 109 | for (i = 0; i < strlen (buf); i++) | ||
| 110 | - printf ("%02x ", buf[i] & 0xFF); | ||
| 111 | + printf ("%02x ", (unsigned) buf[i] & 0xFF); | ||
| 112 | printf ("\n"); | ||
| 113 | |||
| 114 | p = stringprep_locale_to_utf8 (buf); | ||
| 115 | diff --git a/src/idn.c b/src/idn.c | ||
| 116 | index be1c7d1..13eb3c9 100644 | ||
| 117 | --- a/src/idn.c | ||
| 118 | +++ b/src/idn.c | ||
| 119 | @@ -419,7 +419,7 @@ main (int argc, char *argv[]) | ||
| 120 | size_t i; | ||
| 121 | for (i = 0; p[i]; i++) | ||
| 122 | fprintf (stderr, "output[%lu] = U+%04x\n", | ||
| 123 | - (unsigned long) i, p[i]); | ||
| 124 | + (unsigned long) i, (unsigned) p[i]); | ||
| 125 | } | ||
| 126 | |||
| 127 | fprintf (stdout, "%s\n", p); | ||
| 128 | diff --git a/tests/tst_idna.c b/tests/tst_idna.c | ||
| 129 | index 415764e..4ac046f 100644 | ||
| 130 | --- a/tests/tst_idna.c | ||
| 131 | +++ b/tests/tst_idna.c | ||
| 132 | @@ -220,13 +220,14 @@ doit (void) | ||
| 133 | char label[100]; | ||
| 134 | uint32_t *ucs4label = NULL; | ||
| 135 | uint32_t tmp[100]; | ||
| 136 | - size_t len, len2, i; | ||
| 137 | + size_t len, len2; | ||
| 138 | int rc; | ||
| 139 | + unsigned i; | ||
| 140 | |||
| 141 | for (i = 0; i < sizeof (idna) / sizeof (idna[0]); i++) | ||
| 142 | { | ||
| 143 | if (debug) | ||
| 144 | - printf ("IDNA entry %ld: %s\n", i, idna[i].name); | ||
| 145 | + printf ("IDNA entry %u: %s\n", i, idna[i].name); | ||
| 146 | |||
| 147 | if (debug) | ||
| 148 | { | ||
| 149 | @@ -237,7 +238,7 @@ doit (void) | ||
| 150 | rc = idna_to_ascii_4i (idna[i].in, idna[i].inlen, label, idna[i].flags); | ||
| 151 | if (rc != idna[i].toasciirc) | ||
| 152 | { | ||
| 153 | - fail ("IDNA entry %ld failed: %d\n", i, rc); | ||
| 154 | + fail ("IDNA entry %u failed: %d\n", i, rc); | ||
| 155 | if (debug) | ||
| 156 | printf ("FATAL\n"); | ||
| 157 | continue; | ||
| 158 | @@ -256,7 +257,7 @@ doit (void) | ||
| 159 | if (strlen (idna[i].out) != strlen (label) || | ||
| 160 | strcasecmp (idna[i].out, label) != 0) | ||
| 161 | { | ||
| 162 | - fail ("IDNA entry %ld failed\n", i); | ||
| 163 | + fail ("IDNA entry %u failed\n", i); | ||
| 164 | if (debug) | ||
| 165 | printf ("ERROR\n"); | ||
| 166 | } | ||
| 167 | @@ -273,8 +274,8 @@ doit (void) | ||
| 168 | |||
| 169 | if (debug) | ||
| 170 | { | ||
| 171 | - printf ("in: %s (%ld==%ld)\n", idna[i].out, strlen (idna[i].out), | ||
| 172 | - len); | ||
| 173 | + printf ("in: %s (%d==%d)\n", idna[i].out, (int) strlen (idna[i].out), | ||
| 174 | + (int) len); | ||
| 175 | ucs4print (ucs4label, len); | ||
| 176 | } | ||
| 177 | |||
| 178 | @@ -282,20 +283,20 @@ doit (void) | ||
| 179 | rc = idna_to_unicode_44i (ucs4label, len, tmp, &len2, idna[i].flags); | ||
| 180 | if (debug) | ||
| 181 | { | ||
| 182 | - printf ("expected out (%ld):\n", | ||
| 183 | + printf ("expected out (%lu):\n", | ||
| 184 | rc == IDNA_SUCCESS ? idna[i].inlen : len); | ||
| 185 | if (rc == IDNA_SUCCESS) | ||
| 186 | ucs4print (idna[i].in, idna[i].inlen); | ||
| 187 | else | ||
| 188 | ucs4print (ucs4label, len); | ||
| 189 | |||
| 190 | - printf ("computed out (%ld):\n", len2); | ||
| 191 | + printf ("computed out (%d):\n", (int) len2); | ||
| 192 | ucs4print (tmp, len2); | ||
| 193 | } | ||
| 194 | |||
| 195 | if (rc != idna[i].tounicoderc) | ||
| 196 | { | ||
| 197 | - fail ("IDNA entry %ld failed: %d\n", i, rc); | ||
| 198 | + fail ("IDNA entry %u failed: %d\n", i, rc); | ||
| 199 | if (debug) | ||
| 200 | printf ("FATAL\n"); | ||
| 201 | continue; | ||
| 202 | @@ -309,11 +310,11 @@ doit (void) | ||
| 203 | if (debug) | ||
| 204 | { | ||
| 205 | if (rc == IDNA_SUCCESS) | ||
| 206 | - printf ("len=%ld len2=%ld\n", len2, idna[i].inlen); | ||
| 207 | + printf ("len=%d len2=%d\n", (int) len2, (int) idna[i].inlen); | ||
| 208 | else | ||
| 209 | - printf ("len=%ld len2=%ld\n", len, len2); | ||
| 210 | + printf ("len=%d len2=%d\n", (int) len, (int) len2); | ||
| 211 | } | ||
| 212 | - fail ("IDNA entry %ld failed\n", i); | ||
| 213 | + fail ("IDNA entry %u failed\n", i); | ||
| 214 | if (debug) | ||
| 215 | printf ("ERROR\n"); | ||
| 216 | } | ||
| 217 | diff --git a/tests/tst_idna2.c b/tests/tst_idna2.c | ||
| 218 | index 65b3a4d..38932ca 100644 | ||
| 219 | --- a/tests/tst_idna2.c | ||
| 220 | +++ b/tests/tst_idna2.c | ||
| 221 | @@ -461,14 +461,14 @@ static const struct idna idna[] = { | ||
| 222 | void | ||
| 223 | doit (void) | ||
| 224 | { | ||
| 225 | - size_t i; | ||
| 226 | + unsigned i; | ||
| 227 | char *out; | ||
| 228 | int rc; | ||
| 229 | |||
| 230 | for (i = 0; i < sizeof (idna) / sizeof (idna[0]); i++) | ||
| 231 | { | ||
| 232 | if (debug) | ||
| 233 | - printf ("IDNA2 entry %ld\n", i); | ||
| 234 | + printf ("IDNA2 entry %u\n", i); | ||
| 235 | |||
| 236 | if (debug) | ||
| 237 | { | ||
| 238 | @@ -487,7 +487,7 @@ doit (void) | ||
| 239 | IDNA_USE_STD3_ASCII_RULES); | ||
| 240 | if (rc != IDNA_SUCCESS && strlen (idna[i].out) > 0) | ||
| 241 | { | ||
| 242 | - fail ("IDNA2 entry %ld failed: %d\n", i, rc); | ||
| 243 | + fail ("IDNA2 entry %u failed: %d\n", i, rc); | ||
| 244 | continue; | ||
| 245 | } | ||
| 246 | |||
| 247 | @@ -504,7 +504,7 @@ doit (void) | ||
| 248 | if (strlen (idna[i].out) != strlen (out) || | ||
| 249 | strcasecmp (idna[i].out, out) != 0) | ||
| 250 | { | ||
| 251 | - fail ("IDNA2 entry %ld failed\n", i); | ||
| 252 | + fail ("IDNA2 entry %u failed\n", i); | ||
| 253 | if (debug) | ||
| 254 | printf ("ERROR\n"); | ||
| 255 | } | ||
| 256 | diff --git a/tests/tst_idna3.c b/tests/tst_idna3.c | ||
| 257 | index a189378..f65628c 100644 | ||
| 258 | --- a/tests/tst_idna3.c | ||
| 259 | +++ b/tests/tst_idna3.c | ||
| 260 | @@ -59,13 +59,13 @@ doit (void) | ||
| 261 | { | ||
| 262 | int rc; | ||
| 263 | char *out = NULL; | ||
| 264 | - size_t i; | ||
| 265 | + unsigned i; | ||
| 266 | |||
| 267 | for (i = 0; i < sizeof (idna) / sizeof (idna[0]); i++) | ||
| 268 | { | ||
| 269 | rc = idna_to_unicode_8z8z (idna[i].in, &out, 0); | ||
| 270 | if (rc != IDNA_SUCCESS) | ||
| 271 | - fail ("IDNA3[%ld] failed %d\n", i, rc); | ||
| 272 | + fail ("IDNA3[%u] failed %d\n", i, rc); | ||
| 273 | |||
| 274 | if (debug && rc == IDNA_SUCCESS) | ||
| 275 | { | ||
| 276 | @@ -75,9 +75,9 @@ doit (void) | ||
| 277 | } | ||
| 278 | |||
| 279 | if (strcmp (out, idna[i].out) != 0) | ||
| 280 | - fail ("IDNA3[%ld] failed\n", i); | ||
| 281 | + fail ("IDNA3[%u] failed\n", i); | ||
| 282 | else if (debug) | ||
| 283 | - printf ("IDNA3[%ld] success\n", i); | ||
| 284 | + printf ("IDNA3[%u] success\n", i); | ||
| 285 | |||
| 286 | if (out) | ||
| 287 | idn_free (out); | ||
| 288 | diff --git a/tests/tst_nfkc.c b/tests/tst_nfkc.c | ||
| 289 | index d150fec..f5af9c6 100644 | ||
| 290 | --- a/tests/tst_nfkc.c | ||
| 291 | +++ b/tests/tst_nfkc.c | ||
| 292 | @@ -68,18 +68,18 @@ void | ||
| 293 | doit (void) | ||
| 294 | { | ||
| 295 | char *out; | ||
| 296 | - size_t i; | ||
| 297 | + unsigned i; | ||
| 298 | |||
| 299 | for (i = 0; i < sizeof (nfkc) / sizeof (nfkc[0]); i++) | ||
| 300 | { | ||
| 301 | if (debug) | ||
| 302 | - printf ("NFKC entry %ld\n", i); | ||
| 303 | + printf ("NFKC entry %u\n", i); | ||
| 304 | |||
| 305 | out = stringprep_utf8_nfkc_normalize (nfkc[i].in, | ||
| 306 | (ssize_t) strlen (nfkc[i].in)); | ||
| 307 | if (out == NULL) | ||
| 308 | { | ||
| 309 | - fail ("NFKC entry %ld failed fatally\n", i); | ||
| 310 | + fail ("NFKC entry %u failed fatally\n", i); | ||
| 311 | continue; | ||
| 312 | } | ||
| 313 | |||
| 314 | @@ -114,7 +114,7 @@ doit (void) | ||
| 315 | if (strlen (nfkc[i].out) != strlen (out) || | ||
| 316 | memcmp (nfkc[i].out, out, strlen (out)) != 0) | ||
| 317 | { | ||
| 318 | - fail ("NFKC entry %ld failed\n", i); | ||
| 319 | + fail ("NFKC entry %u failed\n", i); | ||
| 320 | if (debug) | ||
| 321 | printf ("ERROR\n"); | ||
| 322 | } | ||
| 323 | diff --git a/tests/tst_pr29.c b/tests/tst_pr29.c | ||
| 324 | index 3dc5466..11d0ede 100644 | ||
| 325 | --- a/tests/tst_pr29.c | ||
| 326 | +++ b/tests/tst_pr29.c | ||
| 327 | @@ -91,7 +91,7 @@ static const struct tv tv[] = { | ||
| 328 | void | ||
| 329 | doit (void) | ||
| 330 | { | ||
| 331 | - size_t i; | ||
| 332 | + unsigned i; | ||
| 333 | int rc; | ||
| 334 | |||
| 335 | for (i = 0; i < sizeof (tv) / sizeof (tv[0]); i++) | ||
| 336 | @@ -100,7 +100,7 @@ doit (void) | ||
| 337 | { | ||
| 338 | uint32_t *p, *q; | ||
| 339 | |||
| 340 | - printf ("PR29 entry %ld: %s\n", i, tv[i].name); | ||
| 341 | + printf ("PR29 entry %u: %s\n", i, tv[i].name); | ||
| 342 | |||
| 343 | printf ("in:\n"); | ||
| 344 | ucs4print (tv[i].in, tv[i].inlen); | ||
| 345 | @@ -120,7 +120,7 @@ doit (void) | ||
| 346 | rc = pr29_4 (tv[i].in, tv[i].inlen); | ||
| 347 | if (rc != tv[i].rc) | ||
| 348 | { | ||
| 349 | - fail ("PR29 entry %ld failed (expected %d): %d\n", i, tv[i].rc, rc); | ||
| 350 | + fail ("PR29 entry %u failed (expected %d): %d\n", i, tv[i].rc, rc); | ||
| 351 | if (debug) | ||
| 352 | printf ("FATAL\n"); | ||
| 353 | continue; | ||
| 354 | @@ -129,7 +129,7 @@ doit (void) | ||
| 355 | rc = pr29_4z (tv[i].in); | ||
| 356 | if (rc != tv[i].rc) | ||
| 357 | { | ||
| 358 | - fail ("PR29 entry %ld failed (expected %d): %d\n", i, tv[i].rc, rc); | ||
| 359 | + fail ("PR29 entry %u failed (expected %d): %d\n", i, tv[i].rc, rc); | ||
| 360 | if (debug) | ||
| 361 | printf ("FATAL\n"); | ||
| 362 | continue; | ||
| 363 | @@ -142,7 +142,7 @@ doit (void) | ||
| 364 | p = stringprep_ucs4_to_utf8 (tv[i].in, (ssize_t) tv[i].inlen, | ||
| 365 | &items_read, &items_written); | ||
| 366 | if (p == NULL) | ||
| 367 | - fail ("FAIL: stringprep_ucs4_to_utf8(tv[%ld]) == NULL\n", i); | ||
| 368 | + fail ("FAIL: stringprep_ucs4_to_utf8(tv[%u]) == NULL\n", i); | ||
| 369 | if (debug) | ||
| 370 | hexprint (p, strlen (p)); | ||
| 371 | |||
| 372 | @@ -150,7 +150,7 @@ doit (void) | ||
| 373 | free (p); | ||
| 374 | if (rc != tv[i].rc) | ||
| 375 | { | ||
| 376 | - fail ("PR29 entry %ld failed (expected %d): %d\n", | ||
| 377 | + fail ("PR29 entry %u failed (expected %d): %d\n", | ||
| 378 | i, tv[i].rc, rc); | ||
| 379 | if (debug) | ||
| 380 | printf ("FATAL\n"); | ||
| 381 | diff --git a/tests/tst_punycode.c b/tests/tst_punycode.c | ||
| 382 | index 493b8a2..997744a 100644 | ||
| 383 | --- a/tests/tst_punycode.c | ||
| 384 | +++ b/tests/tst_punycode.c | ||
| 385 | @@ -173,7 +173,8 @@ doit (void) | ||
| 386 | char *p; | ||
| 387 | uint32_t *q; | ||
| 388 | int rc; | ||
| 389 | - size_t i, outlen; | ||
| 390 | + size_t outlen; | ||
| 391 | + unsigned i; | ||
| 392 | |||
| 393 | p = malloc (sizeof (*p) * BUFSIZ); | ||
| 394 | if (p == NULL) | ||
| 395 | @@ -186,7 +187,7 @@ doit (void) | ||
| 396 | for (i = 0; i < sizeof (punycode) / sizeof (punycode[0]); i++) | ||
| 397 | { | ||
| 398 | if (debug) | ||
| 399 | - printf ("PUNYCODE entry %ld: %s\n", i, punycode[i].name); | ||
| 400 | + printf ("PUNYCODE entry %u: %s\n", i, punycode[i].name); | ||
| 401 | |||
| 402 | if (debug) | ||
| 403 | { | ||
| 404 | @@ -199,7 +200,7 @@ doit (void) | ||
| 405 | NULL, &outlen, p); | ||
| 406 | if (rc != punycode[i].rc) | ||
| 407 | { | ||
| 408 | - fail ("punycode_encode() entry %ld failed: %d\n", i, rc); | ||
| 409 | + fail ("punycode_encode() entry %u failed: %d\n", i, rc); | ||
| 410 | if (debug) | ||
| 411 | printf ("FATAL\n"); | ||
| 412 | continue; | ||
| 413 | @@ -221,7 +222,7 @@ doit (void) | ||
| 414 | if (strlen (punycode[i].out) != strlen (p) || | ||
| 415 | memcmp (punycode[i].out, p, strlen (p)) != 0) | ||
| 416 | { | ||
| 417 | - fail ("punycode() entry %ld failed\n", i); | ||
| 418 | + fail ("punycode() entry %u failed\n", i); | ||
| 419 | if (debug) | ||
| 420 | printf ("ERROR\n"); | ||
| 421 | } | ||
| 422 | @@ -241,7 +242,7 @@ doit (void) | ||
| 423 | &outlen, q, NULL); | ||
| 424 | if (rc != punycode[i].rc) | ||
| 425 | { | ||
| 426 | - fail ("punycode() entry %ld failed: %d\n", i, rc); | ||
| 427 | + fail ("punycode() entry %u failed: %d\n", i, rc); | ||
| 428 | if (debug) | ||
| 429 | printf ("FATAL\n"); | ||
| 430 | continue; | ||
| 431 | @@ -262,7 +263,7 @@ doit (void) | ||
| 432 | if (punycode[i].inlen != outlen || | ||
| 433 | memcmp (punycode[i].in, q, outlen) != 0) | ||
| 434 | { | ||
| 435 | - fail ("punycode_decode() entry %ld failed\n", i); | ||
| 436 | + fail ("punycode_decode() entry %u failed\n", i); | ||
| 437 | if (debug) | ||
| 438 | printf ("ERROR\n"); | ||
| 439 | } | ||
| 440 | diff --git a/tests/tst_strerror.c b/tests/tst_strerror.c | ||
| 441 | index 71fff59..730f5e4 100644 | ||
| 442 | --- a/tests/tst_strerror.c | ||
| 443 | +++ b/tests/tst_strerror.c | ||
| 444 | @@ -110,7 +110,7 @@ doit (void) | ||
| 445 | /* Iterate through all error codes. */ | ||
| 446 | |||
| 447 | { | ||
| 448 | - size_t i; | ||
| 449 | + unsigned i; | ||
| 450 | const char *last_p = NULL; | ||
| 451 | |||
| 452 | for (i = 0;; i++) | ||
| 453 | @@ -126,13 +126,13 @@ doit (void) | ||
| 454 | break; | ||
| 455 | } | ||
| 456 | if (debug) | ||
| 457 | - printf ("idna %ld: %s\n", i, p); | ||
| 458 | + printf ("idna %u: %s\n", i, p); | ||
| 459 | last_p = p; | ||
| 460 | } | ||
| 461 | } | ||
| 462 | |||
| 463 | { | ||
| 464 | - size_t i; | ||
| 465 | + unsigned i; | ||
| 466 | const char *last_p = NULL; | ||
| 467 | |||
| 468 | for (i = 0;; i++) | ||
| 469 | @@ -141,13 +141,13 @@ doit (void) | ||
| 470 | if (p == last_p) | ||
| 471 | break; | ||
| 472 | if (debug) | ||
| 473 | - printf ("pr29 %ld: %s\n", i, p); | ||
| 474 | + printf ("pr29 %u: %s\n", i, p); | ||
| 475 | last_p = p; | ||
| 476 | } | ||
| 477 | } | ||
| 478 | |||
| 479 | { | ||
| 480 | - size_t i; | ||
| 481 | + unsigned i; | ||
| 482 | const char *last_p = NULL; | ||
| 483 | |||
| 484 | for (i = 0;; i++) | ||
| 485 | @@ -156,13 +156,13 @@ doit (void) | ||
| 486 | if (p == last_p) | ||
| 487 | break; | ||
| 488 | if (debug) | ||
| 489 | - printf ("punycode %ld: %s\n", i, p); | ||
| 490 | + printf ("punycode %u: %s\n", i, p); | ||
| 491 | last_p = p; | ||
| 492 | } | ||
| 493 | } | ||
| 494 | |||
| 495 | { | ||
| 496 | - size_t i; | ||
| 497 | + unsigned i; | ||
| 498 | const char *last_p = NULL; | ||
| 499 | |||
| 500 | for (i = 0;; i++) | ||
| 501 | @@ -183,13 +183,13 @@ doit (void) | ||
| 502 | break; | ||
| 503 | } | ||
| 504 | if (debug) | ||
| 505 | - printf ("stringprep %ld: %s\n", i, p); | ||
| 506 | + printf ("stringprep %u: %s\n", i, p); | ||
| 507 | last_p = p; | ||
| 508 | } | ||
| 509 | } | ||
| 510 | |||
| 511 | { | ||
| 512 | - size_t i; | ||
| 513 | + unsigned i; | ||
| 514 | const char *last_p = NULL; | ||
| 515 | |||
| 516 | for (i = 0;; i++) | ||
| 517 | @@ -198,7 +198,7 @@ doit (void) | ||
| 518 | if (p == last_p) | ||
| 519 | break; | ||
| 520 | if (debug) | ||
| 521 | - printf ("tld %ld: %s\n", i, p); | ||
| 522 | + printf ("tld %u: %s\n", i, p); | ||
| 523 | last_p = p; | ||
| 524 | } | ||
| 525 | } | ||
| 526 | diff --git a/tests/tst_stringprep.c b/tests/tst_stringprep.c | ||
| 527 | index 149ce6f..7c9ab06 100644 | ||
| 528 | --- a/tests/tst_stringprep.c | ||
| 529 | +++ b/tests/tst_stringprep.c | ||
| 530 | @@ -205,7 +205,7 @@ doit (void) | ||
| 531 | { | ||
| 532 | char *p; | ||
| 533 | int rc; | ||
| 534 | - size_t i; | ||
| 535 | + unsigned i; | ||
| 536 | |||
| 537 | if (!stringprep_check_version (STRINGPREP_VERSION)) | ||
| 538 | fail ("stringprep_check_version failed (header %s runtime %s)\n", | ||
| 539 | @@ -224,7 +224,7 @@ doit (void) | ||
| 540 | for (i = 0; i < sizeof (strprep) / sizeof (strprep[0]); i++) | ||
| 541 | { | ||
| 542 | if (debug) | ||
| 543 | - printf ("STRINGPREP entry %ld\n", i); | ||
| 544 | + printf ("STRINGPREP entry %u\n", i); | ||
| 545 | |||
| 546 | if (debug) | ||
| 547 | { | ||
| 548 | @@ -247,12 +247,12 @@ doit (void) | ||
| 549 | continue; | ||
| 550 | else if (l == NULL) | ||
| 551 | { | ||
| 552 | - fail ("bad UTF-8 in entry %ld\n", i); | ||
| 553 | + fail ("bad UTF-8 in entry %u\n", i); | ||
| 554 | continue; | ||
| 555 | } | ||
| 556 | else if (strcmp (strprep[i].in, x) != 0) | ||
| 557 | { | ||
| 558 | - fail ("bad UTF-8 in entry %ld\n", i); | ||
| 559 | + fail ("bad UTF-8 in entry %u\n", i); | ||
| 560 | if (debug) | ||
| 561 | { | ||
| 562 | puts ("expected:"); | ||
| 563 | @@ -274,7 +274,7 @@ doit (void) | ||
| 564 | "Nameprep", strprep[i].flags); | ||
| 565 | if (rc != strprep[i].rc) | ||
| 566 | { | ||
| 567 | - fail ("stringprep() entry %ld failed: %d\n", i, rc); | ||
| 568 | + fail ("stringprep() entry %u failed: %d\n", i, rc); | ||
| 569 | if (debug) | ||
| 570 | printf ("FATAL\n"); | ||
| 571 | if (rc == STRINGPREP_OK) | ||
| 572 | @@ -302,7 +302,7 @@ doit (void) | ||
| 573 | if (strlen (strprep[i].out) != strlen (p) || | ||
| 574 | memcmp (strprep[i].out, p, strlen (p)) != 0) | ||
| 575 | { | ||
| 576 | - fail ("stringprep() entry %ld failed\n", i); | ||
| 577 | + fail ("stringprep() entry %ld failed\n", (long) i); | ||
| 578 | if (debug) | ||
| 579 | printf ("ERROR\n"); | ||
| 580 | } | ||
| 581 | diff --git a/tests/tst_tld.c b/tests/tst_tld.c | ||
| 582 | index 2f8e12e..d038c79 100644 | ||
| 583 | --- a/tests/tst_tld.c | ||
| 584 | +++ b/tests/tst_tld.c | ||
| 585 | @@ -80,7 +80,7 @@ const Tld_table * my_tld_tables[] = | ||
| 586 | void | ||
| 587 | doit (void) | ||
| 588 | { | ||
| 589 | - size_t i; | ||
| 590 | + unsigned i; | ||
| 591 | const Tld_table *tldtable; | ||
| 592 | char *out; | ||
| 593 | size_t errpos; | ||
| 594 | @@ -206,7 +206,7 @@ doit (void) | ||
| 595 | for (i = 0; i < sizeof (tld) / sizeof (tld[0]); i++) | ||
| 596 | { | ||
| 597 | if (debug) | ||
| 598 | - printf ("TLD entry %ld: %s\n", i, tld[i].name); | ||
| 599 | + printf ("TLD entry %u: %s\n", i, tld[i].name); | ||
| 600 | |||
| 601 | if (debug) | ||
| 602 | { | ||
| 603 | @@ -217,7 +217,7 @@ doit (void) | ||
| 604 | tldtable = tld_default_table (tld[i].tld, NULL); | ||
| 605 | if (tldtable == NULL) | ||
| 606 | { | ||
| 607 | - fail ("TLD entry %ld tld_get_table (%s)\n", i, tld[i].tld); | ||
| 608 | + fail ("TLD entry %u tld_get_table (%s)\n", i, tld[i].tld); | ||
| 609 | if (debug) | ||
| 610 | printf ("FATAL\n"); | ||
| 611 | continue; | ||
| 612 | @@ -226,7 +226,7 @@ doit (void) | ||
| 613 | rc = tld_check_4t (tld[i].in, tld[i].inlen, &errpos, tldtable); | ||
| 614 | if (rc != tld[i].rc) | ||
| 615 | { | ||
| 616 | - fail ("TLD entry %ld failed: %d\n", i, rc); | ||
| 617 | + fail ("TLD entry %u failed: %d\n", i, rc); | ||
| 618 | if (debug) | ||
| 619 | printf ("FATAL\n"); | ||
| 620 | continue; | ||
| 621 | @@ -237,7 +237,7 @@ doit (void) | ||
| 622 | |||
| 623 | if (rc != tld[i].rc) | ||
| 624 | { | ||
| 625 | - fail ("TLD entry %ld failed\n", i); | ||
| 626 | + fail ("TLD entry %u failed\n", i); | ||
| 627 | if (debug) | ||
| 628 | printf ("ERROR\n"); | ||
| 629 | } | ||
| 630 | @@ -245,12 +245,12 @@ doit (void) | ||
| 631 | { | ||
| 632 | if (debug) | ||
| 633 | printf ("returned errpos %ld expected errpos %ld\n", | ||
| 634 | - errpos, tld[i].errpos); | ||
| 635 | + (long) errpos, (long) tld[i].errpos); | ||
| 636 | |||
| 637 | if (tld[i].errpos != errpos) | ||
| 638 | { | ||
| 639 | - fail ("TLD entry %ld failed because errpos %ld != %ld\n", i, | ||
| 640 | - tld[i].errpos, errpos); | ||
| 641 | + fail ("TLD entry %u failed because errpos %ld != %ld\n", i, | ||
| 642 | + (long) tld[i].errpos, (long) errpos); | ||
| 643 | if (debug) | ||
| 644 | printf ("ERROR\n"); | ||
| 645 | } | ||
| 646 | @@ -262,12 +262,12 @@ doit (void) | ||
| 647 | rc = tld_check_8z (tld[i].example, &errpos, NULL); | ||
| 648 | if (rc != tld[i].rc) | ||
| 649 | { | ||
| 650 | - fail ("TLD entry %ld failed\n", i); | ||
| 651 | + fail ("TLD entry %u failed\n", i); | ||
| 652 | if (debug) | ||
| 653 | printf ("ERROR\n"); | ||
| 654 | } | ||
| 655 | if (debug) | ||
| 656 | - printf ("TLD entry %ld tld_check_8z (%s)\n", i, tld[i].example); | ||
| 657 | + printf ("TLD entry %u tld_check_8z (%s)\n", i, tld[i].example); | ||
| 658 | } | ||
| 659 | } | ||
| 660 | } | ||
| 661 | diff --git a/tests/utils.c b/tests/utils.c | ||
| 662 | index 717ee01..5577dc3 100644 | ||
| 663 | --- a/tests/utils.c | ||
| 664 | +++ b/tests/utils.c | ||
| 665 | @@ -49,7 +49,7 @@ escapeprint (const char *str, size_t len) | ||
| 666 | { | ||
| 667 | size_t i; | ||
| 668 | |||
| 669 | - printf (" (length %ld bytes):\n\t", len); | ||
| 670 | + printf (" (length %ld bytes):\n\t", (long) len); | ||
| 671 | for (i = 0; i < len; i++) | ||
| 672 | { | ||
| 673 | if (((str[i] & 0xFF) >= 'A' && (str[i] & 0xFF) <= 'Z') || | ||
| 674 | @@ -58,7 +58,7 @@ escapeprint (const char *str, size_t len) | ||
| 675 | || (str[i] & 0xFF) == ' ' || (str[i] & 0xFF) == '.') | ||
| 676 | printf ("%c", (str[i] & 0xFF)); | ||
| 677 | else | ||
| 678 | - printf ("\\x%02X", (str[i] & 0xFF)); | ||
| 679 | + printf ("\\x%02X", (unsigned) (str[i] & 0xFF)); | ||
| 680 | if ((i + 1) % 16 == 0 && (i + 1) < len) | ||
| 681 | printf ("'\n\t'"); | ||
| 682 | } | ||
| 683 | @@ -73,7 +73,7 @@ hexprint (const char *str, size_t len) | ||
| 684 | printf ("\t;; "); | ||
| 685 | for (i = 0; i < len; i++) | ||
| 686 | { | ||
| 687 | - printf ("%02x ", (str[i] & 0xFF)); | ||
| 688 | + printf ("%02x ", (unsigned) (str[i] & 0xFF)); | ||
| 689 | if ((i + 1) % 8 == 0) | ||
| 690 | printf (" "); | ||
| 691 | if ((i + 1) % 16 == 0 && i + 1 < len) | ||
| 692 | -- | ||
| 693 | 1.9.1 | ||
| 694 | |||
diff --git a/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch b/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch index 98ba4d6ff6..43bd232944 100644 --- a/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch +++ b/meta/recipes-extended/libidn/libidn/avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch | |||
| @@ -1,25 +1,34 @@ | |||
| 1 | Upstream-Status: Inappropriate | 1 | From cdd9e2e960eeb4eda7b08f0113d0cd03524c1d45 Mon Sep 17 00:00:00 2001 |
| 2 | From: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
| 3 | Date: Tue, 10 Jul 2012 02:44:30 -0700 | ||
| 4 | Subject: [PATCH] libidn: fix build with automake 1.12 | ||
| 5 | |||
| 6 | Upstream-Status: Inappropriate | ||
| 2 | 7 | ||
| 3 | automake 1.12.x has deprecated AM_PROG_MKDIR_P , and throws a warning for that, | 8 | automake 1.12.x has deprecated AM_PROG_MKDIR_P , and throws a warning for that, |
| 4 | and the warnings are treated as errors because of the -Werror parameter. | 9 | and the warnings are treated as errors because of the -Werror parameter. |
| 5 | 10 | ||
| 6 | These AM_PROG_MKDIR_P are coming from gettext, and the latest gettext code has not | 11 | These AM_PROG_MKDIR_P are coming from gettext, and the latest gettext code has not |
| 7 | eliminated these deprecated macros yet. So disable the treatment of warnings | 12 | eliminated these deprecated macros yet. So disable the treatment of warnings |
| 8 | as errors until gettext is updated to remove the deprecated macros. | 13 | as errors until gettext is updated to remove the deprecated macros. |
| 9 | 14 | ||
| 10 | Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> | 15 | Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> |
| 11 | 2012/07/10 | 16 | 2012/07/10 |
| 12 | 17 | ||
| 13 | Index: libidn-1.24/configure.ac | 18 | --- |
| 14 | =================================================================== | 19 | configure.ac | 2 +- |
| 15 | --- libidn-1.24.orig/configure.ac | 20 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 16 | +++ libidn-1.24/configure.ac | 21 | |
| 17 | @@ -23,7 +23,7 @@ AC_COPYRIGHT([Copyright (c) 2002-2011 Si | 22 | diff --git a/configure.ac b/configure.ac |
| 23 | index 261dad2..c4f935e 100644 | ||
| 24 | --- a/configure.ac | ||
| 25 | +++ b/configure.ac | ||
| 26 | @@ -22,7 +22,7 @@ AC_INIT([GNU Libidn], [1.34], [bug-libidn@gnu.org]) | ||
| 18 | AC_CONFIG_AUX_DIR([build-aux]) | 27 | AC_CONFIG_AUX_DIR([build-aux]) |
| 19 | AC_CONFIG_MACRO_DIR([m4]) | 28 | AC_CONFIG_MACRO_DIR([m4]) |
| 20 | AC_CONFIG_HEADERS(config.h) | 29 | AC_CONFIG_HEADERS(config.h) |
| 21 | -AM_INIT_AUTOMAKE([1.10 -Wall -Werror -Wno-override]) | 30 | -AM_INIT_AUTOMAKE([1.10 -Wall -Werror -Wno-override]) |
| 22 | +AM_INIT_AUTOMAKE([1.10 -Wall -Wno-override]) | 31 | +AM_INIT_AUTOMAKE([1.10 -Wall -Wno-override]) |
| 23 | AM_SILENT_RULES([yes]) | 32 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) |
| 24 | 33 | ||
| 25 | # Library code modified: REVISION++ | 34 | # Library code modified: REVISION++ |
diff --git a/meta/recipes-extended/libidn/libidn/gcc7-compatibility.patch b/meta/recipes-extended/libidn/libidn/gcc7-compatibility.patch deleted file mode 100644 index 546a6eaafc..0000000000 --- a/meta/recipes-extended/libidn/libidn/gcc7-compatibility.patch +++ /dev/null | |||
| @@ -1,334 +0,0 @@ | |||
| 1 | From 230930b3bc3e431b819eb45420cb42475d83ca93 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?utf8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de> | ||
| 3 | Date: Wed, 1 Feb 2017 10:44:36 +0100 | ||
| 4 | Subject: [PATCH] Update intprops.h for gcc-7 compatibility | ||
| 5 | |||
| 6 | --- | ||
| 7 | Upstream-Status: Backport | ||
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 9 | |||
| 10 | gl/intprops.h | 65 ++++++++++++++++++++++++++++++-------------------- | ||
| 11 | lib/gltests/intprops.h | 65 ++++++++++++++++++++++++++++++-------------------- | ||
| 12 | 2 files changed, 78 insertions(+), 52 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/gl/intprops.h b/gl/intprops.h | ||
| 15 | index e1fce5c..eb06b69 100644 | ||
| 16 | --- a/gl/intprops.h | ||
| 17 | +++ b/gl/intprops.h | ||
| 18 | @@ -1,18 +1,18 @@ | ||
| 19 | /* intprops.h -- properties of integer types | ||
| 20 | |||
| 21 | - Copyright (C) 2001-2016 Free Software Foundation, Inc. | ||
| 22 | + Copyright (C) 2001-2017 Free Software Foundation, Inc. | ||
| 23 | |||
| 24 | This program is free software: you can redistribute it and/or modify it | ||
| 25 | - under the terms of the GNU General Public License as published | ||
| 26 | - by the Free Software Foundation; either version 3 of the License, or | ||
| 27 | + under the terms of the GNU Lesser General Public License as published | ||
| 28 | + by the Free Software Foundation; either version 2.1 of the License, or | ||
| 29 | (at your option) any later version. | ||
| 30 | |||
| 31 | This program is distributed in the hope that it will be useful, | ||
| 32 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 33 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 34 | - GNU General Public License for more details. | ||
| 35 | + GNU Lesser General Public License for more details. | ||
| 36 | |||
| 37 | - You should have received a copy of the GNU General Public License | ||
| 38 | + You should have received a copy of the GNU Lesser General Public License | ||
| 39 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | ||
| 40 | |||
| 41 | /* Written by Paul Eggert. */ | ||
| 42 | @@ -47,12 +47,16 @@ | ||
| 43 | |||
| 44 | /* Minimum and maximum values for integer types and expressions. */ | ||
| 45 | |||
| 46 | +/* The width in bits of the integer type or expression T. | ||
| 47 | + Padding bits are not supported; this is checked at compile-time below. */ | ||
| 48 | +#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT) | ||
| 49 | + | ||
| 50 | /* The maximum and minimum values for the integer type T. */ | ||
| 51 | #define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t)) | ||
| 52 | #define TYPE_MAXIMUM(t) \ | ||
| 53 | ((t) (! TYPE_SIGNED (t) \ | ||
| 54 | ? (t) -1 \ | ||
| 55 | - : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) | ||
| 56 | + : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1))) | ||
| 57 | |||
| 58 | /* The maximum and minimum values for the type of the expression E, | ||
| 59 | after integer promotion. E should not have side effects. */ | ||
| 60 | @@ -65,7 +69,13 @@ | ||
| 61 | ? _GL_SIGNED_INT_MAXIMUM (e) \ | ||
| 62 | : _GL_INT_NEGATE_CONVERT (e, 1)) | ||
| 63 | #define _GL_SIGNED_INT_MAXIMUM(e) \ | ||
| 64 | - (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1) | ||
| 65 | + (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH ((e) + 0) - 2)) - 1) * 2 + 1) | ||
| 66 | + | ||
| 67 | +/* Work around OpenVMS incompatibility with C99. */ | ||
| 68 | +#if !defined LLONG_MAX && defined __INT64_MAX | ||
| 69 | +# define LLONG_MAX __INT64_MAX | ||
| 70 | +# define LLONG_MIN __INT64_MIN | ||
| 71 | +#endif | ||
| 72 | |||
| 73 | /* This include file assumes that signed types are two's complement without | ||
| 74 | padding bits; the above macros have undefined behavior otherwise. | ||
| 75 | @@ -84,10 +94,15 @@ verify (TYPE_MAXIMUM (long int) == LONG_MAX); | ||
| 76 | verify (TYPE_MINIMUM (long long int) == LLONG_MIN); | ||
| 77 | verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); | ||
| 78 | #endif | ||
| 79 | +/* Similarly, sanity-check one ISO/IEC TS 18661-1:2014 macro if defined. */ | ||
| 80 | +#ifdef UINT_WIDTH | ||
| 81 | +verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH); | ||
| 82 | +#endif | ||
| 83 | |||
| 84 | /* Does the __typeof__ keyword work? This could be done by | ||
| 85 | 'configure', but for now it's easier to do it by hand. */ | ||
| 86 | -#if (2 <= __GNUC__ || defined __IBM__TYPEOF__ \ | ||
| 87 | +#if (2 <= __GNUC__ \ | ||
| 88 | + || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \ | ||
| 89 | || (0x5110 <= __SUNPRO_C && !__STDC__)) | ||
| 90 | # define _GL_HAVE___TYPEOF__ 1 | ||
| 91 | #else | ||
| 92 | @@ -116,8 +131,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); | ||
| 93 | signed, this macro may overestimate the true bound by one byte when | ||
| 94 | applied to unsigned types of size 2, 4, 16, ... bytes. */ | ||
| 95 | #define INT_STRLEN_BOUND(t) \ | ||
| 96 | - (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT \ | ||
| 97 | - - _GL_SIGNED_TYPE_OR_EXPR (t)) \ | ||
| 98 | + (INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - _GL_SIGNED_TYPE_OR_EXPR (t)) \ | ||
| 99 | + _GL_SIGNED_TYPE_OR_EXPR (t)) | ||
| 100 | |||
| 101 | /* Bound on buffer size needed to represent an integer type or expression T, | ||
| 102 | @@ -222,20 +236,23 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); | ||
| 103 | ? (a) < (min) >> (b) \ | ||
| 104 | : (max) >> (b) < (a)) | ||
| 105 | |||
| 106 | -/* True if __builtin_add_overflow (A, B, P) works when P is null. */ | ||
| 107 | -#define _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL (7 <= __GNUC__) | ||
| 108 | +/* True if __builtin_add_overflow (A, B, P) works when P is non-null. */ | ||
| 109 | +#define _GL_HAS_BUILTIN_OVERFLOW (5 <= __GNUC__) | ||
| 110 | + | ||
| 111 | +/* True if __builtin_add_overflow_p (A, B, C) works. */ | ||
| 112 | +#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__) | ||
| 113 | |||
| 114 | /* The _GL*_OVERFLOW macros have the same restrictions as the | ||
| 115 | *_RANGE_OVERFLOW macros, except that they do not assume that operands | ||
| 116 | (e.g., A and B) have the same type as MIN and MAX. Instead, they assume | ||
| 117 | that the result (e.g., A + B) has that type. */ | ||
| 118 | -#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL | ||
| 119 | -# define _GL_ADD_OVERFLOW(a, b, min, max) | ||
| 120 | - __builtin_add_overflow (a, b, (__typeof__ ((a) + (b)) *) 0) | ||
| 121 | -# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) | ||
| 122 | - __builtin_sub_overflow (a, b, (__typeof__ ((a) - (b)) *) 0) | ||
| 123 | -# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) | ||
| 124 | - __builtin_mul_overflow (a, b, (__typeof__ ((a) * (b)) *) 0) | ||
| 125 | +#if _GL_HAS_BUILTIN_OVERFLOW_P | ||
| 126 | +# define _GL_ADD_OVERFLOW(a, b, min, max) \ | ||
| 127 | + __builtin_add_overflow_p (a, b, (__typeof__ ((a) + (b))) 0) | ||
| 128 | +# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ | ||
| 129 | + __builtin_sub_overflow_p (a, b, (__typeof__ ((a) - (b))) 0) | ||
| 130 | +# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ | ||
| 131 | + __builtin_mul_overflow_p (a, b, (__typeof__ ((a) * (b))) 0) | ||
| 132 | #else | ||
| 133 | # define _GL_ADD_OVERFLOW(a, b, min, max) \ | ||
| 134 | ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \ | ||
| 135 | @@ -315,7 +332,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); | ||
| 136 | _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW) | ||
| 137 | #define INT_SUBTRACT_OVERFLOW(a, b) \ | ||
| 138 | _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW) | ||
| 139 | -#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL | ||
| 140 | +#if _GL_HAS_BUILTIN_OVERFLOW_P | ||
| 141 | # define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a) | ||
| 142 | #else | ||
| 143 | # define INT_NEGATE_OVERFLOW(a) \ | ||
| 144 | @@ -349,10 +366,6 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); | ||
| 145 | #define INT_MULTIPLY_WRAPV(a, b, r) \ | ||
| 146 | _GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW) | ||
| 147 | |||
| 148 | -#ifndef __has_builtin | ||
| 149 | -# define __has_builtin(x) 0 | ||
| 150 | -#endif | ||
| 151 | - | ||
| 152 | /* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See: | ||
| 153 | https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193 | ||
| 154 | https://llvm.org/bugs/show_bug.cgi?id=25390 | ||
| 155 | @@ -369,7 +382,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); | ||
| 156 | the operation. BUILTIN is the builtin operation, and OVERFLOW the | ||
| 157 | overflow predicate. Return 1 if the result overflows. See above | ||
| 158 | for restrictions. */ | ||
| 159 | -#if 5 <= __GNUC__ || __has_builtin (__builtin_add_overflow) | ||
| 160 | +#if _GL_HAS_BUILTIN_OVERFLOW | ||
| 161 | # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r) | ||
| 162 | #elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS | ||
| 163 | # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ | ||
| 164 | @@ -412,7 +425,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); | ||
| 165 | # else | ||
| 166 | # define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \ | ||
| 167 | _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ | ||
| 168 | - long int, LONG_MIN, LONG_MAX)) | ||
| 169 | + long int, LONG_MIN, LONG_MAX) | ||
| 170 | # endif | ||
| 171 | #endif | ||
| 172 | |||
| 173 | diff --git a/lib/gltests/intprops.h b/lib/gltests/intprops.h | ||
| 174 | index e1fce5c..eb06b69 100644 | ||
| 175 | --- a/lib/gltests/intprops.h | ||
| 176 | +++ b/lib/gltests/intprops.h | ||
| 177 | @@ -1,18 +1,18 @@ | ||
| 178 | /* intprops.h -- properties of integer types | ||
| 179 | |||
| 180 | - Copyright (C) 2001-2016 Free Software Foundation, Inc. | ||
| 181 | + Copyright (C) 2001-2017 Free Software Foundation, Inc. | ||
| 182 | |||
| 183 | This program is free software: you can redistribute it and/or modify it | ||
| 184 | - under the terms of the GNU General Public License as published | ||
| 185 | - by the Free Software Foundation; either version 3 of the License, or | ||
| 186 | + under the terms of the GNU Lesser General Public License as published | ||
| 187 | + by the Free Software Foundation; either version 2.1 of the License, or | ||
| 188 | (at your option) any later version. | ||
| 189 | |||
| 190 | This program is distributed in the hope that it will be useful, | ||
| 191 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 192 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 193 | - GNU General Public License for more details. | ||
| 194 | + GNU Lesser General Public License for more details. | ||
| 195 | |||
| 196 | - You should have received a copy of the GNU General Public License | ||
| 197 | + You should have received a copy of the GNU Lesser General Public License | ||
| 198 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | ||
| 199 | |||
| 200 | /* Written by Paul Eggert. */ | ||
| 201 | @@ -47,12 +47,16 @@ | ||
| 202 | |||
| 203 | /* Minimum and maximum values for integer types and expressions. */ | ||
| 204 | |||
| 205 | +/* The width in bits of the integer type or expression T. | ||
| 206 | + Padding bits are not supported; this is checked at compile-time below. */ | ||
| 207 | +#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT) | ||
| 208 | + | ||
| 209 | /* The maximum and minimum values for the integer type T. */ | ||
| 210 | #define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t)) | ||
| 211 | #define TYPE_MAXIMUM(t) \ | ||
| 212 | ((t) (! TYPE_SIGNED (t) \ | ||
| 213 | ? (t) -1 \ | ||
| 214 | - : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) | ||
| 215 | + : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1))) | ||
| 216 | |||
| 217 | /* The maximum and minimum values for the type of the expression E, | ||
| 218 | after integer promotion. E should not have side effects. */ | ||
| 219 | @@ -65,7 +69,13 @@ | ||
| 220 | ? _GL_SIGNED_INT_MAXIMUM (e) \ | ||
| 221 | : _GL_INT_NEGATE_CONVERT (e, 1)) | ||
| 222 | #define _GL_SIGNED_INT_MAXIMUM(e) \ | ||
| 223 | - (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1) | ||
| 224 | + (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH ((e) + 0) - 2)) - 1) * 2 + 1) | ||
| 225 | + | ||
| 226 | +/* Work around OpenVMS incompatibility with C99. */ | ||
| 227 | +#if !defined LLONG_MAX && defined __INT64_MAX | ||
| 228 | +# define LLONG_MAX __INT64_MAX | ||
| 229 | +# define LLONG_MIN __INT64_MIN | ||
| 230 | +#endif | ||
| 231 | |||
| 232 | /* This include file assumes that signed types are two's complement without | ||
| 233 | padding bits; the above macros have undefined behavior otherwise. | ||
| 234 | @@ -84,10 +94,15 @@ verify (TYPE_MAXIMUM (long int) == LONG_MAX); | ||
| 235 | verify (TYPE_MINIMUM (long long int) == LLONG_MIN); | ||
| 236 | verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); | ||
| 237 | #endif | ||
| 238 | +/* Similarly, sanity-check one ISO/IEC TS 18661-1:2014 macro if defined. */ | ||
| 239 | +#ifdef UINT_WIDTH | ||
| 240 | +verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH); | ||
| 241 | +#endif | ||
| 242 | |||
| 243 | /* Does the __typeof__ keyword work? This could be done by | ||
| 244 | 'configure', but for now it's easier to do it by hand. */ | ||
| 245 | -#if (2 <= __GNUC__ || defined __IBM__TYPEOF__ \ | ||
| 246 | +#if (2 <= __GNUC__ \ | ||
| 247 | + || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \ | ||
| 248 | || (0x5110 <= __SUNPRO_C && !__STDC__)) | ||
| 249 | # define _GL_HAVE___TYPEOF__ 1 | ||
| 250 | #else | ||
| 251 | @@ -116,8 +131,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); | ||
| 252 | signed, this macro may overestimate the true bound by one byte when | ||
| 253 | applied to unsigned types of size 2, 4, 16, ... bytes. */ | ||
| 254 | #define INT_STRLEN_BOUND(t) \ | ||
| 255 | - (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT \ | ||
| 256 | - - _GL_SIGNED_TYPE_OR_EXPR (t)) \ | ||
| 257 | + (INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - _GL_SIGNED_TYPE_OR_EXPR (t)) \ | ||
| 258 | + _GL_SIGNED_TYPE_OR_EXPR (t)) | ||
| 259 | |||
| 260 | /* Bound on buffer size needed to represent an integer type or expression T, | ||
| 261 | @@ -222,20 +236,23 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); | ||
| 262 | ? (a) < (min) >> (b) \ | ||
| 263 | : (max) >> (b) < (a)) | ||
| 264 | |||
| 265 | -/* True if __builtin_add_overflow (A, B, P) works when P is null. */ | ||
| 266 | -#define _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL (7 <= __GNUC__) | ||
| 267 | +/* True if __builtin_add_overflow (A, B, P) works when P is non-null. */ | ||
| 268 | +#define _GL_HAS_BUILTIN_OVERFLOW (5 <= __GNUC__) | ||
| 269 | + | ||
| 270 | +/* True if __builtin_add_overflow_p (A, B, C) works. */ | ||
| 271 | +#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__) | ||
| 272 | |||
| 273 | /* The _GL*_OVERFLOW macros have the same restrictions as the | ||
| 274 | *_RANGE_OVERFLOW macros, except that they do not assume that operands | ||
| 275 | (e.g., A and B) have the same type as MIN and MAX. Instead, they assume | ||
| 276 | that the result (e.g., A + B) has that type. */ | ||
| 277 | -#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL | ||
| 278 | -# define _GL_ADD_OVERFLOW(a, b, min, max) | ||
| 279 | - __builtin_add_overflow (a, b, (__typeof__ ((a) + (b)) *) 0) | ||
| 280 | -# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) | ||
| 281 | - __builtin_sub_overflow (a, b, (__typeof__ ((a) - (b)) *) 0) | ||
| 282 | -# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) | ||
| 283 | - __builtin_mul_overflow (a, b, (__typeof__ ((a) * (b)) *) 0) | ||
| 284 | +#if _GL_HAS_BUILTIN_OVERFLOW_P | ||
| 285 | +# define _GL_ADD_OVERFLOW(a, b, min, max) \ | ||
| 286 | + __builtin_add_overflow_p (a, b, (__typeof__ ((a) + (b))) 0) | ||
| 287 | +# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ | ||
| 288 | + __builtin_sub_overflow_p (a, b, (__typeof__ ((a) - (b))) 0) | ||
| 289 | +# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ | ||
| 290 | + __builtin_mul_overflow_p (a, b, (__typeof__ ((a) * (b))) 0) | ||
| 291 | #else | ||
| 292 | # define _GL_ADD_OVERFLOW(a, b, min, max) \ | ||
| 293 | ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \ | ||
| 294 | @@ -315,7 +332,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); | ||
| 295 | _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW) | ||
| 296 | #define INT_SUBTRACT_OVERFLOW(a, b) \ | ||
| 297 | _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW) | ||
| 298 | -#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL | ||
| 299 | +#if _GL_HAS_BUILTIN_OVERFLOW_P | ||
| 300 | # define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a) | ||
| 301 | #else | ||
| 302 | # define INT_NEGATE_OVERFLOW(a) \ | ||
| 303 | @@ -349,10 +366,6 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); | ||
| 304 | #define INT_MULTIPLY_WRAPV(a, b, r) \ | ||
| 305 | _GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW) | ||
| 306 | |||
| 307 | -#ifndef __has_builtin | ||
| 308 | -# define __has_builtin(x) 0 | ||
| 309 | -#endif | ||
| 310 | - | ||
| 311 | /* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See: | ||
| 312 | https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193 | ||
| 313 | https://llvm.org/bugs/show_bug.cgi?id=25390 | ||
| 314 | @@ -369,7 +382,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); | ||
| 315 | the operation. BUILTIN is the builtin operation, and OVERFLOW the | ||
| 316 | overflow predicate. Return 1 if the result overflows. See above | ||
| 317 | for restrictions. */ | ||
| 318 | -#if 5 <= __GNUC__ || __has_builtin (__builtin_add_overflow) | ||
| 319 | +#if _GL_HAS_BUILTIN_OVERFLOW | ||
| 320 | # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r) | ||
| 321 | #elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS | ||
| 322 | # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ | ||
| 323 | @@ -412,7 +425,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); | ||
| 324 | # else | ||
| 325 | # define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \ | ||
| 326 | _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ | ||
| 327 | - long int, LONG_MIN, LONG_MAX)) | ||
| 328 | + long int, LONG_MIN, LONG_MAX) | ||
| 329 | # endif | ||
| 330 | #endif | ||
| 331 | |||
| 332 | -- | ||
| 333 | 1.9.1 | ||
| 334 | |||
diff --git a/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch b/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch index db91317ca5..5d03810d00 100644 --- a/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch +++ b/meta/recipes-extended/libidn/libidn/libidn_fix_for_automake-1.12.patch | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | From c34c7aba769bff3e483f89145055b9b8733435f3 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
| 3 | Date: Wed, 2 May 2012 18:05:19 -0700 | ||
| 4 | Subject: [PATCH] libtasn1: fix build with automake 1.12 | ||
| 5 | |||
| 1 | Upstream-Status: Pending | 6 | Upstream-Status: Pending |
| 2 | 7 | ||
| 3 | This patch fixes following issue with automake 1.12 | 8 | This patch fixes following issue with automake 1.12 |
| @@ -9,12 +14,16 @@ This patch fixes following issue with automake 1.12 | |||
| 9 | Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> | 14 | Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> |
| 10 | 2012/05/03 | 15 | 2012/05/03 |
| 11 | 16 | ||
| 12 | Index: libidn-1.33/configure.ac | 17 | --- |
| 13 | =================================================================== | 18 | configure.ac | 4 ++++ |
| 14 | --- libidn-1.33.orig/configure.ac | 19 | 1 file changed, 4 insertions(+) |
| 15 | +++ libidn-1.33/configure.ac | 20 | |
| 21 | diff --git a/configure.ac b/configure.ac | ||
| 22 | index f8049a4..261dad2 100644 | ||
| 23 | --- a/configure.ac | ||
| 24 | +++ b/configure.ac | ||
| 16 | @@ -33,6 +33,10 @@ AC_SUBST(LT_CURRENT, 17) | 25 | @@ -33,6 +33,10 @@ AC_SUBST(LT_CURRENT, 17) |
| 17 | AC_SUBST(LT_REVISION, 16) | 26 | AC_SUBST(LT_REVISION, 18) |
| 18 | AC_SUBST(LT_AGE, 6) | 27 | AC_SUBST(LT_AGE, 6) |
| 19 | 28 | ||
| 20 | +# automake 1.12 seems to require this, but automake 1.11 doesn't recognize it | 29 | +# automake 1.12 seems to require this, but automake 1.11 doesn't recognize it |
diff --git a/meta/recipes-extended/libidn/libidn_1.33.bb b/meta/recipes-extended/libidn/libidn_1.34.bb index 9e8bdbae18..424c6c9f98 100644 --- a/meta/recipes-extended/libidn/libidn_1.33.bb +++ b/meta/recipes-extended/libidn/libidn_1.34.bb | |||
| @@ -18,13 +18,11 @@ SRC_URI = "${GNU_MIRROR}/libidn/${BPN}-${PV}.tar.gz \ | |||
| 18 | file://libidn_fix_for_automake-1.12.patch \ | 18 | file://libidn_fix_for_automake-1.12.patch \ |
| 19 | file://avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch \ | 19 | file://avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch \ |
| 20 | file://dont-depend-on-help2man.patch \ | 20 | file://dont-depend-on-help2man.patch \ |
| 21 | file://0001-idn-fix-printf-format-security-warnings.patch \ | ||
| 22 | file://gcc7-compatibility.patch \ | ||
| 23 | file://0001-idn-format-security-warnings.patch \ | 21 | file://0001-idn-format-security-warnings.patch \ |
| 24 | " | 22 | " |
| 25 | 23 | ||
| 26 | SRC_URI[md5sum] = "a9aa7e003665de9c82bd3f9fc6ccf308" | 24 | SRC_URI[md5sum] = "a829db6cd0b85733017c20a50bf10798" |
| 27 | SRC_URI[sha256sum] = "44a7aab635bb721ceef6beecc4d49dfd19478325e1b47f3196f7d2acc4930e19" | 25 | SRC_URI[sha256sum] = "3719e2975f2fb28605df3479c380af2cf4ab4e919e1506527e4c7670afff6e3c" |
| 28 | 26 | ||
| 29 | # command tool is under GPLv3+, while libidn itself is under LGPLv2.1+ or LGPLv3 | 27 | # command tool is under GPLv3+, while libidn itself is under LGPLv2.1+ or LGPLv3 |
| 30 | # so package command into a separate package | 28 | # so package command into a separate package |
