pidgin/pidgin

Remove unused Windows compatibility functions.

2019-10-30, Elliott Sales de Andrade
330279f77e0d
Parents 8e6d91e4dd8f
Children b8cba5cc6498
Remove unused Windows compatibility functions.
--- a/libpurple/win32/libc_interface.c Wed Oct 30 23:25:39 2019 -0400
+++ b/libpurple/win32/libc_interface.c Wed Oct 30 23:28:43 2019 -0400
@@ -488,18 +488,3 @@
return res;
}
-
-/* time.h */
-
-struct tm * wpurple_localtime_r (const time_t *time, struct tm *resultp) {
- struct tm* tmptm;
-
- if(!time)
- return NULL;
- tmptm = localtime(time);
- if(resultp && tmptm)
- return memcpy(resultp, tmptm, sizeof(struct tm));
- else
- return NULL;
-}
-
--- a/libpurple/win32/libc_interface.h Wed Oct 30 23:25:39 2019 -0400
+++ b/libpurple/win32/libc_interface.h Wed Oct 30 23:28:43 2019 -0400
@@ -103,8 +103,6 @@
(unsigned int)ntohl( netlong )
/* string.h */
-#define hstrerror( herror ) \
-wpurple_strerror( errno )
#define strerror( errornum ) \
wpurple_strerror( errornum )
#define g_strerror( errornum ) \
@@ -120,15 +118,9 @@
#define close( fd ) \
wpurple_close( fd )
-#ifndef sleep
-#define sleep(x) Sleep((x)*1000)
-#endif
-
#define gethostname( name, size ) \
wpurple_gethostname( name, size )
-#define fsync(fd) _commit(fd)
-
/* sys/time.h */
#define gettimeofday( timeval, timezone ) \
wpurple_gettimeofday( timeval, timezone )
@@ -140,12 +132,6 @@
# define vsnprintf _vsnprintf
#endif
-/* time.h */
-/* XXX: it may be also defined by pthread.h */
-#undef localtime_r
-#define localtime_r( time, resultp ) \
-wpurple_localtime_r( time, resultp )
-
G_END_DECLS
#endif /* PURPLE_WIN32_LIBC_INTERFACE_H */
--- a/libpurple/win32/libc_internal.h Wed Oct 30 23:25:39 2019 -0400
+++ b/libpurple/win32/libc_internal.h Wed Oct 30 23:28:43 2019 -0400
@@ -101,10 +101,6 @@
#endif
int wpurple_gettimeofday(struct timeval *p, struct timezone *z);
-/* time.h */
-struct tm *wpurple_localtime_r(const time_t *time, struct tm *resultp);
-
-
/* unistd.h */
int wpurple_read(int fd, void *buf, unsigned int size);
int wpurple_write(int fd, const void *buf, unsigned int size);