win32: re-fix the _utf8 compat function situation

The previous fix didn't work, because every place within glib that
used any of the functions also needed to be including win32compat.h.

So, move the prototypes back to their original headers (but at least
all in one place at the bottom).

https://bugzilla.gnome.org/show_bug.cgi?id=688109
This commit is contained in:
Dan Winship
2012-11-15 18:18:54 -05:00
parent 834e6e96b3
commit 03ef7ba5ab
14 changed files with 149 additions and 187 deletions

View File

@@ -159,6 +159,26 @@ gchar *g_get_current_dir (void);
gchar *g_path_get_basename (const gchar *file_name) G_GNUC_MALLOC;
gchar *g_path_get_dirname (const gchar *file_name) G_GNUC_MALLOC;
#ifdef G_OS_WIN32
#define g_file_test g_file_test_utf8
#define g_file_get_contents g_file_get_contents_utf8
#define g_mkstemp g_mkstemp_utf8
#define g_file_open_tmp g_file_open_tmp_utf8
#define g_get_current_dir g_get_current_dir_utf8
gboolean g_file_test_utf8 (const gchar *filename,
GFileTest test);
gboolean g_file_get_contents_utf8 (const gchar *filename,
gchar **contents,
gsize *length,
GError **error);
gint g_mkstemp_utf8 (gchar *tmpl);
gint g_file_open_tmp_utf8 (const gchar *tmpl,
gchar **name_used,
GError **error);
gchar *g_get_current_dir_utf8 (void);
#endif /* G_OS_WIN32 */
G_END_DECLS
#endif /* __G_FILEUTILS_H__ */