if test x"$enable_ipv6" = xyes; then
AC_MSG_RESULT(yes)
AC_MSG_CHECKING([for IPv6 support])
- AC_CACHE_VAL(ac_cv_ipv6,[
- AC_TRY_COMPILE([#define INET6
- #include <sys/types.h>
- #include <netinet/in.h>],
- [int x = IPPROTO_IPV6; struct in6_addr a;],
- ac_cv_ipv6=yes, ac_cv_ipv6=no)
- ])
+ if test x"$platform_win32" = xyes; then
+ AC_CACHE_VAL(ac_cv_ipv6,[
+ AC_TRY_COMPILE([
+ #include <ws2tcpip.h>
+ ], [struct in6_addr a;],
+ ac_cv_ipv6=yes, ac_cv_ipv6=no)
+ ])
+ else
+ AC_CACHE_VAL(ac_cv_ipv6,[
+ AC_TRY_COMPILE([
+ #define INET6
+ #include <sys/types.h>
+ #include <netinet/in.h>
+ ], [int x = IPPROTO_IPV6; struct in6_addr a;],
+ ac_cv_ipv6=yes, ac_cv_ipv6=no)
+ ])
+ fi
AC_MSG_RESULT($ac_cv_ipv6)
if test $ac_cv_ipv6 = yes; then
AC_DEFINE(INET6, 1, Define if you want IPv6 support.)
#define _BSD_SOURCE
#endif
+/* This can probably be handled better, e.g. define it in config.h. */
+#define _WIN32_WINNT _WIN32_WINNT_WIN6
#include <glib.h>
#include <glib/gi18n.h>
#include <sys/time.h>
#include <sys/types.h>
#ifdef G_OS_WIN32
-# include <winsock2.h>
+# include <ws2tcpip.h>
# ifndef EINPROGRESS
# define EINPROGRESS WSAEINPROGRESS
# endif
g_return_val_if_fail(folder != NULL, NULL);
g_return_val_if_fail(folder->account != NULL, NULL);
+#ifdef G_OS_WIN32
+ gchar *sanitized_dirname = g_strdup(folder->account->recv_server);
+ g_strdelimit(sanitized_dirname, ":", ',');
+#endif
+
folder_path = g_strconcat(get_imap_cache_dir(),
G_DIR_SEPARATOR_S,
+#ifdef G_OS_WIN32
+ sanitized_dirname,
+#else
folder->account->recv_server,
+#endif
G_DIR_SEPARATOR_S,
folder->account->userid,
NULL);
+#ifdef G_OS_WIN32
+ g_free(sanitized_dirname);
+#endif
return folder_path;
}