Skip to content

Commit 1d09690

Browse files
committed
Fix incorrect mapping of fopen mode 'a' in recently-added code to
make fopen work safely on Windows. Magnus
1 parent f375d5d commit 1d09690

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/port/open.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
88
*
9-
* $PostgreSQL: pgsql/src/port/open.c,v 1.14 2006/08/30 18:06:27 tgl Exp $
9+
* $PostgreSQL: pgsql/src/port/open.c,v 1.15 2006/09/24 17:19:53 tgl Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -126,7 +126,7 @@ pgwin32_fopen(const char *fileName, const char *mode)
126126
else if (strchr(mode, 'w'))
127127
openmode |= O_WRONLY | O_CREAT | O_TRUNC;
128128
if (strchr(mode, 'a'))
129-
openmode |= O_WRONLY | O_APPEND;
129+
openmode |= O_WRONLY | O_CREAT | O_APPEND;
130130

131131
if (strchr(mode, 'b'))
132132
openmode |= O_BINARY;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy