diff options
author | Yang Tse <yangsita@gmail.com> | 2007-02-18 00:34:37 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2007-02-18 00:34:37 +0000 |
commit | ec9e399668ee04d8c184375f4948662e9e324144 (patch) | |
tree | 0a5a47f1f3ee406c610bef3c28525408a9ecdc6c | |
parent | 2691f1efc8e99ba811e7b2e0faf3230da4d925ef (diff) |
fix ENAMETOOLONG and ENOTEMPTY may already be defined in errno.h
-rw-r--r-- | ares/setup_once.h | 11 | ||||
-rw-r--r-- | lib/setup_once.h | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/ares/setup_once.h b/ares/setup_once.h index 6daf9d8b7..41b42e900 100644 --- a/ares/setup_once.h +++ b/ares/setup_once.h @@ -28,6 +28,13 @@ /* + * Inclusion of common header files. + */ + +#include <errno.h> + + +/* * If we have the MSG_NOSIGNAL define, make sure we use * it as the fourth argument of function send() */ @@ -219,10 +226,14 @@ typedef int sig_atomic_t; #define ETIMEDOUT WSAETIMEDOUT #define ECONNREFUSED WSAECONNREFUSED #define ELOOP WSAELOOP +#ifndef ENAMETOOLONG /* possible previous definition in errno.h */ #define ENAMETOOLONG WSAENAMETOOLONG +#endif #define EHOSTDOWN WSAEHOSTDOWN #define EHOSTUNREACH WSAEHOSTUNREACH +#ifndef ENOTEMPTY /* possible previous definition in errno.h */ #define ENOTEMPTY WSAENOTEMPTY +#endif #define EPROCLIM WSAEPROCLIM #define EUSERS WSAEUSERS #define EDQUOT WSAEDQUOT diff --git a/lib/setup_once.h b/lib/setup_once.h index 630cd05e3..2cf4ebea4 100644 --- a/lib/setup_once.h +++ b/lib/setup_once.h @@ -35,6 +35,13 @@ /* + * Inclusion of common header files. + */ + +#include <errno.h> + + +/* * If we have the MSG_NOSIGNAL define, make sure we use * it as the fourth argument of function send() */ @@ -226,10 +233,14 @@ typedef int sig_atomic_t; #define ETIMEDOUT WSAETIMEDOUT #define ECONNREFUSED WSAECONNREFUSED #define ELOOP WSAELOOP +#ifndef ENAMETOOLONG /* possible previous definition in errno.h */ #define ENAMETOOLONG WSAENAMETOOLONG +#endif #define EHOSTDOWN WSAEHOSTDOWN #define EHOSTUNREACH WSAEHOSTUNREACH +#ifndef ENOTEMPTY /* possible previous definition in errno.h */ #define ENOTEMPTY WSAENOTEMPTY +#endif #define EPROCLIM WSAEPROCLIM #define EUSERS WSAEUSERS #define EDQUOT WSAEDQUOT |