Properly support w/+ in stdio?
This commit is contained in:
parent
188b4b4a04
commit
4873b141ec
@ -157,13 +157,13 @@ static void parse_mode(const char * mode, int * flags_, int * mask_) {
|
|||||||
if (*x == 'w') {
|
if (*x == 'w') {
|
||||||
flags |= O_WRONLY;
|
flags |= O_WRONLY;
|
||||||
flags |= O_CREAT;
|
flags |= O_CREAT;
|
||||||
|
flags |= O_TRUNC;
|
||||||
mask = 0666;
|
mask = 0666;
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
if (*x == '+') {
|
if (*x == '+') {
|
||||||
/* Also set up for read? */
|
flags |= O_RDWR;
|
||||||
|
flags ^= (O_APPEND); /* uh... */
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
++x;
|
++x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user