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

Commit5b0bfec

Browse files
committed
Fix compile for no O_SYNC, but introduced with O_DIRECT.
1 parent9052499 commit5b0bfec

File tree

1 file changed

+9
-8
lines changed
  • src/backend/access/transam

1 file changed

+9
-8
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.213 2005/07/29 19:29:59 tgl Exp $
10+
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.214 2005/07/30 14:15:44 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -69,17 +69,18 @@
6969
* default method.We assume that fsync() is always available, and that
7070
* configure determined whether fdatasync() is.
7171
*/
72-
#if defined(O_SYNC)
72+
#ifdefO_SYNC
7373
#defineCMP_OPEN_SYNC_FLAGO_SYNC
74-
#else
75-
#if defined(O_FSYNC)
74+
#elif defined(O_FSYNC)
7675
#defineCMP_OPEN_SYNC_FLAGO_FSYNC
7776
#endif
78-
#endif
77+
#ifdefCMP_OPEN_SYNC_FLAG
7978
#defineOPEN_SYNC_FLAG(CMP_OPEN_SYNC_FLAG | PG_O_DIRECT)
79+
#endif
8080

81-
#if defined(O_DSYNC)
82-
#if defined(OPEN_SYNC_FLAG)
81+
#ifdefO_DSYNC
82+
#ifdefOPEN_SYNC_FLAG
83+
/* O_DSYNC is distinct? */
8384
#ifO_DSYNC!=CMP_OPEN_SYNC_FLAG
8485
#defineOPEN_DATASYNC_FLAG(O_DSYNC | PG_O_DIRECT)
8586
#endif
@@ -114,7 +115,7 @@
114115
#defineXLOG_BUFFER_POINTERALIGN(PTR)\
115116
POINTERALIGN((ALIGNOF_XLOG_BUFFER), (PTR))
116117

117-
#if defined(OPEN_DATASYNC_FLAG)
118+
#ifdefOPEN_DATASYNC_FLAG
118119
#defineDEFAULT_SYNC_METHOD_STR"open_datasync"
119120
#defineDEFAULT_SYNC_METHODSYNC_METHOD_OPEN
120121
#defineDEFAULT_SYNC_FLAGBITOPEN_DATASYNC_FLAG

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp