- Notifications
You must be signed in to change notification settings - Fork4.9k
Commita9beed6
Fix our Windows stat() emulation to handle file sizes > 4GB.
Hack things so that our idea of "struct stat" is equivalent to Windows'struct __stat64, allowing it to have a wide enough st_size field.Instead of relying on native stat(), use GetFileInformationByHandle().This avoids a number of issues with Microsoft's multiple and ratherslipshod emulations of stat(). We still need to jump through hoopsto deal with ERROR_DELETE_PENDING, though :-(Pull the relevant support code out of dirmod.c and put it intoits own file, win32stat.c.Still TODO: do we need to do something different with lstat(),rather than treating it identically to stat()?Juan José Santamaría Flecha, reviewed by Emil Iggland;based on prior work by Michael Paquier, Sergey Zubkovsky, and othersDiscussion:https://postgr.es/m/1803D792815FC24D871C00D17AE95905CF5099@g01jpexmbkw24Discussion:https://postgr.es/m/15858-9572469fd3b73263@postgresql.org(cherry picked from commitbed9075)Author: Alexandra Wang <alexandra.wang.oss@gmail.com>1 parentf534e38 commita9beed6
File tree
6 files changed
+339
-65
lines changed- src
- include/port
- port
- tools/msvc
6 files changed
+339
-65
lines changedLines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16515 | 16515 |
| |
16516 | 16516 |
| |
16517 | 16517 |
| |
| 16518 | + | |
| 16519 | + | |
| 16520 | + | |
| 16521 | + | |
| 16522 | + | |
| 16523 | + | |
16518 | 16524 |
| |
16519 | 16525 |
| |
16520 | 16526 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1873 | 1873 |
| |
1874 | 1874 |
| |
1875 | 1875 |
| |
| 1876 | + | |
1876 | 1877 |
| |
1877 | 1878 |
| |
1878 | 1879 |
| |
|
Lines changed: 32 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
51 | 51 |
| |
52 | 52 |
| |
53 | 53 |
| |
54 |
| - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
55 | 61 |
| |
56 | 62 |
| |
57 | 63 |
| |
| |||
240 | 246 |
| |
241 | 247 |
| |
242 | 248 |
| |
243 |
| - | |
244 |
| - | |
245 |
| - | |
246 |
| - | |
| 249 | + | |
247 | 250 |
| |
248 |
| - | |
| 251 | + | |
249 | 252 |
| |
250 |
| - | |
251 |
| - | |
| 253 | + | |
| 254 | + | |
252 | 255 |
| |
253 |
| - | |
254 |
| - | |
255 |
| - | |
256 |
| - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
257 | 277 |
| |
258 | 278 |
| |
259 | 279 |
| |
|
Lines changed: 0 additions & 52 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
353 | 353 |
| |
354 | 354 |
| |
355 | 355 |
| |
356 |
| - | |
357 |
| - | |
358 |
| - | |
359 |
| - | |
360 |
| - | |
361 |
| - | |
362 |
| - | |
363 |
| - | |
364 |
| - | |
365 |
| - | |
366 |
| - | |
367 |
| - | |
368 |
| - | |
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 |
| - | |
400 |
| - | |
401 |
| - | |
402 |
| - | |
403 |
| - | |
404 |
| - | |
405 |
| - | |
406 |
| - | |
407 |
| - |
0 commit comments
Comments
(0)