Commit 5647cfc9 authored by deuce's avatar deuce
Browse files

Hurd defines O_RDWR as (O_RDONLY|O_WRONLY) *sigh*

parent f89cb9e2
......@@ -77,17 +77,17 @@ FILE* fnopen(int *fd, char *str, int access)
*fd=file;
if(access&O_APPEND) {
if(access&O_RDWR)
if(access&O_RDWR==O_RDWR)
strcpy(mode,"a+");
else
strcpy(mode,"a");
} else if(access&(O_TRUNC|O_WRONLY)) {
if(access&O_RDWR)
if(access&O_RDWR==O_RDWR)
strcpy(mode,"w+");
else
strcpy(mode,"w");
} else {
if(access&O_RDWR)
if(access&O_RDWR==O_RDWR)
strcpy(mode,"r+");
else
strcpy(mode,"r");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment