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

Commit3573687

Browse files
committed
Use _dosmaperr() to deal with errors opening files in pgwin32_open().
Per complaint from Alvaro and subsequent discussion.
1 parentc2d3055 commit3573687

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

‎src/port/open.c

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
88
*
9-
* $PostgreSQL: pgsql/src/port/open.c,v 1.21 2007/11/15 21:14:46 momjian Exp $
9+
* $PostgreSQL: pgsql/src/port/open.c,v 1.22 2007/11/30 11:16:43 mha Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -88,22 +88,7 @@ pgwin32_open(const char *fileName, int fileFlags,...)
8888
((fileFlags&O_DSYNC) ?FILE_FLAG_WRITE_THROUGH :0),
8989
NULL))==INVALID_HANDLE_VALUE)
9090
{
91-
switch (GetLastError())
92-
{
93-
/* EMFILE, ENFILE should not occur from CreateFile. */
94-
caseERROR_PATH_NOT_FOUND:
95-
caseERROR_FILE_NOT_FOUND:
96-
errno=ENOENT;
97-
break;
98-
caseERROR_FILE_EXISTS:
99-
errno=EEXIST;
100-
break;
101-
caseERROR_ACCESS_DENIED:
102-
errno=EACCES;
103-
break;
104-
default:
105-
errno=EINVAL;
106-
}
91+
_dosmaperr(GetLastError());
10792
return-1;
10893
}
10994

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp