/* bits/errno-return.h: A convenient way of setting errno after a syscall. */ #ifndef _BITS_ERRNO_RETURN_H #define _BITS_ERRNO_RETURN_H #include #define __errno_return(value, type) \ do { \ if (value < 0) \ { \ errno = (int)(-value); \ return (type)-1; \ } \ return (type)value; \ } while (0) #endif