diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2007-01-12 03:05:28 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2007-01-12 03:05:28 +0000 |
commit | 2cbce84d411dcd9e00c91db246a01947ac2f4a69 (patch) | |
tree | 7258f1ecfd45f0c00809ca4fd05377f799dec282 /gtk | |
parent | ba4a3277045ee81999188cd18a72fe25e361ea35 (diff) |
Win32: MSVC > 6 doesn't work well with Unicode filenames!
fix this, by providing required functions in the new file file_util.c - it's mostly copied from GLib (g_open alike - that take UTF8 as filename format but don't use msvcrt.dll V6 for this as the glib files do)
"link" to these functions in file_util.h: #define eth_open eth_stdio_open
revert changes (from SVN 20282) throughout the code related to these file functions which were introduced with the first tries of MSVC 2005 ...
Hopefully I've done everything right with the new file_util.c ...
svn path=/trunk/; revision=20402
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/main.c b/gtk/main.c index 852cc5d52a..63f8ce4999 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -2620,7 +2620,7 @@ main(int argc, char *argv[]) /* We may set "last_open_dir" to "cf_name", and if we change "last_open_dir" later, we free the old value, so we have to set "cf_name" to something that's been allocated. */ -#if defined _WIN32 && (GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 6)) && (!defined _MSC_VER || _MSC_VER < 1300) +#if defined _WIN32 && (GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 6)) /* since GLib 2.6, we need to convert filenames to utf8 for Win32 */ cf_name = g_locale_to_utf8(optarg, -1, NULL, NULL, NULL); #else @@ -2691,7 +2691,7 @@ main(int argc, char *argv[]) * file - yes, you could have "-r" as the last part of the command, * but that's a bit ugly. */ -#if defined _WIN32 && (GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 6)) && (!defined _MSC_VER || _MSC_VER < 1300) +#if defined _WIN32 && (GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 6)) /* since GLib 2.6, we need to convert filenames to utf8 for Win32 */ cf_name = g_locale_to_utf8(argv[0], -1, NULL, NULL, NULL); #else |