mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-12 10:45:13 +01:00
Cache getenv("G_BROKEN_FILENAMES") in have_broken_filenames() and use
2002-03-12 Alexander Larsson <alla@lysator.liu.se> * glib/gconvert.c: Cache getenv("G_BROKEN_FILENAMES") in have_broken_filenames() and use instead. Add g_convert_init() that calls have_broken_filenames() * gthread/gthread-impl.c: Have g_thread_init call g_convert_init.
This commit is contained in:
parent
3346808702
commit
428704a0b6
@ -1,3 +1,12 @@
|
|||||||
|
2002-03-12 Alexander Larsson <alla@lysator.liu.se>
|
||||||
|
|
||||||
|
* glib/gconvert.c:
|
||||||
|
Cache getenv("G_BROKEN_FILENAMES") in have_broken_filenames() and
|
||||||
|
use instead. Add g_convert_init() that calls have_broken_filenames()
|
||||||
|
|
||||||
|
* gthread/gthread-impl.c:
|
||||||
|
Have g_thread_init call g_convert_init.
|
||||||
|
|
||||||
2002-03-11 Matthias Clasen <maclas@gmx.de>
|
2002-03-11 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* glib/gstrfuncs.c (g_strtod):
|
* glib/gstrfuncs.c (g_strtod):
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2002-03-12 Alexander Larsson <alla@lysator.liu.se>
|
||||||
|
|
||||||
|
* glib/gconvert.c:
|
||||||
|
Cache getenv("G_BROKEN_FILENAMES") in have_broken_filenames() and
|
||||||
|
use instead. Add g_convert_init() that calls have_broken_filenames()
|
||||||
|
|
||||||
|
* gthread/gthread-impl.c:
|
||||||
|
Have g_thread_init call g_convert_init.
|
||||||
|
|
||||||
2002-03-11 Matthias Clasen <maclas@gmx.de>
|
2002-03-11 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* glib/gstrfuncs.c (g_strtod):
|
* glib/gstrfuncs.c (g_strtod):
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2002-03-12 Alexander Larsson <alla@lysator.liu.se>
|
||||||
|
|
||||||
|
* glib/gconvert.c:
|
||||||
|
Cache getenv("G_BROKEN_FILENAMES") in have_broken_filenames() and
|
||||||
|
use instead. Add g_convert_init() that calls have_broken_filenames()
|
||||||
|
|
||||||
|
* gthread/gthread-impl.c:
|
||||||
|
Have g_thread_init call g_convert_init.
|
||||||
|
|
||||||
2002-03-11 Matthias Clasen <maclas@gmx.de>
|
2002-03-11 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* glib/gstrfuncs.c (g_strtod):
|
* glib/gstrfuncs.c (g_strtod):
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2002-03-12 Alexander Larsson <alla@lysator.liu.se>
|
||||||
|
|
||||||
|
* glib/gconvert.c:
|
||||||
|
Cache getenv("G_BROKEN_FILENAMES") in have_broken_filenames() and
|
||||||
|
use instead. Add g_convert_init() that calls have_broken_filenames()
|
||||||
|
|
||||||
|
* gthread/gthread-impl.c:
|
||||||
|
Have g_thread_init call g_convert_init.
|
||||||
|
|
||||||
2002-03-11 Matthias Clasen <maclas@gmx.de>
|
2002-03-11 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* glib/gstrfuncs.c (g_strtod):
|
* glib/gstrfuncs.c (g_strtod):
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2002-03-12 Alexander Larsson <alla@lysator.liu.se>
|
||||||
|
|
||||||
|
* glib/gconvert.c:
|
||||||
|
Cache getenv("G_BROKEN_FILENAMES") in have_broken_filenames() and
|
||||||
|
use instead. Add g_convert_init() that calls have_broken_filenames()
|
||||||
|
|
||||||
|
* gthread/gthread-impl.c:
|
||||||
|
Have g_thread_init call g_convert_init.
|
||||||
|
|
||||||
2002-03-11 Matthias Clasen <maclas@gmx.de>
|
2002-03-11 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* glib/gstrfuncs.c (g_strtod):
|
* glib/gstrfuncs.c (g_strtod):
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2002-03-12 Alexander Larsson <alla@lysator.liu.se>
|
||||||
|
|
||||||
|
* glib/gconvert.c:
|
||||||
|
Cache getenv("G_BROKEN_FILENAMES") in have_broken_filenames() and
|
||||||
|
use instead. Add g_convert_init() that calls have_broken_filenames()
|
||||||
|
|
||||||
|
* gthread/gthread-impl.c:
|
||||||
|
Have g_thread_init call g_convert_init.
|
||||||
|
|
||||||
2002-03-11 Matthias Clasen <maclas@gmx.de>
|
2002-03-11 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* glib/gstrfuncs.c (g_strtod):
|
* glib/gstrfuncs.c (g_strtod):
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2002-03-12 Alexander Larsson <alla@lysator.liu.se>
|
||||||
|
|
||||||
|
* glib/gconvert.c:
|
||||||
|
Cache getenv("G_BROKEN_FILENAMES") in have_broken_filenames() and
|
||||||
|
use instead. Add g_convert_init() that calls have_broken_filenames()
|
||||||
|
|
||||||
|
* gthread/gthread-impl.c:
|
||||||
|
Have g_thread_init call g_convert_init.
|
||||||
|
|
||||||
2002-03-11 Matthias Clasen <maclas@gmx.de>
|
2002-03-11 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* glib/gstrfuncs.c (g_strtod):
|
* glib/gstrfuncs.c (g_strtod):
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2002-03-12 Alexander Larsson <alla@lysator.liu.se>
|
||||||
|
|
||||||
|
* glib/gconvert.c:
|
||||||
|
Cache getenv("G_BROKEN_FILENAMES") in have_broken_filenames() and
|
||||||
|
use instead. Add g_convert_init() that calls have_broken_filenames()
|
||||||
|
|
||||||
|
* gthread/gthread-impl.c:
|
||||||
|
Have g_thread_init call g_convert_init.
|
||||||
|
|
||||||
2002-03-11 Matthias Clasen <maclas@gmx.de>
|
2002-03-11 Matthias Clasen <maclas@gmx.de>
|
||||||
|
|
||||||
* glib/gstrfuncs.c (g_strtod):
|
* glib/gstrfuncs.c (g_strtod):
|
||||||
|
@ -1189,6 +1189,35 @@ g_locale_from_utf8 (const gchar *utf8string,
|
|||||||
#endif /* !G_PLATFORM_WIN32 */
|
#endif /* !G_PLATFORM_WIN32 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef G_PLATFORM_WIN32
|
||||||
|
static gboolean
|
||||||
|
have_broken_filenames (void)
|
||||||
|
{
|
||||||
|
static gboolean initialized = FALSE;
|
||||||
|
static gboolean broken;
|
||||||
|
|
||||||
|
if (initialized)
|
||||||
|
return broken;
|
||||||
|
|
||||||
|
broken = (getenv ("G_BROKEN_FILENAMES") != NULL);
|
||||||
|
|
||||||
|
initialized = TRUE;
|
||||||
|
|
||||||
|
return broken;
|
||||||
|
}
|
||||||
|
#endif /* !G_PLATFORM_WIN32 */
|
||||||
|
|
||||||
|
/* This is called from g_thread_init(). It's used to
|
||||||
|
* initialize some static data in a threadsafe way.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
g_convert_init (void)
|
||||||
|
{
|
||||||
|
#ifndef G_PLATFORM_WIN32
|
||||||
|
(void)have_broken_filenames ();
|
||||||
|
#endif /* !G_PLATFORM_WIN32 */
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_filename_to_utf8:
|
* g_filename_to_utf8:
|
||||||
* @opsysstring: a string in the encoding for filenames
|
* @opsysstring: a string in the encoding for filenames
|
||||||
@ -1225,7 +1254,7 @@ g_filename_to_utf8 (const gchar *opsysstring,
|
|||||||
error);
|
error);
|
||||||
#else /* !G_PLATFORM_WIN32 */
|
#else /* !G_PLATFORM_WIN32 */
|
||||||
|
|
||||||
if (getenv ("G_BROKEN_FILENAMES"))
|
if (have_broken_filenames ())
|
||||||
return g_locale_to_utf8 (opsysstring, len,
|
return g_locale_to_utf8 (opsysstring, len,
|
||||||
bytes_read, bytes_written,
|
bytes_read, bytes_written,
|
||||||
error);
|
error);
|
||||||
@ -1268,7 +1297,7 @@ g_filename_from_utf8 (const gchar *utf8string,
|
|||||||
bytes_read, bytes_written,
|
bytes_read, bytes_written,
|
||||||
error);
|
error);
|
||||||
#else /* !G_PLATFORM_WIN32 */
|
#else /* !G_PLATFORM_WIN32 */
|
||||||
if (getenv ("G_BROKEN_FILENAMES"))
|
if (have_broken_filenames ())
|
||||||
return g_locale_from_utf8 (utf8string, len,
|
return g_locale_from_utf8 (utf8string, len,
|
||||||
bytes_read, bytes_written,
|
bytes_read, bytes_written,
|
||||||
error);
|
error);
|
||||||
|
@ -65,6 +65,7 @@ static gint g_thread_priority_map [G_THREAD_PRIORITY_URGENT + 1];
|
|||||||
void g_mutex_init (void);
|
void g_mutex_init (void);
|
||||||
void g_mem_init (void);
|
void g_mem_init (void);
|
||||||
void g_messages_init (void);
|
void g_messages_init (void);
|
||||||
|
void g_convert_init (void);
|
||||||
|
|
||||||
#define G_MUTEX_DEBUG_INFO(mutex) (*((gpointer*)(((char*)mutex)+G_MUTEX_SIZE)))
|
#define G_MUTEX_DEBUG_INFO(mutex) (*((gpointer*)(((char*)mutex)+G_MUTEX_SIZE)))
|
||||||
|
|
||||||
@ -379,6 +380,7 @@ g_thread_init (GThreadFunctions* init)
|
|||||||
g_mutex_init ();
|
g_mutex_init ();
|
||||||
g_mem_init ();
|
g_mem_init ();
|
||||||
g_messages_init ();
|
g_messages_init ();
|
||||||
|
g_convert_init ();
|
||||||
|
|
||||||
/* now we can set g_threads_got_initialized and thus enable
|
/* now we can set g_threads_got_initialized and thus enable
|
||||||
* all the thread functions
|
* all the thread functions
|
||||||
|
Loading…
x
Reference in New Issue
Block a user