summaryrefslogtreecommitdiff
path: root/src/backend/postmaster/syslogger.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/postmaster/syslogger.c')
-rw-r--r--src/backend/postmaster/syslogger.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/backend/postmaster/syslogger.c b/src/backend/postmaster/syslogger.c
index 341c99d5a2e..724b8c91f8d 100644
--- a/src/backend/postmaster/syslogger.c
+++ b/src/backend/postmaster/syslogger.c
@@ -46,17 +46,6 @@
#include "utils/timestamp.h"
/*
- * We really want line-buffered mode for logfile output, but Windows does
- * not have it, and interprets _IOLBF as _IOFBF (bozos). So use _IONBF
- * instead on Windows.
- */
-#ifdef WIN32
-#define LBF_MODE _IONBF
-#else
-#define LBF_MODE _IOLBF
-#endif
-
-/*
* We read() into a temp buffer twice as big as a chunk, so that any fragment
* left after processing can be moved down to the front and we'll still have
* room to read a full chunk.
@@ -704,7 +693,7 @@ syslogger_parseArgs(int argc, char *argv[])
if (fd != -1)
{
syslogFile = fdopen(fd, "a");
- setvbuf(syslogFile, NULL, LBF_MODE, 0);
+ setvbuf(syslogFile, NULL, PG_IOLBF, 0);
}
#else /* WIN32 */
fd = atoi(*argv++);
@@ -714,7 +703,7 @@ syslogger_parseArgs(int argc, char *argv[])
if (fd > 0)
{
syslogFile = fdopen(fd, "a");
- setvbuf(syslogFile, NULL, LBF_MODE, 0);
+ setvbuf(syslogFile, NULL, PG_IOLBF, 0);
}
}
#endif /* WIN32 */
@@ -1079,7 +1068,7 @@ logfile_open(const char *filename, const char *mode, bool allow_errors)
if (fh)
{
- setvbuf(fh, NULL, LBF_MODE, 0);
+ setvbuf(fh, NULL, PG_IOLBF, 0);
#ifdef WIN32
/* use CRLF line endings on Windows */