Properly support w/+ in stdio?

This commit is contained in:
K. Lange 2018-07-17 17:08:58 +09:00
parent 188b4b4a04
commit 4873b141ec

View File

@ -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;
} }