talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 16c0f2c8f05c46f47bd734b7c1792bc945143bcb
parent 9bcb48ee857a118c68801e8fb59daca008b6acd5
Author: Jonathan Boeing <jonathan@claws-mail.org>
Date:   Mon, 13 Sep 2021 23:33:51 -0700

Cleanup w32lib.h

Diffstat:
Msrc/common/log.c | 4----
Msrc/common/socket.c | 1-
Msrc/common/timing.h | 2+-
Msrc/common/utils.c | 1-
Msrc/common/w32lib.h | 104-------------------------------------------------------------------------------
Msrc/exporthtml.c | 4----
Msrc/folder.c | 3---
Msrc/mbox.c | 4----
Msrc/msgcache.c | 1-
Msrc/plugins/pgpcore/passphrase.c | 2+-
Msrc/prefs_summaries.c | 4----
Msrc/procheader.c | 4----
Msrc/procmime.c | 4++++
Msrc/recv.c | 4+---
14 files changed, 7 insertions(+), 135 deletions(-)

diff --git a/src/common/log.c b/src/common/log.c @@ -24,10 +24,6 @@ #include "defs.h" -#ifdef G_OS_WIN32 -# include <w32lib.h> -#endif - #include <glib.h> #include <glib/gi18n.h> diff --git a/src/common/socket.c b/src/common/socket.c @@ -37,7 +37,6 @@ # ifndef EINPROGRESS # define EINPROGRESS WSAEINPROGRESS # endif -# include "w32lib.h" #else # if HAVE_SYS_WAIT_H # include <sys/wait.h> diff --git a/src/common/timing.h b/src/common/timing.h @@ -53,7 +53,7 @@ #ifdef G_OS_WIN32 -#include <w32lib.h> +#include <windows.h> /* no {} by purpose */ #define START_TIMING(str) \ diff --git a/src/common/utils.c b/src/common/utils.c @@ -80,7 +80,6 @@ #ifdef G_OS_WIN32 # include <direct.h> # include <io.h> -# include <w32lib.h> #endif #include "utils.h" diff --git a/src/common/w32lib.h b/src/common/w32lib.h @@ -72,110 +72,6 @@ #define _W32LIB_H_ #include <windows.h> -#include <io.h> -#include <stdio.h> - -#ifdef __MINGW32__ -# include <_mingw.h> -# define MINGW32_VERSION (__MINGW32_MAJOR_VERSION * 100 \ - + __MINGW32_MINOR_VERSION) -# define MINGW64_VERSION (__MINGW64_VERSION_MAJOR * 100 \ - + __MINGW64_VERSION_MINOR) -# include <wchar.h> -# include <dirent.h> -# include <sys/time.h> -# if MINGW64_VERSION >= 200 -# include <sys/types.h> -# endif -#endif /* __MINGW32__ */ - -#include <glib/gstdio.h> - -/* Mingw32 3.4.4 defines interface to struct and thus breaks our own - use of that symbol. Undef it here. */ -#if defined(_BASETYPS_H) && defined(interface) -#undef interface -#endif - - -/* types */ -/*** ??? ***/ -#ifndef __MINGW32__ -typedef long int off_t; -typedef int pid_t; -typedef unsigned char u_char; -#endif /* __MINGW32__ */ -typedef unsigned int uid_t; - -#ifndef __MINGW32__ -/*** stat ***/ -#define S_IRUSR _S_IREAD -#define S_IWUSR _S_IWRITE -#define S_IXUSR _S_IEXEC -#define S_IRWXU (_S_IREAD|_S_IWRITE|_S_IEXEC) -#endif /* __MINGW32__ */ - - -/* (signal?) */ -#define SIGPIPE _S_IFIFO - - -/* (directory) */ -#define __S_ISTYPE(mode, mask) (((mode) & _S_IFMT) == (mask)) -#ifndef __MINGW32__ -#define S_ISFIFO(mode) __S_ISTYPE((mode), _S_IFIFO) -#define S_ISDIR(mode) __S_ISTYPE((mode), _S_IFDIR) -#define S_ISREG(mode) __S_ISTYPE((mode), _S_IFREG) -#endif /* __MINGW32__ */ - -/*** dir ***/ -#ifndef __MINGW32__ -typedef void * HANDLE; - -#ifndef _FINDDATA_T_DEFINED -typedef unsigned long _fsize_t; /* Could be 64 bits for Win32 */ -struct _finddata_t { - unsigned attrib; - time_t time_create; /* -1 for FAT file systems */ - time_t time_access; /* -1 for FAT file systems */ - time_t time_write; - _fsize_t size; - char name[260]; -}; -#endif /* !_FINDDATA_T_DEFINED */ - -struct dirent { - long d_ino; - unsigned short d_reclen; - unsigned short d_namlen; - char d_name[FILENAME_MAX]; -}; - -typedef struct -{ - struct _finddata_t dd_dta; - struct dirent dd_dir; - long dd_handle; - int dd_stat; - char dd_name[1]; -} DIR; - -#endif /* !__MINGW32__ */ - -#if defined (__MINGW32__) && MINGW32_VERSION < 312 -# if MINGW64_VERSION < 200 -struct timezone { - int tz_minuteswest; - int tz_dsttime; -}; -# endif -#endif - -/*** stdio ***/ -#if MINGW64_VERSION < 200 -FILE *popen( const char *command, const char *type ); -int pclose( FILE *stream ); -#endif /*** misc ***/ int write_w32_registry_string( char *parent, char *section, char *value, char *data ); diff --git a/src/exporthtml.c b/src/exporthtml.c @@ -38,10 +38,6 @@ #include <glib.h> #include <glib/gi18n.h> -#ifdef G_OS_WIN32 -# include <w32lib.h> -#endif - #include "mgutils.h" #include "utils.h" #include "exporthtml.h" diff --git a/src/folder.c b/src/folder.c @@ -31,9 +31,6 @@ #include <sys/stat.h> #include <unistd.h> #include <stdlib.h> -#ifdef WIN32 -#include <w32lib.h> -#endif #include "alertpanel.h" #include "folder.h" diff --git a/src/mbox.c b/src/mbox.c @@ -41,10 +41,6 @@ #include <time.h> #include <errno.h> -#ifdef G_OS_WIN32 -# include <w32lib.h> -#endif - #include "mbox.h" #include "procmsg.h" #include "folder.h" diff --git a/src/msgcache.c b/src/msgcache.c @@ -29,7 +29,6 @@ #include <glib.h> #include <glib/gi18n.h> #ifdef _WIN32 -# include <w32lib.h> # define MAP_FAILED ((char *) -1) #else # include <sys/mman.h> diff --git a/src/plugins/pgpcore/passphrase.c b/src/plugins/pgpcore/passphrase.c @@ -32,7 +32,7 @@ #include <string.h> #include <sys/types.h> #ifdef G_OS_WIN32 -#include <w32lib.h> +#include <windows.h> #else #include <sys/mman.h> #endif diff --git a/src/prefs_summaries.c b/src/prefs_summaries.c @@ -31,10 +31,6 @@ #include <gtk/gtk.h> #include <gdk/gdkkeysyms.h> -#ifdef G_OS_WIN32 -# include <w32lib.h> -#endif - #include "prefs_common.h" #include "prefs_gtk.h" #include "prefs_summary_open.h" diff --git a/src/procheader.c b/src/procheader.c @@ -30,10 +30,6 @@ #include <time.h> #include <sys/stat.h> -#ifdef G_OS_WIN32 -# include <w32lib.h> -#endif - #include "procheader.h" #include "procmsg.h" #include "codeconv.h" diff --git a/src/procmime.c b/src/procmime.c @@ -54,6 +54,10 @@ #include "account.h" #include "file-utils.h" +#ifdef G_OS_WIN32 +#include "w32lib.h" +#endif + static GHashTable *procmime_get_mime_type_table (void); static MimeInfo *procmime_scan_file_short(const gchar *filename); static MimeInfo *procmime_scan_queue_file_short(const gchar *filename); diff --git a/src/recv.c b/src/recv.c @@ -30,9 +30,7 @@ #include <string.h> #include <unistd.h> -#ifdef G_OS_WIN32 -#include "w32lib.h" -#else +#ifndef G_OS_WIN32 #include <sys/time.h> #endif