Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd9346f2

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, sosettle on DEVNULL.
1 parent21a743e commitd9346f2

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/1110: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-
intfd=open(NULL_DEV,O_WRONLY,0);
187+
intfd=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/1109:17:07 petere Exp $
15+
* $PostgreSQL: pgsql/src/include/c.h,v 1.233 2008/12/1110:25:17 petere Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -769,9 +769,6 @@ typedef NameData *Name;
769769
#definePG_BINARY_W "w"
770770
#endif
771771

772-
/* These are for things that are one way on Unix and another on NT */
773-
#defineNULL_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)

[8]ページ先頭

©2009-2025 Movatter.jp