X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=lib%2Fposixheaders%2Ffilecntl.h;h=cf5054dedb8b589da1a8b447c7f314477f3a50dc;hb=ccc6cda312fea9f0468ee65b8f368e9653e1380b;hp=c0b20811322c57bbb994e93f99e2b3ab146b6edf;hpb=726f63884db0132f01745f1fb4465e6621088ccf;p=platform%2Fupstream%2Fbash.git diff --git a/lib/posixheaders/filecntl.h b/lib/posixheaders/filecntl.h index c0b2081..cf5054d 100644 --- a/lib/posixheaders/filecntl.h +++ b/lib/posixheaders/filecntl.h @@ -33,4 +33,13 @@ #define SET_CLOSE_ON_EXEC(fd) (fcntl ((fd), F_SETFD, FD_CLOEXEC)) #define SET_OPEN_ON_EXEC(fd) (fcntl ((fd), F_SETFD, FD_NCLOEXEC)) +/* How to open a file in non-blocking mode, the Posix.1 way. */ +#if !defined (O_NONBLOCK) +# if defined (O_NDELAY) +# define O_NONBLOCK O_NDELAY +# else +# define O_NONBLOCK 0 +# endif +#endif + #endif /* ! _FILECNTL_H_ */