Commit 8b217c9
committed
libpq-fe.h: Don't claim SOCKTYPE in the global namespace
The definition of PGoauthBearerRequest uses a temporary SOCKTYPE macro
to hide the difference between Windows and Berkeley socket handles,
since we don't surface pgsocket in our public API. This macro doesn't
need to escape the header, because implementers will choose the correct
socket type based on their platform, so I #undef'd it immediately after
use.
I didn't namespace that helper, though, so if anyone else needs a
SOCKTYPE macro, libpq-fe.h will now unhelpfully get rid of it. This
doesn't seem too far-fetched, given its proximity to existing POSIX
macro names.
Add a PQ_ prefix to avoid collisions, update and improve the surrounding
documentation, and backpatch.
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/CAOYmi%2BmrGg%2Bn_X2MOLgeWcj3v_M00gR8uz_D7mM8z%3DdX1JYVbg%40mail.gmail.com
Backpatch-through: 181 parent 5b4fb2b commit 8b217c9
2 files changed
+19
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10422 | 10422 | | |
10423 | 10423 | | |
10424 | 10424 | | |
10425 | | - | |
| 10425 | + | |
| 10426 | + | |
| 10427 | + | |
| 10428 | + | |
| 10429 | + | |
10426 | 10430 | | |
10427 | 10431 | | |
10428 | | - | |
| 10432 | + | |
10429 | 10433 | | |
10430 | 10434 | | |
10431 | 10435 | | |
| |||
10482 | 10486 | | |
10483 | 10487 | | |
10484 | 10488 | | |
10485 | | - | |
| 10489 | + | |
10486 | 10490 | | |
10487 | 10491 | | |
10488 | 10492 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
738 | 738 | | |
739 | 739 | | |
740 | 740 | | |
741 | | - | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
742 | 746 | | |
743 | | - | |
| 747 | + | |
744 | 748 | | |
745 | | - | |
| 749 | + | |
746 | 750 | | |
747 | 751 | | |
748 | 752 | | |
| |||
768 | 772 | | |
769 | 773 | | |
770 | 774 | | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
771 | 778 | | |
772 | 779 | | |
773 | 780 | | |
774 | | - | |
| 781 | + | |
775 | 782 | | |
776 | 783 | | |
777 | 784 | | |
| |||
798 | 805 | | |
799 | 806 | | |
800 | 807 | | |
801 | | - | |
| 808 | + | |
802 | 809 | | |
803 | 810 | | |
804 | 811 | | |
| |||
0 commit comments