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

Commita1f45f6

Browse files
committed
Remove obsolete coding for early macOS.
Commits04cad8f and0c08856 supported old macOS systems that didn'tdefine O_CLOEXEC or O_DSYNC yet, but those arrived in macOS releases10.7 and 10.6 (respectively), which themselves reached EOL around adecade ago. We've already made use of other POSIX features that earlymacOS vintages can't compile (for example commits623cc67,d2e1508).A later commit will use O_CLOEXEC on POSIX systems so it would bestrange to pretend here that it's optional, and we might as well giveO_DSYNC the same treatment since the reference is also guarded by a testfor a macOS-specific macro, and we know that current Macs have it.Discussion:https://postgr.es/m/CA%2BhUKGKb6FsAdQWcRL35KJsftv%2B9zXqQbzwkfRf1i0J2e57%2BhQ%40mail.gmail.com
1 parent8427ce4 commita1f45f6

File tree

1 file changed

+2
-9
lines changed
  • src/backend/storage/file

1 file changed

+2
-9
lines changed

‎src/backend/storage/file/fd.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,23 +1025,16 @@ BasicOpenFilePerm(const char *fileName, int fileFlags, mode_t fileMode)
10251025
*/
10261026
StaticAssertStmt((PG_O_DIRECT&
10271027
(O_APPEND |
1028+
O_CLOEXEC |
10281029
O_CREAT |
1030+
O_DSYNC |
10291031
O_EXCL |
10301032
O_RDWR |
10311033
O_RDONLY |
10321034
O_SYNC |
10331035
O_TRUNC |
10341036
O_WRONLY))==0,
10351037
"PG_O_DIRECT value collides with standard flag");
1036-
#if defined(O_CLOEXEC)
1037-
StaticAssertStmt((PG_O_DIRECT&O_CLOEXEC)==0,
1038-
"PG_O_DIRECT value collides with O_CLOEXEC");
1039-
#endif
1040-
#if defined(O_DSYNC)
1041-
StaticAssertStmt((PG_O_DIRECT&O_DSYNC)==0,
1042-
"PG_O_DIRECT value collides with O_DSYNC");
1043-
#endif
1044-
10451038
fd=open(fileName,fileFlags& ~PG_O_DIRECT,fileMode);
10461039
#else
10471040
fd=open(fileName,fileFlags,fileMode);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp