Commit 4fbc05c
authored
* Always cast `pread`, `lseek` etc. offsets to `off_t`.
When calling libc functions that take `off_t` arguments, always cast to
`off_t`. On platforms where this cast is a no-op, these casts should be
optimized away. This eliminates the need for explicit `cfg`s for
platforms which need the casts.
Fixes bytecodealliance#1432.
* Convert `fallocate`'s length to off_t too.
1 parent 4626b69 commit 4fbc05c
2 files changed
+19
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1404 | 1404 | | |
1405 | 1405 | | |
1406 | 1406 | | |
1407 | | - | |
1408 | | - | |
1409 | | - | |
| 1407 | + | |
| 1408 | + | |
1410 | 1409 | | |
1411 | 1410 | | |
1412 | 1411 | | |
| |||
1734 | 1733 | | |
1735 | 1734 | | |
1736 | 1735 | | |
1737 | | - | |
| 1736 | + | |
1738 | 1737 | | |
1739 | 1738 | | |
1740 | 1739 | | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
1741 | 1744 | | |
1742 | 1745 | | |
1743 | 1746 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | | - | |
| 55 | + | |
| 56 | + | |
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
| |||
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
68 | | - | |
69 | | - | |
70 | | - | |
| 67 | + | |
| 68 | + | |
71 | 69 | | |
72 | 70 | | |
73 | 71 | | |
| |||
111 | 109 | | |
112 | 110 | | |
113 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
| |||
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
137 | 143 | | |
138 | 144 | | |
139 | 145 | | |
| |||
0 commit comments