Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4973 | right-hear | 1 | #include |
2 | #include |
||
3 | #include |
||
4 | #include |
||
5 | #include |
||
6 | #include |
||
7 | #include |
||
8 | #include |
||
9 | |||
10 | #include |
||
11 | |||
12 | int open(const char* filename, int oflag, ...) |
||
13 | { |
||
14 | /* int fd, dmode, bintext; |
||
15 | bintext = oflag & (O_TEXT | O_BINARY); |
||
16 | if (!bintext) bintext = _fmode & (O_TEXT | O_BINARY); |
||
17 | if (!bintext) bintext = O_BINARY; |
||
18 | oflag &= ~(O_TEXT | O_BINARY); |
||
19 | dmode = (*((&oflag)+1) & S_IWUSR) ? 1 : 0; |
||
20 | fd = _open(filename, oflag & 0xff); |
||
21 | if (fd == -1 && oflag & O_CREAT) |
||
22 | fd = _creat(filename, dmode); |
||
23 | if (fd == -1) return fd; |
||
24 | if (oflag & O_TRUNC) |
||
25 | if (_write(fd, 0, 0) < 0) |
||
26 | return -1; |
||
27 | if(oflag & O_APPEND) |
||
28 | lseek(fd, 0, SEEK_END); |
||
29 | return fd;*/ |
||
30 | return dosemu_open(filename, oflag); |
||
31 | }> |