|
7 | 7 | * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
8 | 8 | * Portions Copyright (c) 1994, Regents of the University of California
|
9 | 9 | *
|
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 $ |
11 | 11 | *
|
12 | 12 | *-------------------------------------------------------------------------
|
13 | 13 | */
|
|
69 | 69 | * default method.We assume that fsync() is always available, and that
|
70 | 70 | * configure determined whether fdatasync() is.
|
71 | 71 | */
|
72 |
| -#if defined(O_SYNC) |
| 72 | +#ifdefO_SYNC |
73 | 73 | #defineCMP_OPEN_SYNC_FLAGO_SYNC
|
74 |
| -#else |
75 |
| -#if defined(O_FSYNC) |
| 74 | +#elif defined(O_FSYNC) |
76 | 75 | #defineCMP_OPEN_SYNC_FLAGO_FSYNC
|
77 | 76 | #endif
|
78 |
| -#endif |
| 77 | +#ifdefCMP_OPEN_SYNC_FLAG |
79 | 78 | #defineOPEN_SYNC_FLAG(CMP_OPEN_SYNC_FLAG | PG_O_DIRECT)
|
| 79 | +#endif |
80 | 80 |
|
81 |
| -#if defined(O_DSYNC) |
82 |
| -#if defined(OPEN_SYNC_FLAG) |
| 81 | +#ifdefO_DSYNC |
| 82 | +#ifdefOPEN_SYNC_FLAG |
| 83 | +/* O_DSYNC is distinct? */ |
83 | 84 | #ifO_DSYNC!=CMP_OPEN_SYNC_FLAG
|
84 | 85 | #defineOPEN_DATASYNC_FLAG(O_DSYNC | PG_O_DIRECT)
|
85 | 86 | #endif
|
|
114 | 115 | #defineXLOG_BUFFER_POINTERALIGN(PTR)\
|
115 | 116 | POINTERALIGN((ALIGNOF_XLOG_BUFFER), (PTR))
|
116 | 117 |
|
117 |
| -#if defined(OPEN_DATASYNC_FLAG) |
| 118 | +#ifdefOPEN_DATASYNC_FLAG |
118 | 119 | #defineDEFAULT_SYNC_METHOD_STR"open_datasync"
|
119 | 120 | #defineDEFAULT_SYNC_METHODSYNC_METHOD_OPEN
|
120 | 121 | #defineDEFAULT_SYNC_FLAGBITOPEN_DATASYNC_FLAG
|
|