From: Andrej Kacian Date: Wed, 16 Dec 2015 15:28:30 +0000 (+0100) Subject: Some minor changes for win32 build. X-Git-Tag: 3.13.1~12 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=fc0abbcade165c5044e033830c5c0f0b77a650c2 Some minor changes for win32 build. --- diff --git a/src/common/ssl.c b/src/common/ssl.c index c13046c96..7355b6540 100644 --- a/src/common/ssl.c +++ b/src/common/ssl.c @@ -113,6 +113,7 @@ static int gnutls_cert_cb(gnutls_session_t session, const gchar *claws_ssl_get_cert_file(void) { +#ifndef G_OS_WIN32 const char *cert_files[]={ "/etc/pki/tls/certs/ca-bundle.crt", "/etc/certs/ca-bundle.crt", @@ -126,9 +127,12 @@ const gchar *claws_ssl_get_cert_file(void) "/usr/lib/ssl/cert.pem", NULL}; int i; - +#endif + + /* We honor this environment variable on all platforms. */ if (g_getenv("SSL_CERT_FILE")) return g_getenv("SSL_CERT_FILE"); + #ifndef G_OS_WIN32 for (i = 0; cert_files[i]; i++) { if (is_file_exist(cert_files[i])) @@ -136,7 +140,7 @@ const gchar *claws_ssl_get_cert_file(void) } return NULL; #else - return get_cert_file(); + return w32_get_cert_file(); #endif } diff --git a/src/common/utils.c b/src/common/utils.c index 5dba2a4a4..aad985d01 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -1890,7 +1890,7 @@ const gchar *get_template_dir(void) } #ifdef G_OS_WIN32 -const gchar *get_cert_file(void) +const gchar *w32_get_cert_file(void) { const gchar *cert_file = NULL; if (!cert_file) @@ -1940,7 +1940,7 @@ const gchar *get_plugin_dir(void) #ifdef G_OS_WIN32 /* Return the default directory for Themes. */ -const gchar *get_themes_dir(void) +const gchar *w32_get_themes_dir(void) { static gchar *themes_dir = NULL; diff --git a/src/common/utils.h b/src/common/utils.h index 501a7a6b7..294213509 100644 --- a/src/common/utils.h +++ b/src/common/utils.h @@ -427,8 +427,8 @@ gchar *get_tmp_file (void); const gchar *get_domain_name (void); const gchar *get_desktop_file(void); #ifdef G_OS_WIN32 -const gchar *get_themes_dir (void); -const gchar *get_cert_file (void); +const gchar *w32_get_themes_dir (void); +const gchar *w32_get_cert_file (void); #endif /* file / directory handling */ off_t get_file_size (const gchar *file); diff --git a/src/stock_pixmap.c b/src/stock_pixmap.c index 84ec1da66..0b1796a77 100644 --- a/src/stock_pixmap.c +++ b/src/stock_pixmap.c @@ -539,7 +539,7 @@ gchar *stock_pixmap_get_system_theme_dir_for_theme(const gchar *theme) return g_strconcat(PACKAGE_DATA_DIR, G_DIR_SEPARATOR_S, PIXMAP_THEME_DIR, sep, theme, NULL); #else - return g_strconcat(get_themes_dir(), sep, theme, NULL); + return g_strconcat(w32_get_themes_dir(), sep, theme, NULL); #endif }