.
This commit is contained in:
parent
61c1060a98
commit
7e7c371b9e
3 changed files with 26 additions and 4 deletions
|
|
@ -280,14 +280,14 @@ arena_t scratch = arena_make(ARENA_STATIC, sizeof(tmpbuf), tmpbuf)
|
|||
|
||||
DWORD os__win_mode_to_access(filemode_e mode) {
|
||||
DWORD out = 0;
|
||||
if (mode & FILEMODE_READ) out |= GENERIC_READ;
|
||||
if (mode & FILEMODE_WRITE) out |= GENERIC_WRITE;
|
||||
if (mode & OS_FILE_READ) out |= GENERIC_READ;
|
||||
if (mode & OS_FILE_WRITE) out |= GENERIC_WRITE;
|
||||
return out;
|
||||
}
|
||||
|
||||
DWORD os__win_mode_to_creation(filemode_e mode) {
|
||||
if (mode == FILEMODE_READ) return OPEN_EXISTING;
|
||||
if (mode == FILEMODE_WRITE) return CREATE_ALWAYS;
|
||||
if (mode == OS_FILE_READ) return OPEN_EXISTING;
|
||||
if (mode == OS_FILE_WRITE) return CREATE_ALWAYS;
|
||||
return OPEN_ALWAYS;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue