Lines 1037-1043
Link Here
|
1037 |
/*****************************************************************************/ |
1037 |
/*****************************************************************************/ |
1038 |
oslSocketResult SAL_CALL osl_getLocalHostname (rtl_uString **strLocalHostname) |
1038 |
oslSocketResult SAL_CALL osl_getLocalHostname (rtl_uString **strLocalHostname) |
1039 |
{ |
1039 |
{ |
|
|
1040 |
#ifdef __MINGW32__ |
1041 |
static wchar_t LocalHostname[256] = L""; |
1042 |
#else |
1040 |
static sal_Unicode LocalHostname[256] = L""; |
1043 |
static sal_Unicode LocalHostname[256] = L""; |
|
|
1044 |
#endif |
1041 |
|
1045 |
|
1042 |
if (wcslen(LocalHostname) == 0) |
1046 |
if (wcslen(LocalHostname) == 0) |
1043 |
{ |
1047 |
{ |
Lines 1059-1065
Link Here
|
1059 |
rtl_uString_release (hostName); |
1063 |
rtl_uString_release (hostName); |
1060 |
|
1064 |
|
1061 |
if (pAddr && pAddr->pHostName) |
1065 |
if (pAddr && pAddr->pHostName) |
|
|
1066 |
#ifdef __MINGW32__ |
1067 |
wcscpy(LocalHostname, reinterpret_cast< wchar_t * >(pAddr->pHostName->buffer)); |
1068 |
#else |
1062 |
wcscpy(LocalHostname, pAddr->pHostName->buffer); |
1069 |
wcscpy(LocalHostname, pAddr->pHostName->buffer); |
|
|
1070 |
#endif |
1063 |
else |
1071 |
else |
1064 |
memset(LocalHostname, 0, sizeof(LocalHostname)); |
1072 |
memset(LocalHostname, 0, sizeof(LocalHostname)); |
1065 |
|
1073 |
|
Lines 1070-1076
Link Here
|
1070 |
|
1078 |
|
1071 |
if (wcslen(LocalHostname) > 0) |
1079 |
if (wcslen(LocalHostname) > 0) |
1072 |
{ |
1080 |
{ |
|
|
1081 |
#ifdef __MINGW32__ |
1082 |
rtl_uString_newFromStr (strLocalHostname, reinterpret_cast< sal_Unicode * >(LocalHostname)); |
1083 |
#else |
1073 |
rtl_uString_newFromStr (strLocalHostname, LocalHostname); |
1084 |
rtl_uString_newFromStr (strLocalHostname, LocalHostname); |
|
|
1085 |
#endif |
1074 |
return osl_Socket_Ok; |
1086 |
return osl_Socket_Ok; |
1075 |
} |
1087 |
} |
1076 |
|
1088 |
|
Lines 1927-2137
Link Here
|
1927 |
switch(error = WSAGetLastError()) |
1939 |
switch(error = WSAGetLastError()) |
1928 |
{ |
1940 |
{ |
1929 |
case WSAENOTSOCK: |
1941 |
case WSAENOTSOCK: |
|
|
1942 |
#ifdef __MINGW32__ |
1943 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAENOTSOCK, Socket operation on non-socket. A socket created in one process is used by another process.")); |
1944 |
#else |
1930 |
rtl_uString_newFromStr (strError, L"WSAENOTSOCK, Socket operation on non-socket. A socket created in one process is used by another process."); |
1945 |
rtl_uString_newFromStr (strError, L"WSAENOTSOCK, Socket operation on non-socket. A socket created in one process is used by another process."); |
|
|
1946 |
#endif |
1931 |
break; |
1947 |
break; |
1932 |
|
1948 |
|
1933 |
case WSAEDESTADDRREQ: |
1949 |
case WSAEDESTADDRREQ: |
|
|
1950 |
#ifdef __MINGW32__ |
1951 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAEDESTADDRREQ, Destination Addr required")); |
1952 |
#else |
1934 |
rtl_uString_newFromStr (strError, L"WSAEDESTADDRREQ, Destination Addr required"); |
1953 |
rtl_uString_newFromStr (strError, L"WSAEDESTADDRREQ, Destination Addr required"); |
|
|
1954 |
#endif |
1935 |
break; |
1955 |
break; |
1936 |
|
1956 |
|
1937 |
case WSAEMSGSIZE: |
1957 |
case WSAEMSGSIZE: |
|
|
1958 |
#ifdef __MINGW32__ |
1959 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAEMSGSIZE, Message too long")); |
1960 |
#else |
1938 |
rtl_uString_newFromStr (strError, L"WSAEMSGSIZE, Message too long"); |
1961 |
rtl_uString_newFromStr (strError, L"WSAEMSGSIZE, Message too long"); |
|
|
1962 |
#endif |
1939 |
break; |
1963 |
break; |
1940 |
|
1964 |
|
1941 |
case WSAEPROTOTYPE: |
1965 |
case WSAEPROTOTYPE: |
|
|
1966 |
#ifdef __MINGW32__ |
1967 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAEPROTOTYPE, Protocol wrong type for socket")); |
1968 |
#else |
1942 |
rtl_uString_newFromStr (strError, L"WSAEPROTOTYPE, Protocol wrong type for socket"); |
1969 |
rtl_uString_newFromStr (strError, L"WSAEPROTOTYPE, Protocol wrong type for socket"); |
|
|
1970 |
#endif |
1943 |
break; |
1971 |
break; |
1944 |
|
1972 |
|
1945 |
case WSAENOPROTOOPT: |
1973 |
case WSAENOPROTOOPT: |
|
|
1974 |
#ifdef __MINGW32__ |
1975 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAENOPROTOOPT, Protocol not available")); |
1976 |
#else |
1946 |
rtl_uString_newFromStr (strError, L"WSAENOPROTOOPT, Protocol not available"); |
1977 |
rtl_uString_newFromStr (strError, L"WSAENOPROTOOPT, Protocol not available"); |
|
|
1978 |
#endif |
1947 |
break; |
1979 |
break; |
1948 |
|
1980 |
|
1949 |
case WSAEPROTONOSUPPORT: |
1981 |
case WSAEPROTONOSUPPORT: |
|
|
1982 |
#ifdef __MINGW32__ |
1983 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAEPROTONOSUPPORT, Protocol not supported")); |
1984 |
#else |
1950 |
rtl_uString_newFromStr (strError, L"WSAEPROTONOSUPPORT, Protocol not supported"); |
1985 |
rtl_uString_newFromStr (strError, L"WSAEPROTONOSUPPORT, Protocol not supported"); |
|
|
1986 |
#endif |
1951 |
break; |
1987 |
break; |
1952 |
|
1988 |
|
1953 |
case WSAESOCKTNOSUPPORT: |
1989 |
case WSAESOCKTNOSUPPORT: |
|
|
1990 |
#ifdef __MINGW32__ |
1991 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAESOCKTNOSUPPORT, Socket type not supported")); |
1992 |
#else |
1954 |
rtl_uString_newFromStr (strError, L"WSAESOCKTNOSUPPORT, Socket type not supported"); |
1993 |
rtl_uString_newFromStr (strError, L"WSAESOCKTNOSUPPORT, Socket type not supported"); |
|
|
1994 |
#endif |
1955 |
break; |
1995 |
break; |
1956 |
|
1996 |
|
1957 |
case WSAEOPNOTSUPP: |
1997 |
case WSAEOPNOTSUPP: |
|
|
1998 |
#ifdef __MINGW32__ |
1999 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAEOPNOTSUPP, Operation not supported on socket")); |
2000 |
#else |
1958 |
rtl_uString_newFromStr (strError, L"WSAEOPNOTSUPP, Operation not supported on socket"); |
2001 |
rtl_uString_newFromStr (strError, L"WSAEOPNOTSUPP, Operation not supported on socket"); |
|
|
2002 |
#endif |
1959 |
break; |
2003 |
break; |
1960 |
|
2004 |
|
1961 |
case WSAEPFNOSUPPORT: |
2005 |
case WSAEPFNOSUPPORT: |
|
|
2006 |
#ifdef __MINGW32__ |
2007 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAEPFNOSUPPORT, Protocol family not supported")); |
2008 |
#else |
1962 |
rtl_uString_newFromStr (strError, L"WSAEPFNOSUPPORT, Protocol family not supported"); |
2009 |
rtl_uString_newFromStr (strError, L"WSAEPFNOSUPPORT, Protocol family not supported"); |
|
|
2010 |
#endif |
1963 |
break; |
2011 |
break; |
1964 |
|
2012 |
|
1965 |
case WSAEAFNOSUPPORT: |
2013 |
case WSAEAFNOSUPPORT: |
|
|
2014 |
#ifdef __MINGW32__ |
2015 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSEAFNOSUPPORT, Addr family not supported by protocol family")); |
2016 |
#else |
1966 |
rtl_uString_newFromStr (strError, L"WSEAFNOSUPPORT, Addr family not supported by protocol family"); |
2017 |
rtl_uString_newFromStr (strError, L"WSEAFNOSUPPORT, Addr family not supported by protocol family"); |
|
|
2018 |
#endif |
1967 |
break; |
2019 |
break; |
1968 |
|
2020 |
|
1969 |
case WSAEADDRINUSE: |
2021 |
case WSAEADDRINUSE: |
|
|
2022 |
#ifdef __MINGW32__ |
2023 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAEADDRINUSE, Triggered by bind() because a process went down without closing a socket.")); |
2024 |
#else |
1970 |
rtl_uString_newFromStr (strError, L"WSAEADDRINUSE, Triggered by bind() because a process went down without closing a socket."); |
2025 |
rtl_uString_newFromStr (strError, L"WSAEADDRINUSE, Triggered by bind() because a process went down without closing a socket."); |
|
|
2026 |
#endif |
1971 |
break; |
2027 |
break; |
1972 |
|
2028 |
|
1973 |
case WSAEADDRNOTAVAIL: |
2029 |
case WSAEADDRNOTAVAIL: |
|
|
2030 |
#ifdef __MINGW32__ |
2031 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAEADDRNOTAVAIL, Can't assign requested Addr")); |
2032 |
#else |
1974 |
rtl_uString_newFromStr (strError, L"WSAEADDRNOTAVAIL, Can't assign requested Addr"); |
2033 |
rtl_uString_newFromStr (strError, L"WSAEADDRNOTAVAIL, Can't assign requested Addr"); |
|
|
2034 |
#endif |
1975 |
break; |
2035 |
break; |
1976 |
|
2036 |
|
1977 |
case WSAENETDOWN: |
2037 |
case WSAENETDOWN: |
|
|
2038 |
#ifdef __MINGW32__ |
2039 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAENETDOWN, Network is down")); |
2040 |
#else |
1978 |
rtl_uString_newFromStr (strError, L"WSAENETDOWN, Network is down"); |
2041 |
rtl_uString_newFromStr (strError, L"WSAENETDOWN, Network is down"); |
|
|
2042 |
#endif |
1979 |
break; |
2043 |
break; |
1980 |
|
2044 |
|
1981 |
case WSAENETUNREACH: |
2045 |
case WSAENETUNREACH: |
|
|
2046 |
#ifdef __MINGW32__ |
2047 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAENETUNREACH, Network is unreachable")); |
2048 |
#else |
1982 |
rtl_uString_newFromStr (strError, L"WSAENETUNREACH, Network is unreachable"); |
2049 |
rtl_uString_newFromStr (strError, L"WSAENETUNREACH, Network is unreachable"); |
|
|
2050 |
#endif |
1983 |
break; |
2051 |
break; |
1984 |
|
2052 |
|
1985 |
case WSAENETRESET: |
2053 |
case WSAENETRESET: |
|
|
2054 |
#ifdef __MINGW32__ |
2055 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAENETRESET, Network dropped connection or reset")); |
2056 |
#else |
1986 |
rtl_uString_newFromStr (strError, L"WSAENETRESET, Network dropped connection or reset"); |
2057 |
rtl_uString_newFromStr (strError, L"WSAENETRESET, Network dropped connection or reset"); |
|
|
2058 |
#endif |
1987 |
break; |
2059 |
break; |
1988 |
|
2060 |
|
1989 |
case WSAECONNABORTED: |
2061 |
case WSAECONNABORTED: |
|
|
2062 |
#ifdef __MINGW32__ |
2063 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAECONNABORTED, Software caused connection abort")); |
2064 |
#else |
1990 |
rtl_uString_newFromStr (strError, L"WSAECONNABORTED, Software caused connection abort"); |
2065 |
rtl_uString_newFromStr (strError, L"WSAECONNABORTED, Software caused connection abort"); |
|
|
2066 |
#endif |
1991 |
break; |
2067 |
break; |
1992 |
|
2068 |
|
1993 |
case WSAECONNRESET: |
2069 |
case WSAECONNRESET: |
|
|
2070 |
#ifdef __MINGW32__ |
2071 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAECONNRESET, Connection reset by peer")); |
2072 |
#else |
1994 |
rtl_uString_newFromStr (strError, L"WSAECONNRESET, Connection reset by peer"); |
2073 |
rtl_uString_newFromStr (strError, L"WSAECONNRESET, Connection reset by peer"); |
|
|
2074 |
#endif |
1995 |
break; |
2075 |
break; |
1996 |
|
2076 |
|
1997 |
case WSAENOBUFS: |
2077 |
case WSAENOBUFS: |
|
|
2078 |
#ifdef __MINGW32__ |
2079 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAENOBUFS, No buffer space available.")); |
2080 |
#else |
1998 |
rtl_uString_newFromStr (strError, L"WSAENOBUFS, No buffer space available."); |
2081 |
rtl_uString_newFromStr (strError, L"WSAENOBUFS, No buffer space available."); |
|
|
2082 |
#endif |
1999 |
break; |
2083 |
break; |
2000 |
|
2084 |
|
2001 |
case WSAEISCONN: |
2085 |
case WSAEISCONN: |
|
|
2086 |
#ifdef __MINGW32__ |
2087 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAEISCONN, Socket is already connected")); |
2088 |
#else |
2002 |
rtl_uString_newFromStr (strError, L"WSAEISCONN, Socket is already connected"); |
2089 |
rtl_uString_newFromStr (strError, L"WSAEISCONN, Socket is already connected"); |
|
|
2090 |
#endif |
2003 |
break; |
2091 |
break; |
2004 |
|
2092 |
|
2005 |
case WSAENOTCONN: |
2093 |
case WSAENOTCONN: |
|
|
2094 |
#ifdef __MINGW32__ |
2095 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAENOTCONN, Socket is not connected")); |
2096 |
#else |
2006 |
rtl_uString_newFromStr (strError, L"WSAENOTCONN, Socket is not connected"); |
2097 |
rtl_uString_newFromStr (strError, L"WSAENOTCONN, Socket is not connected"); |
|
|
2098 |
#endif |
2007 |
break; |
2099 |
break; |
2008 |
|
2100 |
|
2009 |
case WSAESHUTDOWN: |
2101 |
case WSAESHUTDOWN: |
|
|
2102 |
#ifdef __MINGW32__ |
2103 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAESHUTDOWN, Can't send after socket shutdown")); |
2104 |
#else |
2010 |
rtl_uString_newFromStr (strError, L"WSAESHUTDOWN, Can't send after socket shutdown"); |
2105 |
rtl_uString_newFromStr (strError, L"WSAESHUTDOWN, Can't send after socket shutdown"); |
|
|
2106 |
#endif |
2011 |
break; |
2107 |
break; |
2012 |
|
2108 |
|
2013 |
case WSAETIMEDOUT: |
2109 |
case WSAETIMEDOUT: |
|
|
2110 |
#ifdef __MINGW32__ |
2111 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAETIMEDOUT, Connection timed out")); |
2112 |
#else |
2014 |
rtl_uString_newFromStr (strError, L"WSAETIMEDOUT, Connection timed out"); |
2113 |
rtl_uString_newFromStr (strError, L"WSAETIMEDOUT, Connection timed out"); |
|
|
2114 |
#endif |
2015 |
break; |
2115 |
break; |
2016 |
|
2116 |
|
2017 |
case WSAECONNREFUSED: |
2117 |
case WSAECONNREFUSED: |
|
|
2118 |
#ifdef __MINGW32__ |
2119 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAECONNREFUSED, Connection refused")); |
2120 |
#else |
2018 |
rtl_uString_newFromStr (strError, L"WSAECONNREFUSED, Connection refused"); |
2121 |
rtl_uString_newFromStr (strError, L"WSAECONNREFUSED, Connection refused"); |
|
|
2122 |
#endif |
2019 |
break; |
2123 |
break; |
2020 |
|
2124 |
|
2021 |
case WSAEHOSTDOWN: |
2125 |
case WSAEHOSTDOWN: |
|
|
2126 |
#ifdef __MINGW32__ |
2127 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAEHOSTDOWN, Networking subsystem not started")); |
2128 |
#else |
2022 |
rtl_uString_newFromStr (strError, L"WSAEHOSTDOWN, Networking subsystem not started"); |
2129 |
rtl_uString_newFromStr (strError, L"WSAEHOSTDOWN, Networking subsystem not started"); |
|
|
2130 |
#endif |
2023 |
break; |
2131 |
break; |
2024 |
|
2132 |
|
2025 |
case WSAEHOSTUNREACH: |
2133 |
case WSAEHOSTUNREACH: |
|
|
2134 |
#ifdef __MINGW32__ |
2135 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAEHOSTUNREACH, No route to host")); |
2136 |
#else |
2026 |
rtl_uString_newFromStr (strError, L"WSAEHOSTUNREACH, No route to host"); |
2137 |
rtl_uString_newFromStr (strError, L"WSAEHOSTUNREACH, No route to host"); |
|
|
2138 |
#endif |
2027 |
break; |
2139 |
break; |
2028 |
|
2140 |
|
2029 |
case WSAEWOULDBLOCK: |
2141 |
case WSAEWOULDBLOCK: |
|
|
2142 |
#ifdef __MINGW32__ |
2143 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAEWOULDBLOCK, Operation would block")); |
2144 |
#else |
2030 |
rtl_uString_newFromStr (strError, L"WSAEWOULDBLOCK, Operation would block"); |
2145 |
rtl_uString_newFromStr (strError, L"WSAEWOULDBLOCK, Operation would block"); |
|
|
2146 |
#endif |
2031 |
break; |
2147 |
break; |
2032 |
|
2148 |
|
2033 |
case WSAEINPROGRESS: |
2149 |
case WSAEINPROGRESS: |
|
|
2150 |
#ifdef __MINGW32__ |
2151 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAEINPROGRESS, Operation now in progress")); |
2152 |
#else |
2034 |
rtl_uString_newFromStr (strError, L"WSAEINPROGRESS, Operation now in progress"); |
2153 |
rtl_uString_newFromStr (strError, L"WSAEINPROGRESS, Operation now in progress"); |
|
|
2154 |
#endif |
2035 |
break; |
2155 |
break; |
2036 |
|
2156 |
|
2037 |
case WSAEALREADY: |
2157 |
case WSAEALREADY: |
|
|
2158 |
#ifdef __MINGW32__ |
2159 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAEALREADY, Operation already in progress")); |
2160 |
#else |
2038 |
rtl_uString_newFromStr (strError, L"WSAEALREADY, Operation already in progress"); |
2161 |
rtl_uString_newFromStr (strError, L"WSAEALREADY, Operation already in progress"); |
|
|
2162 |
#endif |
2039 |
break; |
2163 |
break; |
2040 |
|
2164 |
|
2041 |
case WSAEINTR: |
2165 |
case WSAEINTR: |
|
|
2166 |
#ifdef __MINGW32__ |
2167 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAEALREADY, Operation was interrupted")); |
2168 |
#else |
2042 |
rtl_uString_newFromStr (strError, L"WSAEALREADY, Operation was interrupted"); |
2169 |
rtl_uString_newFromStr (strError, L"WSAEALREADY, Operation was interrupted"); |
|
|
2170 |
#endif |
2043 |
break; |
2171 |
break; |
2044 |
|
2172 |
|
2045 |
case WSAEBADF: |
2173 |
case WSAEBADF: |
|
|
2174 |
#ifdef __MINGW32__ |
2175 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAEBADF, Bad file number")); |
2176 |
#else |
2046 |
rtl_uString_newFromStr (strError, L"WSAEBADF, Bad file number"); |
2177 |
rtl_uString_newFromStr (strError, L"WSAEBADF, Bad file number"); |
|
|
2178 |
#endif |
2047 |
break; |
2179 |
break; |
2048 |
|
2180 |
|
2049 |
case WSAEACCES: |
2181 |
case WSAEACCES: |
|
|
2182 |
#ifdef __MINGW32__ |
2183 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAEACCES, Access is denied")); |
2184 |
#else |
2050 |
rtl_uString_newFromStr (strError, L"WSAEACCES, Access is denied"); |
2185 |
rtl_uString_newFromStr (strError, L"WSAEACCES, Access is denied"); |
|
|
2186 |
#endif |
2051 |
break; |
2187 |
break; |
2052 |
|
2188 |
|
2053 |
case WSAEFAULT: |
2189 |
case WSAEFAULT: |
|
|
2190 |
#ifdef __MINGW32__ |
2191 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAEFAULT, Bad memory Addr")); |
2192 |
#else |
2054 |
rtl_uString_newFromStr (strError, L"WSAEFAULT, Bad memory Addr"); |
2193 |
rtl_uString_newFromStr (strError, L"WSAEFAULT, Bad memory Addr"); |
|
|
2194 |
#endif |
2055 |
break; |
2195 |
break; |
2056 |
|
2196 |
|
2057 |
case WSAEINVAL: |
2197 |
case WSAEINVAL: |
|
|
2198 |
#ifdef __MINGW32__ |
2199 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAEINVAL, The socket has not been bound with bind() or is already connected")); |
2200 |
#else |
2058 |
rtl_uString_newFromStr (strError, L"WSAEINVAL, The socket has not been bound with bind() or is already connected"); |
2201 |
rtl_uString_newFromStr (strError, L"WSAEINVAL, The socket has not been bound with bind() or is already connected"); |
|
|
2202 |
#endif |
2059 |
break; |
2203 |
break; |
2060 |
|
2204 |
|
2061 |
case WSAEMFILE: |
2205 |
case WSAEMFILE: |
|
|
2206 |
#ifdef __MINGW32__ |
2207 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAEMFILE, No more file descriptors are available")); |
2208 |
#else |
2062 |
rtl_uString_newFromStr (strError, L"WSAEMFILE, No more file descriptors are available"); |
2209 |
rtl_uString_newFromStr (strError, L"WSAEMFILE, No more file descriptors are available"); |
|
|
2210 |
#endif |
2063 |
break; |
2211 |
break; |
2064 |
|
2212 |
|
2065 |
case WSAETOOMANYREFS: |
2213 |
case WSAETOOMANYREFS: |
|
|
2214 |
#ifdef __MINGW32__ |
2215 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAETOOMANYREFS, Undocumented WinSock error")); |
2216 |
#else |
2066 |
rtl_uString_newFromStr (strError, L"WSAETOOMANYREFS, Undocumented WinSock error"); |
2217 |
rtl_uString_newFromStr (strError, L"WSAETOOMANYREFS, Undocumented WinSock error"); |
|
|
2218 |
#endif |
2067 |
break; |
2219 |
break; |
2068 |
|
2220 |
|
2069 |
case WSAENAMETOOLONG: |
2221 |
case WSAENAMETOOLONG: |
|
|
2222 |
#ifdef __MINGW32__ |
2223 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAENAMETOOLONG, Undocumented WinSock error")); |
2224 |
#else |
2070 |
rtl_uString_newFromStr (strError, L"WSAENAMETOOLONG, Undocumented WinSock error"); |
2225 |
rtl_uString_newFromStr (strError, L"WSAENAMETOOLONG, Undocumented WinSock error"); |
|
|
2226 |
#endif |
2071 |
break; |
2227 |
break; |
2072 |
|
2228 |
|
2073 |
case WSAENOTEMPTY: |
2229 |
case WSAENOTEMPTY: |
|
|
2230 |
#ifdef __MINGW32__ |
2231 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAENOTEMPTY, Undocumented WinSock error")); |
2232 |
#else |
2074 |
rtl_uString_newFromStr (strError, L"WSAENOTEMPTY, Undocumented WinSock error"); |
2233 |
rtl_uString_newFromStr (strError, L"WSAENOTEMPTY, Undocumented WinSock error"); |
|
|
2234 |
#endif |
2075 |
break; |
2235 |
break; |
2076 |
|
2236 |
|
2077 |
case WSAEPROCLIM: |
2237 |
case WSAEPROCLIM: |
|
|
2238 |
#ifdef __MINGW32__ |
2239 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAEPROCLIM, Undocumented WinSock error")); |
2240 |
#else |
2078 |
rtl_uString_newFromStr (strError, L"WSAEPROCLIM, Undocumented WinSock error"); |
2241 |
rtl_uString_newFromStr (strError, L"WSAEPROCLIM, Undocumented WinSock error"); |
|
|
2242 |
#endif |
2079 |
break; |
2243 |
break; |
2080 |
|
2244 |
|
2081 |
case WSAEUSERS: |
2245 |
case WSAEUSERS: |
|
|
2246 |
#ifdef __MINGW32__ |
2247 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAEUSERS, Undocumented WinSock error")); |
2248 |
#else |
2082 |
rtl_uString_newFromStr (strError, L"WSAEUSERS, Undocumented WinSock error"); |
2249 |
rtl_uString_newFromStr (strError, L"WSAEUSERS, Undocumented WinSock error"); |
|
|
2250 |
#endif |
2083 |
break; |
2251 |
break; |
2084 |
|
2252 |
|
2085 |
case WSAEDQUOT: |
2253 |
case WSAEDQUOT: |
|
|
2254 |
#ifdef __MINGW32__ |
2255 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAEDQUOT, Undocumented WinSock error")); |
2256 |
#else |
2086 |
rtl_uString_newFromStr (strError, L"WSAEDQUOT, Undocumented WinSock error"); |
2257 |
rtl_uString_newFromStr (strError, L"WSAEDQUOT, Undocumented WinSock error"); |
|
|
2258 |
#endif |
2087 |
break; |
2259 |
break; |
2088 |
|
2260 |
|
2089 |
case WSAESTALE: |
2261 |
case WSAESTALE: |
|
|
2262 |
#ifdef __MINGW32__ |
2263 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAESTALE, Undocumented WinSock error")); |
2264 |
#else |
2090 |
rtl_uString_newFromStr (strError, L"WSAESTALE, Undocumented WinSock error"); |
2265 |
rtl_uString_newFromStr (strError, L"WSAESTALE, Undocumented WinSock error"); |
|
|
2266 |
#endif |
2091 |
break; |
2267 |
break; |
2092 |
|
2268 |
|
2093 |
case WSAEREMOTE: |
2269 |
case WSAEREMOTE: |
|
|
2270 |
#ifdef __MINGW32__ |
2271 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAEREMOTE, Undocumented WinSock error")); |
2272 |
#else |
2094 |
rtl_uString_newFromStr (strError, L"WSAEREMOTE, Undocumented WinSock error"); |
2273 |
rtl_uString_newFromStr (strError, L"WSAEREMOTE, Undocumented WinSock error"); |
|
|
2274 |
#endif |
2095 |
break; |
2275 |
break; |
2096 |
|
2276 |
|
2097 |
case WSAEDISCON: |
2277 |
case WSAEDISCON: |
|
|
2278 |
#ifdef __MINGW32__ |
2279 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAEDISCON, Circuit was gracefully terminated")); |
2280 |
#else |
2098 |
rtl_uString_newFromStr (strError, L"WSAEDISCON, Circuit was gracefully terminated"); |
2281 |
rtl_uString_newFromStr (strError, L"WSAEDISCON, Circuit was gracefully terminated"); |
|
|
2282 |
#endif |
2099 |
break; |
2283 |
break; |
2100 |
|
2284 |
|
2101 |
case WSASYSNOTREADY: |
2285 |
case WSASYSNOTREADY: |
|
|
2286 |
#ifdef __MINGW32__ |
2287 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSASYSNOTREADY, The underlying network subsystem is not ready for network communication")); |
2288 |
#else |
2102 |
rtl_uString_newFromStr (strError, L"WSASYSNOTREADY, The underlying network subsystem is not ready for network communication"); |
2289 |
rtl_uString_newFromStr (strError, L"WSASYSNOTREADY, The underlying network subsystem is not ready for network communication"); |
|
|
2290 |
#endif |
2103 |
break; |
2291 |
break; |
2104 |
|
2292 |
|
2105 |
case WSAVERNOTSUPPORTED: |
2293 |
case WSAVERNOTSUPPORTED: |
|
|
2294 |
#ifdef __MINGW32__ |
2295 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAVERNOTSUPPORTED, The version of Windows Sockets API support requested is not provided by this particular Windows Sockets implementation")); |
2296 |
#else |
2106 |
rtl_uString_newFromStr (strError, L"WSAVERNOTSUPPORTED, The version of Windows Sockets API support requested is not provided by this particular Windows Sockets implementation"); |
2297 |
rtl_uString_newFromStr (strError, L"WSAVERNOTSUPPORTED, The version of Windows Sockets API support requested is not provided by this particular Windows Sockets implementation"); |
|
|
2298 |
#endif |
2107 |
break; |
2299 |
break; |
2108 |
|
2300 |
|
2109 |
case WSANOTINITIALISED: |
2301 |
case WSANOTINITIALISED: |
|
|
2302 |
#ifdef __MINGW32__ |
2303 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSANOTINITIALISED, WSAStartup() has not been called")); |
2304 |
#else |
2110 |
rtl_uString_newFromStr (strError, L"WSANOTINITIALISED, WSAStartup() has not been called"); |
2305 |
rtl_uString_newFromStr (strError, L"WSANOTINITIALISED, WSAStartup() has not been called"); |
|
|
2306 |
#endif |
2111 |
break; |
2307 |
break; |
2112 |
|
2308 |
|
2113 |
case WSAHOST_NOT_FOUND: |
2309 |
case WSAHOST_NOT_FOUND: |
|
|
2310 |
#ifdef __MINGW32__ |
2311 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSAHOST_NOT_FOUND, Authoritative answer host not found")); |
2312 |
#else |
2114 |
rtl_uString_newFromStr (strError, L"WSAHOST_NOT_FOUND, Authoritative answer host not found"); |
2313 |
rtl_uString_newFromStr (strError, L"WSAHOST_NOT_FOUND, Authoritative answer host not found"); |
|
|
2314 |
#endif |
2115 |
break; |
2315 |
break; |
2116 |
|
2316 |
|
2117 |
case WSATRY_AGAIN: |
2317 |
case WSATRY_AGAIN: |
|
|
2318 |
#ifdef __MINGW32__ |
2319 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSATRY_AGAIN, Non-authoritative answer host not found or SERVERFAIL")); |
2320 |
#else |
2118 |
rtl_uString_newFromStr (strError, L"WSATRY_AGAIN, Non-authoritative answer host not found or SERVERFAIL"); |
2321 |
rtl_uString_newFromStr (strError, L"WSATRY_AGAIN, Non-authoritative answer host not found or SERVERFAIL"); |
|
|
2322 |
#endif |
2119 |
break; |
2323 |
break; |
2120 |
|
2324 |
|
2121 |
case WSANO_RECOVERY: |
2325 |
case WSANO_RECOVERY: |
|
|
2326 |
#ifdef __MINGW32__ |
2327 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSANO_RECOVERY, Non recoverable errors, FORMERR, REFUSED, NOTIMP")); |
2328 |
#else |
2122 |
rtl_uString_newFromStr (strError, L"WSANO_RECOVERY, Non recoverable errors, FORMERR, REFUSED, NOTIMP"); |
2329 |
rtl_uString_newFromStr (strError, L"WSANO_RECOVERY, Non recoverable errors, FORMERR, REFUSED, NOTIMP"); |
|
|
2330 |
#endif |
2123 |
break; |
2331 |
break; |
2124 |
|
2332 |
|
2125 |
case WSANO_DATA: |
2333 |
case WSANO_DATA: |
|
|
2334 |
#ifdef __MINGW32__ |
2335 |
rtl_uString_newFromStr (strError, reinterpret_cast< const sal_Unicode * >(L"WSANO_DATA or WSANO_ADDRESS, Valid name, no data record of requested type")); |
2336 |
#else |
2126 |
rtl_uString_newFromStr (strError, L"WSANO_DATA or WSANO_ADDRESS, Valid name, no data record of requested type"); |
2337 |
rtl_uString_newFromStr (strError, L"WSANO_DATA or WSANO_ADDRESS, Valid name, no data record of requested type"); |
|
|
2338 |
#endif |
2127 |
break; |
2339 |
break; |
2128 |
|
2340 |
|
2129 |
default: |
2341 |
default: |
2130 |
{ |
2342 |
{ |
2131 |
sal_Unicode message[128]; |
2343 |
sal_Unicode message[128]; |
2132 |
|
2344 |
|
|
|
2345 |
#ifdef __MINGW32__ |
2346 |
wsprintfW((wchar_t *)message, L"Unknown WinSock Error Number %d", error); |
2347 |
rtl_uString_newFromStr (strError, message); |
2348 |
#else |
2133 |
wsprintfW((sal_Unicode *)message, (sal_Unicode *)L"Unknown WinSock Error Number %d", error); |
2349 |
wsprintfW((sal_Unicode *)message, (sal_Unicode *)L"Unknown WinSock Error Number %d", error); |
2134 |
rtl_uString_newFromStr (strError, message); |
2350 |
rtl_uString_newFromStr (strError, message); |
|
|
2351 |
#endif |
2135 |
} |
2352 |
} |
2136 |
|
2353 |
|
2137 |
return; |
2354 |
return; |