Changeset 1916d1f in mainline for uspace/lib/posix/fcntl.h


Ignore:
Timestamp:
2011-07-12T13:41:26Z (13 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
50fc490
Parents:
11809eab (diff), 6817eba (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge libposix changes.

File:
1 edited

Legend:

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

    r11809eab r1916d1f  
    3838#include "sys/types.h"
    3939#include "libc/fcntl.h"
     40#include "errno.h"
    4041
    4142/* Mask for file access modes. */
     
    7172#define FD_CLOEXEC         1 /* Close on exec. */
    7273
     74#undef open
     75#define open(path, ...) \
     76        ({ \
     77                int rc = open(path, ##__VA_ARGS__); \
     78                if (rc < 0) { \
     79                        errno = -rc; \
     80                        rc = -1; \
     81                } \
     82                rc; \
     83        })
     84
    7385extern int posix_fcntl(int fd, int cmd, ...);
    7486
Note: See TracChangeset for help on using the changeset viewer.