Skip to content

Commit d9346f2

Browse files
committed
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.
1 parent 21a743e commit d9346f2

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

src/backend/postmaster/postmaster.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*
3838
*
3939
* IDENTIFICATION
40-
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.566 2008/10/28 12:10:43 mha Exp $
40+
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.567 2008/12/11 10:25:17 petere Exp $
4141
*
4242
* NOTES
4343
*
@@ -1181,7 +1181,7 @@ pmdaemonize(void)
11811181
ExitPostmaster(1);
11821182
}
11831183
#endif
1184-
i = open(NULL_DEV, O_RDWR, 0);
1184+
i = open(DEVNULL, O_RDWR, 0);
11851185
dup2(i, 0);
11861186
dup2(i, 1);
11871187
dup2(i, 2);

src/backend/postmaster/syslogger.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*
1919
*
2020
* IDENTIFICATION
21-
* $PostgreSQL: pgsql/src/backend/postmaster/syslogger.c,v 1.45 2008/02/17 02:09:27 tgl Exp $
21+
* $PostgreSQL: pgsql/src/backend/postmaster/syslogger.c,v 1.46 2008/12/11 10:25:17 petere Exp $
2222
*
2323
*-------------------------------------------------------------------------
2424
*/
@@ -184,7 +184,7 @@ SysLoggerMain(int argc, char *argv[])
184184
*/
185185
if (redirection_done)
186186
{
187-
int fd = open(NULL_DEV, O_WRONLY, 0);
187+
int fd = open(DEVNULL, O_WRONLY, 0);
188188

189189
/*
190190
* The closes might look redundant, but they are not: we want to be

src/include/c.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
1313
* Portions Copyright (c) 1994, Regents of the University of California
1414
*
15-
* $PostgreSQL: pgsql/src/include/c.h,v 1.232 2008/12/11 09:17:07 petere Exp $
15+
* $PostgreSQL: pgsql/src/include/c.h,v 1.233 2008/12/11 10:25:17 petere Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -769,9 +769,6 @@ typedef NameData *Name;
769769
#define PG_BINARY_W "w"
770770
#endif
771771

772-
/* These are for things that are one way on Unix and another on NT */
773-
#define NULL_DEV "/dev/null"
774-
775772
/*
776773
* Provide prototypes for routines not present in a particular machine's
777774
* standard C library.

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