From fb5140ee5f9420d0eea5a2056d0ac51f81a62e55 Mon Sep 17 00:00:00 2001 From: petere Date: Thu, 11 Dec 2008 10:25:17 +0000 Subject: [PATCH] The macros NULL_DEV and DEVNULL were both used to work around platform-specific spellings of /dev/null. But one should be enough, so settle on DEVNULL. --- src/backend/postmaster/postmaster.c | 2 +- src/backend/postmaster/syslogger.c | 2 +- src/include/c.h | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 6dcc964712..cef453bafd 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -1181,7 +1181,7 @@ pmdaemonize(void) ExitPostmaster(1); } #endif - i = open(NULL_DEV, O_RDWR, 0); + i = open(DEVNULL, O_RDWR, 0); dup2(i, 0); dup2(i, 1); dup2(i, 2); diff --git a/src/backend/postmaster/syslogger.c b/src/backend/postmaster/syslogger.c index 4f79d01a31..9c7d8dbc8d 100644 --- a/src/backend/postmaster/syslogger.c +++ b/src/backend/postmaster/syslogger.c @@ -184,7 +184,7 @@ SysLoggerMain(int argc, char *argv[]) */ if (redirection_done) { - int fd = open(NULL_DEV, O_WRONLY, 0); + int fd = open(DEVNULL, O_WRONLY, 0); /* * The closes might look redundant, but they are not: we want to be diff --git a/src/include/c.h b/src/include/c.h index 4d55fddf72..9ec4c65bfc 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -769,9 +769,6 @@ typedef NameData *Name; #define PG_BINARY_W "w" #endif -/* These are for things that are one way on Unix and another on NT */ -#define NULL_DEV "/dev/null" - /* * Provide prototypes for routines not present in a particular machine's * standard C library. -- 2.11.4.GIT