Changeset 221afc9e in mainline for uspace/lib/posix/fcntl.h


Ignore:
Timestamp:
2011-07-12T02:43:56Z (13 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2346e78
Parents:
46ac986
Message:

Redefinitions of some libc functions (mainly return value corrections).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/fcntl.h

    r46ac986 r221afc9e  
    7171#define FD_CLOEXEC         1 /* Close on exec. */
    7272
     73#undef open
     74#define open(path, oflag, ...) \
     75        ({ \
     76                int rc = open(path, oflag, ##__VA_ARGS__); \
     77                if (rc < 0) { \
     78                        errno = -rc; \
     79                        rc = -1; \
     80                } \
     81                rc; \
     82        })
     83
    7384extern int posix_fcntl(int fd, int cmd, ...);
    7485
Note: See TracChangeset for help on using the changeset viewer.