Remove now-unused getsockname win32 wrapper

Mon, 24 Oct 2022 01:27:22 -0500

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Mon, 24 Oct 2022 01:27:22 -0500
changeset 41829
13997c67710d
parent 41828
023b57b090f6
child 41830
5bc664b848a5

Remove now-unused getsockname win32 wrapper

I can resurrect this now that port mappings and UPnP are gone.

Testing Done:
Compiled only.

Reviewed at https://reviews.imfreedom.org/r/1517/

libpurple/win32/libc_interface.c file | annotate | diff | comparison | revisions
libpurple/win32/libc_interface.h file | annotate | diff | comparison | revisions
libpurple/win32/libc_internal.h file | annotate | diff | comparison | revisions
--- a/libpurple/win32/libc_interface.c	Sun Oct 23 22:31:02 2022 -0500
+++ b/libpurple/win32/libc_interface.c	Mon Oct 24 01:27:22 2022 -0500
@@ -42,15 +42,6 @@
 # define S_ISDIR(m) (((m)&S_IFDIR)==S_IFDIR)
 #endif
 
-/* socket.h */
-int wpurple_getsockname(int socket, struct sockaddr *addr, socklen_t *lenptr) {
-        if(getsockname(socket, addr, lenptr) == SOCKET_ERROR) {
-                errno = WSAGetLastError();
-                return -1;
-        }
-        return 0;
-}
-
 /* fcntl.h */
 /* This is not a full implementation of fcntl. Update as needed.. */
 int wpurple_fcntl(int socket, int command, ...) {
--- a/libpurple/win32/libc_interface.h	Sun Oct 23 22:31:02 2022 -0500
+++ b/libpurple/win32/libc_interface.h	Mon Oct 24 01:27:22 2022 -0500
@@ -45,10 +45,6 @@
 #define F_OK 0
 #endif
 
-/* sys/socket.h */
-#define getsockname( socket, addr, lenptr ) \
-wpurple_getsockname( socket, addr, lenptr )
-
 /* fcntl.h */
 #define fcntl( fd, command, ... ) \
 wpurple_fcntl( fd, command, ##__VA_ARGS__ )
--- a/libpurple/win32/libc_internal.h	Sun Oct 23 22:31:02 2022 -0500
+++ b/libpurple/win32/libc_internal.h	Mon Oct 24 01:27:22 2022 -0500
@@ -26,9 +26,6 @@
 
 G_BEGIN_DECLS
 
-/* sys/socket.h */
-int wpurple_getsockname (int socket, struct sockaddr *addr, socklen_t *lenptr);
-
 /* netdb.h */
 struct hostent* wpurple_gethostbyname(const char *name);
 

mercurial