When installing unmodified files (as part of update/checkout) use a Windows
Vista and later API to avoid reopening the file as part of the rename
operation. Fall back to the old (common) code on older Windows versions.

This reduces the amount of time spend on the rename itself and avoids
virusscanners and other file system hooks to take action on the open
that is part of the rename, which would make us wait until the file
is completely scanned.

* subversion/include/private/svn_io_private.h
  (svn_io__utf8_to_unicode_longpath): New function.

* subversion/libsvn_subr/io.c
  (io_utf8_to_unicode_path): Rename to ...
  (svn_io__utf8_to_unicode_longpath): ... this to allow using from stream.c
  (io_win_file_attrs_set): Update caller.

* subversion/libsvn_subr/stream.c
  (includes): Add 3 files.
  (_FILE_RENAME_INFO): New struct.
  (SetFileInformationByHandle_t,
   SetFileInformationByHandle,
   SetFileInformationByHandle_a): Define if necessary.
  (find_SetFileInformationByHandle): New function.
  (create_tempfile): New function.
  (install_close): New function.

  (svn_stream__create_for_install,
   svn_stream__install_stream): Add Windows specific code.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1559993 13f79535-47bb-0310-9956-ffa450edef68