Changeset 6afc9d7 in mainline for uspace/lib/posix/source/internal/common.h
- Timestamp:
- 2015-10-06T19:01:36Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0328987
- Parents:
- f1f7584
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/source/internal/common.h
rf1f7584 r6afc9d7 48 48 } while (0) 49 49 50 /* A little helper macro to avoid typing this over and over.*/50 /* Convert negative error return value to positive errno */ 51 51 #define errnify(func, ...) ({ \ 52 52 int rc = func(__VA_ARGS__); \ … … 58 58 }) 59 59 60 /* Convert negative errno to positive errno */ 61 #define negerrno(func, ...) ({ \ 62 int rc = func(__VA_ARGS__); \ 63 if (rc < 0) { \ 64 errno = -errno; \ 65 } \ 66 rc; \ 67 }) 68 60 69 #endif /* LIBPOSIX_COMMON_H_ */ 61 70
Note:
See TracChangeset
for help on using the changeset viewer.