errno: add ETXTBSY

Add `ETXTBSY` which could be returned by file system reads on some
unixes and emulate it with -148 (`ERROR_PATH_BUSY`) on windows.
This commit is contained in:
Fedor Indutny 2014-02-24 15:18:32 +04:00
parent 7677f62c52
commit aaaefe32ca
2 changed files with 7 additions and 0 deletions

View File

@ -364,6 +364,12 @@
# define UV__ETIMEDOUT (-4039)
#endif
#if defined(ETXTBSY) && !defined(_WIN32)
# define UV__ETXTBSY (-ETXTBSY)
#else
# define UV__ETXTBSY (-4038)
#endif
#if defined(EXDEV) && !defined(_WIN32)
# define UV__EXDEV (-EXDEV)
#else

View File

@ -132,6 +132,7 @@ extern "C" {
XX(ESPIPE, "invalid seek") \
XX(ESRCH, "no such process") \
XX(ETIMEDOUT, "connection timed out") \
XX(ETXTBSY, "text file is busy") \
XX(EXDEV, "cross-device link not permitted") \
XX(UNKNOWN, "unknown error") \
XX(EOF, "end of file") \