diff options
author | Andoni Morales Alastruey <ylatuya@gmail.com> | 2012-03-14 21:59:04 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-03-27 12:17:53 +0100 |
commit | 35bbc8b194076f77b08709c9028339ea92d43bad (patch) | |
tree | ff3ef0d7865758390c070e96fb61aadb72e9730b | |
parent | 19343fb6a8a4bd3a2008c07b4f13ee2b0bf700d7 (diff) | |
download | dbus-35bbc8b194076f77b08709c9028339ea92d43bad.tar.gz dbus-35bbc8b194076f77b08709c9028339ea92d43bad.tar.bz2 dbus-35bbc8b194076f77b08709c9028339ea92d43bad.zip |
Fix duplicate case value compiling with mingw-w64
In mingw-w64 both ESOMETHING and WSASOMETHING are defined,
leading to a duplicate case in the switch.
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=47321
-rw-r--r-- | dbus/dbus-sysdeps.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/dbus/dbus-sysdeps.c b/dbus/dbus-sysdeps.c index bab516de..89062764 100644 --- a/dbus/dbus-sysdeps.c +++ b/dbus/dbus-sysdeps.c @@ -911,16 +911,14 @@ _dbus_error_from_errno (int error_number) #ifdef EPROTONOSUPPORT case EPROTONOSUPPORT: return DBUS_ERROR_NOT_SUPPORTED; -#endif -#ifdef WSAEPROTONOSUPPORT +#elif defined(WSAEPROTONOSUPPORT) case WSAEPROTONOSUPPORT: return DBUS_ERROR_NOT_SUPPORTED; #endif #ifdef EAFNOSUPPORT case EAFNOSUPPORT: return DBUS_ERROR_NOT_SUPPORTED; -#endif -#ifdef WSAEAFNOSUPPORT +#elif defined(WSAEAFNOSUPPORT) case WSAEAFNOSUPPORT: return DBUS_ERROR_NOT_SUPPORTED; #endif @@ -951,32 +949,28 @@ _dbus_error_from_errno (int error_number) #ifdef ECONNREFUSED case ECONNREFUSED: return DBUS_ERROR_NO_SERVER; -#endif -#ifdef WSAECONNREFUSED +#elif defined(WSAECONNREFUSED) case WSAECONNREFUSED: return DBUS_ERROR_NO_SERVER; #endif #ifdef ETIMEDOUT case ETIMEDOUT: return DBUS_ERROR_TIMEOUT; -#endif -#ifdef WSAETIMEDOUT +#elif defined(WSAETIMEDOUT) case WSAETIMEDOUT: return DBUS_ERROR_TIMEOUT; #endif #ifdef ENETUNREACH case ENETUNREACH: return DBUS_ERROR_NO_NETWORK; -#endif -#ifdef WSAENETUNREACH +#elif defined(WSAENETUNREACH) case WSAENETUNREACH: return DBUS_ERROR_NO_NETWORK; #endif #ifdef EADDRINUSE case EADDRINUSE: return DBUS_ERROR_ADDRESS_IN_USE; -#endif -#ifdef WSAEADDRINUSE +#elif defined(WSAEADDRINUSE) case WSAEADDRINUSE: return DBUS_ERROR_ADDRESS_IN_USE; #endif |