summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorTom Lane2020-10-09 20:20:12 +0000
committerTom Lane2020-10-09 20:20:12 +0000
commitbed90759fcbcd72d4d06969eebab81e47326f9a2 (patch)
tree76a427792a52844df5b971f698a93ece985417b5 /configure
parentf13f2e484172a1c865cd067796cee3568467dd51 (diff)
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 rather slipshod emulations of stat(). We still need to jump through hoops to deal with ERROR_DELETE_PENDING, though :-( Pull the relevant support code out of dirmod.c and put it into its 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 others Discussion: https://postgr.es/m/1803D792815FC24D871C00D17AE95905CF5099@g01jpexmbkw24 Discussion: https://postgr.es/m/15858-9572469fd3b73263@postgresql.org
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure b/configure
index 19a3cd09a0a..071d050ef00 100755
--- a/configure
+++ b/configure
@@ -16137,6 +16137,12 @@ esac
;;
esac
+ case " $LIBOBJS " in
+ *" win32stat.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS win32stat.$ac_objext"
+ ;;
+esac
+
$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h