- Notifications
You must be signed in to change notification settings - Fork5
Commitb4ce97a
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 parent1bee54e commitb4ce97a
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 | |
---|---|---|---|
| |||
343 | 343 |
| |
344 | 344 |
| |
345 | 345 |
| |
346 |
| - | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + |
Lines changed: 53 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11557 | 11557 |
| |
11558 | 11558 |
| |
11559 | 11559 |
| |
| 11560 | + | |
| 11561 | + | |
| 11562 | + | |
| 11563 | + | |
| 11564 | + | |
| 11565 | + | |
| 11566 | + | |
| 11567 | + | |
| 11568 | + | |
| 11569 | + | |
| 11570 | + | |
| 11571 | + | |
| 11572 | + | |
| 11573 | + | |
| 11574 | + | |
| 11575 | + | |
| 11576 | + | |
| 11577 | + | |
| 11578 | + | |
| 11579 | + | |
| 11580 | + | |
| 11581 | + | |
| 11582 | + | |
| 11583 | + | |
| 11584 | + | |
| 11585 | + | |
| 11586 | + | |
| 11587 | + | |
| 11588 | + | |
| 11589 | + | |
| 11590 | + | |
| 11591 | + | |
| 11592 | + | |
| 11593 | + | |
| 11594 | + | |
| 11595 | + | |
| 11596 | + | |
| 11597 | + | |
| 11598 | + | |
| 11599 | + | |
| 11600 | + | |
| 11601 | + | |
| 11602 | + | |
| 11603 | + | |
| 11604 | + | |
| 11605 | + | |
| 11606 | + | |
| 11607 | + | |
| 11608 | + | |
| 11609 | + | |
| 11610 | + | |
| 11611 | + | |
| 11612 | + | |
11560 | 11613 |
| |
11561 | 11614 |
| |
11562 | 11615 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1317 | 1317 |
| |
1318 | 1318 |
| |
1319 | 1319 |
| |
| 1320 | + | |
1320 | 1321 |
| |
1321 | 1322 |
| |
1322 | 1323 |
| |
|
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 | |
---|---|---|---|
| |||
670 | 670 |
| |
671 | 671 |
| |
672 | 672 |
| |
| 673 | + | |
| 674 | + | |
| 675 | + | |
673 | 676 |
| |
674 | 677 |
| |
675 | 678 |
| |
|
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)