aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlog.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2000-06-02 15:57:44 +0000
committerBruce Momjian <bruce@momjian.us>2000-06-02 15:57:44 +0000
commitcc2b5e5815aa596dbbdd288d0d178019f2d521aa (patch)
treeb82baecdde9295a977c530b10f8f15a91e012cda /src/backend/access/transam/xlog.c
parentbf1c8f2b3b067c29f1abdf6fe866fb485ade96e9 (diff)
downloadpostgresql-cc2b5e5815aa596dbbdd288d0d178019f2d521aa.tar.gz
postgresql-cc2b5e5815aa596dbbdd288d0d178019f2d521aa.zip
Remove NT-specific file open defines by defining our own open macros for
"rb" and "wb".
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r--src/backend/access/transam/xlog.c32
1 files changed, 6 insertions, 26 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index ca75cfefb18..1eaa166995b 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.15 2000/06/02 10:20:25 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.16 2000/06/02 15:57:16 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -746,11 +746,7 @@ XLogFileInit(uint32 log, uint32 seg)
XLogFileName(path, log, seg);
unlink(path);
-#ifndef __CYGWIN__
- fd = BasicOpenFile(path, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
-#else
- fd = BasicOpenFile(path, O_RDWR | O_CREAT | O_EXCL | O_BINARY, S_IRUSR | S_IWUSR);
-#endif
+ fd = BasicOpenFile(path, O_RDWR | O_CREAT | O_EXCL | PG_BINARY, S_IRUSR | S_IWUSR);
if (fd < 0)
elog(STOP, "Open(logfile %u seg %u) failed: %d",
logId, logSeg, errno);
@@ -782,11 +778,7 @@ XLogFileOpen(uint32 log, uint32 seg, bool econt)
XLogFileName(path, log, seg);
-#ifndef __CYGWIN__
- fd = BasicOpenFile(path, O_RDWR, S_IRUSR | S_IWUSR);
-#else
- fd = BasicOpenFile(path, O_RDWR | O_BINARY, S_IRUSR | S_IWUSR);
-#endif
+ fd = BasicOpenFile(path, O_RDWR | PG_BINARY, S_IRUSR | S_IWUSR);
if (fd < 0)
{
if (econt && errno == ENOENT)
@@ -1096,11 +1088,7 @@ UpdateControlFile()
{
int fd;
-#ifndef __CYGWIN__
- fd = BasicOpenFile(ControlFilePath, O_RDWR, S_IRUSR | S_IWUSR);
-#else
- fd = BasicOpenFile(ControlFilePath, O_RDWR | O_BINARY, S_IRUSR | S_IWUSR);
-#endif
+ fd = BasicOpenFile(ControlFilePath, O_RDWR | PG_BINARY, S_IRUSR | S_IWUSR);
if (fd < 0)
elog(STOP, "Open(cntlfile) failed: %d", errno);
@@ -1158,11 +1146,7 @@ BootStrapXLOG()
#endif
-#ifndef __CYGWIN__
- fd = BasicOpenFile(ControlFilePath, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
-#else
- fd = BasicOpenFile(ControlFilePath, O_RDWR | O_CREAT | O_EXCL | O_BINARY, S_IRUSR | S_IWUSR);
-#endif
+ fd = BasicOpenFile(ControlFilePath, O_RDWR | O_CREAT | O_EXCL | PG_BINARY, S_IRUSR | S_IWUSR);
if (fd < 0)
elog(STOP, "BootStrapXLOG failed to create control file (%s): %d",
ControlFilePath, errno);
@@ -1273,11 +1257,7 @@ StartupXLOG()
/*
* Open/read Control file
*/
-#ifndef __CYGWIN__
- fd = BasicOpenFile(ControlFilePath, O_RDWR, S_IRUSR | S_IWUSR);
-#else
- fd = BasicOpenFile(ControlFilePath, O_RDWR | O_BINARY, S_IRUSR | S_IWUSR);
-#endif
+ fd = BasicOpenFile(ControlFilePath, O_RDWR | PG_BINARY, S_IRUSR | S_IWUSR);
if (fd < 0)
elog(STOP, "Open(\"%s\") failed: %d", ControlFilePath, errno);