[Commits] [SCM] claws branch, master, updated. 3.12.0-39-g4256dfb

ticho at claws-mail.org ticho at claws-mail.org
Mon Aug 3 23:28:32 CEST 2015


The branch, master has been updated
       via  4256dfbdc81c5a900cf577bae38847bb803a45c7 (commit)
      from  9ef66c7e8a648f99d796657b9d6bd9f128cd1fea (commit)

Summary of changes:
 src/common/utils.c |  118 ----------------------------------------------------
 1 file changed, 118 deletions(-)


- Log -----------------------------------------------------------------
commit 4256dfbdc81c5a900cf577bae38847bb803a45c7
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Mon Aug 3 23:24:05 2015 +0200

    Remove broken reimplementation of a few Glib file functions.
    
    This fixes bug #3454, and probably a few more.

diff --git a/src/common/utils.c b/src/common/utils.c
index ab08c44..b753ac8 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -100,124 +100,6 @@ gboolean superuser_p (void)
 #endif  
 }
 
-
-
-#if !defined(G_OS_UNIX)
-gint g_chdir(const gchar *path)
-{
-#ifdef G_OS_WIN32
-	if (G_WIN32_HAVE_WIDECHAR_API()) {
-		wchar_t *wpath;
-		gint retval;
-		gint save_errno;
-
-		wpath = g_utf8_to_utf16(path, -1, NULL, NULL, NULL);
-		if (wpath == NULL) {
-			errno = EINVAL;
-			return -1;
-		}
-
-		retval = _wchdir(wpath);
-		save_errno = errno;
-
-		g_free(wpath);
-
-		errno = save_errno;
-		return retval;
-	} else {
-		gchar *cp_path;
-		gint retval;
-		gint save_errno;
-
-		cp_path = g_locale_from_utf8(path, -1, NULL, NULL, NULL);
-		if (cp_path == NULL) {
-			errno = EINVAL;
-			return -1;
-		}
-
-		retval = chdir(cp_path);
-		save_errno = errno;
-
-		g_free(cp_path);
-
-		errno = save_errno;
-		return retval;
-	}
-#else
-	return chdir(path);
-#endif
-}
-
-gint g_chmod(const gchar *path, gint mode)
-{
-#ifdef G_OS_WIN32
-	if (G_WIN32_HAVE_WIDECHAR_API()) {
-		wchar_t *wpath;
-		gint retval;
-		gint save_errno;
-
-		wpath = g_utf8_to_utf16(path, -1, NULL, NULL, NULL);
-		if (wpath == NULL) {
-			errno = EINVAL;
-			return -1;
-		}
-
-		retval = _wchmod(wpath, mode);
-		save_errno = errno;
-
-		g_free(wpath);
-
-		errno = save_errno;
-		return retval;
-	} else {
-		gchar *cp_path;
-		gint retval;
-		gint save_errno;
-
-		cp_path = g_locale_from_utf8(path, -1, NULL, NULL, NULL);
-		if (cp_path == NULL) {
-			errno = EINVAL;
-			return -1;
-		}
-
-		retval = chmod(cp_path, mode);
-		save_errno = errno;
-
-		g_free(cp_path);
-
-		errno = save_errno;
-		return retval;
-	}
-#else
-	return chmod(path, mode);
-#endif
-}
-
-FILE* g_fopen(const gchar *filename, const gchar *mode)
-{
-#ifdef G_OS_WIN32
-	char *name = g_win32_locale_filename_from_utf8(filename);
-	FILE* fp = fopen(name, mode);
-	g_free(name);
-	return fp;
-#else
-	return fopen(filename, mode);
-#endif
-}
-int g_open(const gchar *filename, int flags, int mode)
-{
-#ifdef G_OS_WIN32
-	char *name = g_win32_locale_filename_from_utf8(filename);
-	int fd = open(name, flags, mode);
-	g_free(name);
-	return fd;
-#else
-	return open(filename, flags, mode);
-#endif
-}
-#endif /* G_OS_UNIX */
-
-
 GSList *slist_copy_deep(GSList *list, GCopyFunc func)
 {
 #if GLIB_CHECK_VERSION(2, 34, 0)

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list