forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit00fd434
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 parent13108dd commit00fd434
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 | |
---|---|---|---|
| |||
366 | 366 |
| |
367 | 367 |
| |
368 | 368 |
| |
369 |
| - | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + |
Lines changed: 53 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11419 | 11419 |
| |
11420 | 11420 |
| |
11421 | 11421 |
| |
| 11422 | + | |
| 11423 | + | |
| 11424 | + | |
| 11425 | + | |
| 11426 | + | |
| 11427 | + | |
| 11428 | + | |
| 11429 | + | |
| 11430 | + | |
| 11431 | + | |
| 11432 | + | |
| 11433 | + | |
| 11434 | + | |
| 11435 | + | |
| 11436 | + | |
| 11437 | + | |
| 11438 | + | |
| 11439 | + | |
| 11440 | + | |
| 11441 | + | |
| 11442 | + | |
| 11443 | + | |
| 11444 | + | |
| 11445 | + | |
| 11446 | + | |
| 11447 | + | |
| 11448 | + | |
| 11449 | + | |
| 11450 | + | |
| 11451 | + | |
| 11452 | + | |
| 11453 | + | |
| 11454 | + | |
| 11455 | + | |
| 11456 | + | |
| 11457 | + | |
| 11458 | + | |
| 11459 | + | |
| 11460 | + | |
| 11461 | + | |
| 11462 | + | |
| 11463 | + | |
| 11464 | + | |
| 11465 | + | |
| 11466 | + | |
| 11467 | + | |
| 11468 | + | |
| 11469 | + | |
| 11470 | + | |
| 11471 | + | |
| 11472 | + | |
| 11473 | + | |
| 11474 | + | |
11422 | 11475 |
| |
11423 | 11476 |
| |
11424 | 11477 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1291 | 1291 |
| |
1292 | 1292 |
| |
1293 | 1293 |
| |
| 1294 | + | |
1294 | 1295 |
| |
1295 | 1296 |
| |
1296 | 1297 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
815 | 815 |
| |
816 | 816 |
| |
817 | 817 |
| |
| 818 | + | |
| 819 | + | |
| 820 | + | |
818 | 821 |
| |
819 | 822 |
| |
820 | 823 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
656 | 656 |
| |
657 | 657 |
| |
658 | 658 |
| |
| 659 | + | |
| 660 | + | |
| 661 | + | |
659 | 662 |
| |
660 | 663 |
| |
661 | 664 |
| |
|
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)