- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit0e9b899
committed
Cope if platform declares mbstowcs_l(), but not locale_t, in <xlocale.h>.
Previously, we included <xlocale.h> only if necessary to get the definitionof type locale_t. According to notes in PGAC_TYPE_LOCALE_T, this isimportant because on some versions of glibc that file supplies anincompatible declaration of locale_t. (This info may be obsolete, becauseon my RHEL6 box that seems to be the *only* definition of locale_t; butthere may still be glibc's in the wild for which it's a live concern.)It turns out though that on FreeBSD and maybe other BSDen, you can getlocale_t from stdlib.h or locale.h but mbstowcs_l() and friends only from<xlocale.h>. This was leaving us compiling calls to mbstowcs_l() andfriends with no visible prototype, which causes a warning and couldpossibly cause actual trouble, since it's not declared to return int.Hence, adjust the configure checks so that we'll include <xlocale.h>either if it's necessary to get type locale_t or if it's necessary toget a declaration of mbstowcs_l().Report and patch by Aleksander Alekseev, somewhat whacked around by me.Back-patch to all supported branches, since we have been usingmbstowcs_l() since 9.1.1 parent101fd93 commit0e9b899
File tree
6 files changed
+92
-2
lines changed- config
- src/include
- utils
6 files changed
+92
-2
lines changedLines changed: 31 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
316 | 316 |
| |
317 | 317 |
| |
318 | 318 |
| |
319 |
| - | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + |
Lines changed: 53 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12364 | 12364 |
| |
12365 | 12365 |
| |
12366 | 12366 |
| |
| 12367 | + | |
| 12368 | + | |
| 12369 | + | |
| 12370 | + | |
| 12371 | + | |
| 12372 | + | |
| 12373 | + | |
| 12374 | + | |
| 12375 | + | |
| 12376 | + | |
| 12377 | + | |
| 12378 | + | |
| 12379 | + | |
| 12380 | + | |
| 12381 | + | |
| 12382 | + | |
| 12383 | + | |
| 12384 | + | |
| 12385 | + | |
| 12386 | + | |
| 12387 | + | |
| 12388 | + | |
| 12389 | + | |
| 12390 | + | |
| 12391 | + | |
| 12392 | + | |
| 12393 | + | |
| 12394 | + | |
| 12395 | + | |
| 12396 | + | |
| 12397 | + | |
| 12398 | + | |
| 12399 | + | |
| 12400 | + | |
| 12401 | + | |
| 12402 | + | |
| 12403 | + | |
| 12404 | + | |
| 12405 | + | |
| 12406 | + | |
| 12407 | + | |
| 12408 | + | |
| 12409 | + | |
| 12410 | + | |
| 12411 | + | |
| 12412 | + | |
| 12413 | + | |
| 12414 | + | |
| 12415 | + | |
| 12416 | + | |
| 12417 | + | |
| 12418 | + | |
| 12419 | + | |
12367 | 12420 |
| |
12368 | 12421 |
| |
12369 | 12422 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1423 | 1423 |
| |
1424 | 1424 |
| |
1425 | 1425 |
| |
| 1426 | + | |
1426 | 1427 |
| |
1427 | 1428 |
| |
1428 | 1429 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
851 | 851 |
| |
852 | 852 |
| |
853 | 853 |
| |
| 854 | + | |
| 855 | + | |
| 856 | + | |
854 | 857 |
| |
855 | 858 |
| |
856 | 859 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
657 | 657 |
| |
658 | 658 |
| |
659 | 659 |
| |
| 660 | + | |
| 661 | + | |
| 662 | + | |
660 | 663 |
| |
661 | 664 |
| |
662 | 665 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
16 |
| - | |
| 16 | + | |
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
|
0 commit comments
Comments
(0)