diff options
author | Gary Kramlich <grim@reaperworld.com> | 2020-10-14 00:40:50 -0500 |
---|---|---|
committer | Gary Kramlich <grim@reaperworld.com> | 2020-10-14 00:40:50 -0500 |
commit | 2f5ce90b5bf43d4fe1103b4d6b52181a6ce97ef2 (patch) | |
tree | ef0ecaf4ccd5a96412d9a2d569eb0b9112223e6f /libpurple/win32 | |
parent | 7dc454d75c989f117a4e64df5a38c4178dd1f4c5 (diff) | |
download | pidgin-2f5ce90b5bf43d4fe1103b4d6b52181a6ce97ef2.tar.gz |
remove wpurple_strerror
Remove the strerror and g_strerror replacements
Testing Done:
Compiled on linux and windows, verified no new errors on windows.
Reviewed at https://reviews.imfreedom.org/r/165/
Diffstat (limited to 'libpurple/win32')
-rw-r--r-- | libpurple/win32/libc_interface.c | 31 | ||||
-rw-r--r-- | libpurple/win32/libc_interface.h | 6 | ||||
-rw-r--r-- | libpurple/win32/libc_internal.h | 3 |
3 files changed, 0 insertions, 40 deletions
diff --git a/libpurple/win32/libc_interface.c b/libpurple/win32/libc_interface.c index 49b7e677d4..82af8529dc 100644 --- a/libpurple/win32/libc_interface.c +++ b/libpurple/win32/libc_interface.c @@ -42,8 +42,6 @@ # define S_ISDIR(m) (((m)&S_IFDIR)==S_IFDIR) #endif -static char errbuf[1024]; - /* helpers */ static int wpurple_is_socket( int fd ) { int optval; @@ -341,35 +339,6 @@ struct hostent* wpurple_gethostbyname(const char *name) { return hp; } -/* string.h */ -char* wpurple_strerror(int errornum) { - if (errornum > WSABASEERR) { - switch(errornum) { - case WSAECONNABORTED: /* 10053 */ - g_snprintf(errbuf, sizeof(errbuf), "%s", _("Connection interrupted by other software on your computer.")); - break; - case WSAECONNRESET: /* 10054 */ - g_snprintf(errbuf, sizeof(errbuf), "%s", _("Remote host closed connection.")); - break; - case WSAETIMEDOUT: /* 10060 */ - g_snprintf(errbuf, sizeof(errbuf), "%s", _("Connection timed out.")); - break; - case WSAECONNREFUSED: /* 10061 */ - g_snprintf(errbuf, sizeof(errbuf), "%s", _("Connection refused.")); - break; - case WSAEADDRINUSE: /* 10048 */ - g_snprintf(errbuf, sizeof(errbuf), "%s", _("Address already in use.")); - break; - default: - g_snprintf(errbuf, sizeof(errbuf), "Windows socket error #%d", errornum); - } - } else { - const char *tmp = g_strerror(errornum); - g_snprintf(errbuf, sizeof(errbuf), "%s", tmp); - } - return errbuf; -} - /* unistd.h */ /* diff --git a/libpurple/win32/libc_interface.h b/libpurple/win32/libc_interface.h index c4f632a031..5560eca818 100644 --- a/libpurple/win32/libc_interface.h +++ b/libpurple/win32/libc_interface.h @@ -102,12 +102,6 @@ wpurple_gethostbyname( name ) #define ntohl( netlong ) \ (unsigned int)ntohl( netlong ) -/* string.h */ -#define strerror( errornum ) \ -wpurple_strerror( errornum ) -#define g_strerror( errornum ) \ -wpurple_strerror( errornum ) - /* unistd.h */ #define read( fd, buf, buflen ) \ wpurple_read( fd, buf, buflen ) diff --git a/libpurple/win32/libc_internal.h b/libpurple/win32/libc_internal.h index 2d06b9694d..49bdd0943a 100644 --- a/libpurple/win32/libc_internal.h +++ b/libpurple/win32/libc_internal.h @@ -47,9 +47,6 @@ int wpurple_inet_pton(int af, const char *src, void *dst); /* netdb.h */ struct hostent* wpurple_gethostbyname(const char *name); -/* string.h */ -char* wpurple_strerror( int errornum ); - /* fcntl.h */ int wpurple_fcntl(int socket, int command, ...); #define F_GETFL 3 |