Changeset 00c2de63 in mainline for uspace/lib/posix/internal/common.h


Ignore:
Timestamp:
2011-07-29T14:50:22Z (13 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b6759f4
Parents:
6c69d19 (diff), 7ae249d (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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/internal/common.h

    r6c69d19 r00c2de63  
    4343    __func__, __FILE__, __LINE__), abort())
    4444
     45/* A little helper macro to avoid typing this over and over. */
     46#define errnify(func, ...) ({ \
     47        int rc = func(__VA_ARGS__); \
     48        if (rc < 0) { \
     49                errno = -rc; \
     50                rc = -1; \
     51        } \
     52        rc; \
     53})
     54
    4555#endif /* LIBPOSIX_COMMON_H_ */
    4656
Note: See TracChangeset for help on using the changeset viewer.