Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #331 from luvit/fix_o_sync_windows
win32: remove O_SYNC from windows
  • Loading branch information
rphillips committed Aug 21, 2012
2 parents 45c1bea + 706e358 commit 0a80cb6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/luv_fs.c
Expand Up @@ -83,8 +83,10 @@ int luv_string_to_flags(lua_State* L, const char* string) {
if (strcmp(string, "w+") == 0) return O_CREAT | O_TRUNC | O_RDWR;
if (strcmp(string, "a") == 0) return O_APPEND | O_CREAT | O_WRONLY;
if (strcmp(string, "a+") == 0) return O_APPEND | O_CREAT | O_RDWR;
#ifndef _WIN32
if (strcmp(string, "rs") == 0) return O_RDONLY | O_SYNC;
if (strcmp(string, "rs+") == 0) return O_RDWR | O_SYNC;
#endif
return luaL_error(L, "Unknown file open flag'%s'", string);
}

Expand Down

0 comments on commit 0a80cb6

Please sign in to comment.