Commit cf112c1
committed
Remove dead pread and pwrite replacement code.
pread() and pwrite() are in SUSv2, and all targeted Unix systems have
them.
Previously, we defined pg_pread and pg_pwrite to emulate these function
with lseek() on old Unixen. The names with a pg_ prefix were a reminder
of a portability hazard: they might change the current file position.
That hazard is gone, so we can drop the prefixes.
Since the remaining replacement code is Windows-only, move it into
src/port/win32p{read,write}.c, and move the declarations into
src/include/port/win32_port.h.
No need for vestigial HAVE_PREAD, HAVE_PWRITE macros as they were only
used for declarations in port.h which have now moved into win32_port.h.
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Greg Stark <stark@mit.edu>
Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CA+hUKGJ3LHeP9w5Fgzdr4G8AnEtJ=z=p6hGDEm4qYGEUX5B6fQ@mail.gmail.com1 parent 71f5dc6 commit cf112c1
File tree
23 files changed
+76
-137
lines changed- contrib/pg_stat_statements
- src
- backend
- access
- heap
- transam
- replication
- storage/file
- utils/init
- bin/pg_test_fsync
- include
- access
- port
- port
- tools/msvc
23 files changed
+76
-137
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16728 | 16728 | | |
16729 | 16729 | | |
16730 | 16730 | | |
16731 | | - | |
16732 | | - | |
16733 | | - | |
16734 | | - | |
16735 | | - | |
16736 | | - | |
16737 | | - | |
16738 | | - | |
16739 | | - | |
16740 | | - | |
16741 | | - | |
16742 | | - | |
16743 | | - | |
16744 | | - | |
16745 | | - | |
16746 | | - | |
16747 | | - | |
16748 | | - | |
16749 | | - | |
16750 | | - | |
16751 | | - | |
16752 | | - | |
16753 | | - | |
16754 | | - | |
16755 | | - | |
16756 | | - | |
16757 | 16731 | | |
16758 | 16732 | | |
16759 | 16733 | | |
| |||
17015 | 16989 | | |
17016 | 16990 | | |
17017 | 16991 | | |
| 16992 | + | |
| 16993 | + | |
| 16994 | + | |
| 16995 | + | |
| 16996 | + | |
| 16997 | + | |
| 16998 | + | |
| 16999 | + | |
| 17000 | + | |
| 17001 | + | |
| 17002 | + | |
| 17003 | + | |
17018 | 17004 | | |
17019 | 17005 | | |
17020 | 17006 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1876 | 1876 | | |
1877 | 1877 | | |
1878 | 1878 | | |
1879 | | - | |
1880 | | - | |
1881 | 1879 | | |
1882 | 1880 | | |
1883 | 1881 | | |
| |||
1943 | 1941 | | |
1944 | 1942 | | |
1945 | 1943 | | |
| 1944 | + | |
| 1945 | + | |
1946 | 1946 | | |
1947 | 1947 | | |
1948 | 1948 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2103 | 2103 | | |
2104 | 2104 | | |
2105 | 2105 | | |
2106 | | - | |
| 2106 | + | |
2107 | 2107 | | |
2108 | | - | |
| 2108 | + | |
2109 | 2109 | | |
2110 | 2110 | | |
2111 | 2111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1149 | 1149 | | |
1150 | 1150 | | |
1151 | 1151 | | |
1152 | | - | |
| 1152 | + | |
1153 | 1153 | | |
1154 | 1154 | | |
1155 | 1155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
718 | 718 | | |
719 | 719 | | |
720 | 720 | | |
721 | | - | |
| 721 | + | |
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
| |||
873 | 873 | | |
874 | 874 | | |
875 | 875 | | |
876 | | - | |
| 876 | + | |
877 | 877 | | |
878 | 878 | | |
879 | 879 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2189 | 2189 | | |
2190 | 2190 | | |
2191 | 2191 | | |
2192 | | - | |
| 2192 | + | |
2193 | 2193 | | |
2194 | 2194 | | |
2195 | 2195 | | |
| |||
3011 | 3011 | | |
3012 | 3012 | | |
3013 | 3013 | | |
3014 | | - | |
| 3014 | + | |
3015 | 3015 | | |
3016 | 3016 | | |
3017 | 3017 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1514 | 1514 | | |
1515 | 1515 | | |
1516 | 1516 | | |
1517 | | - | |
| 1517 | + | |
1518 | 1518 | | |
1519 | 1519 | | |
1520 | 1520 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3260 | 3260 | | |
3261 | 3261 | | |
3262 | 3262 | | |
3263 | | - | |
| 3263 | + | |
3264 | 3264 | | |
3265 | 3265 | | |
3266 | 3266 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1822 | 1822 | | |
1823 | 1823 | | |
1824 | 1824 | | |
1825 | | - | |
| 1825 | + | |
1826 | 1826 | | |
1827 | 1827 | | |
1828 | 1828 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
915 | 915 | | |
916 | 916 | | |
917 | 917 | | |
918 | | - | |
| 918 | + | |
919 | 919 | | |
920 | 920 | | |
921 | 921 | | |
| |||
0 commit comments