* Win32 (NT, Win2k, XP). replace() doesn't work on Win95/98/Me.
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/port/dirmod.c,v 1.29 2004/10/17 23:39:22 momjian Exp $
+ * $PostgreSQL: pgsql/src/port/dirmod.c,v 1.30 2004/10/17 23:53:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
{
int loops = 0;
- /* Is this loop even necessary? */
+ /* Is this loop even necessary now that we have win32_open()? */
#if defined(WIN32) && !defined(__CYGWIN__)
while (!MoveFileEx(from, to, MOVEFILE_REPLACE_EXISTING))
#endif
{
int loops = 0;
- /* Is this loop even necessary? */
+ /* Is this loop even necessary now that we have win32_open()? */
while (unlink(path))
{
if (errno != EACCES)
*
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/port/open.c,v 1.4 2004/08/29 05:07:02 momjian Exp $
+ * $PostgreSQL: pgsql/src/port/open.c,v 1.5 2004/10/17 23:53:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
/* cannot use O_RDONLY, as it == 0 */
(fileFlags & O_RDWR) ? (GENERIC_WRITE | GENERIC_READ) :
((fileFlags & O_WRONLY) ? GENERIC_WRITE : GENERIC_READ),
+ /* These flags allow concurrent rename/unlink */
(FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE),
&sa,
openFlagsToCreateFileFlags(fileFlags),