Accept also forward slashes. (But still don't accept them in the other

2001-09-20  Tor Lillqvist  <tml@iki.fi>

	* glib/gutils.c (g_path_is_absolute): (Win32:) Accept also forward
	slashes. (But still don't accept them in the other functions
	here. This is a thorny issue. Windows in fact does treat / like \
	on input (at least as local directory separators, dunno about
	server/share separators). But GLib only has the one
	G_DIR_SEPARATOR value, that apps should scan for, and use when
	building pathnames. To properly fix this would require totally
	abstracting pathnames, and don't having any path name scanning and
	building in applications at all. Fat chance.)
	(GLIB_LOCALE_DIR): Redefine only on "pure" Win32, not Cygwin. Use
	subdirectory "share\locale", as on Unix.

	* glib/gwin32.c: Don't need to define those langiage and
	sublanguage constants here, current mingw (w32api) headers have
	them.

	* glib/glib.def: Add a few missing entry points.

	* tests/testglib.c (main): Use same name for DLL as libtool does.
	Use G_DIR_SEPARATOR in g_path_get_basename tests.
This commit is contained in:
Tor Lillqvist 2001-09-20 05:41:52 +00:00 committed by Tor Lillqvist
parent 7b0afc5582
commit 58f3fdd748
12 changed files with 211 additions and 325 deletions

View File

@ -1,3 +1,26 @@
2001-09-20 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_path_is_absolute): (Win32:) Accept also forward
slashes. (But still don't accept them in the other functions
here. This is a thorny issue. Windows in fact does treat / like \
on input (at least as local directory separators, dunno about
server/share separators). But GLib only has the one
G_DIR_SEPARATOR value, that apps should scan for, and use when
building pathnames. To properly fix this would require totally
abstracting pathnames, and don't having any path name scanning and
building in applications at all. Fat chance.)
(GLIB_LOCALE_DIR): Redefine only on "pure" Win32, not Cygwin. Use
subdirectory "share\locale", as on Unix.
* glib/gwin32.c: Don't need to define those langiage and
sublanguage constants here, current mingw (w32api) headers have
them.
* glib/glib.def: Add a few missing entry points.
* tests/testglib.c (main): Use same name for DLL as libtool does.
Use G_DIR_SEPARATOR in g_path_get_basename tests.
Wed Sep 19 16:35:22 2001 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c (g_main_context_find_source_by[_funcs]_user_data):

View File

@ -1,3 +1,26 @@
2001-09-20 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_path_is_absolute): (Win32:) Accept also forward
slashes. (But still don't accept them in the other functions
here. This is a thorny issue. Windows in fact does treat / like \
on input (at least as local directory separators, dunno about
server/share separators). But GLib only has the one
G_DIR_SEPARATOR value, that apps should scan for, and use when
building pathnames. To properly fix this would require totally
abstracting pathnames, and don't having any path name scanning and
building in applications at all. Fat chance.)
(GLIB_LOCALE_DIR): Redefine only on "pure" Win32, not Cygwin. Use
subdirectory "share\locale", as on Unix.
* glib/gwin32.c: Don't need to define those langiage and
sublanguage constants here, current mingw (w32api) headers have
them.
* glib/glib.def: Add a few missing entry points.
* tests/testglib.c (main): Use same name for DLL as libtool does.
Use G_DIR_SEPARATOR in g_path_get_basename tests.
Wed Sep 19 16:35:22 2001 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c (g_main_context_find_source_by[_funcs]_user_data):

View File

@ -1,3 +1,26 @@
2001-09-20 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_path_is_absolute): (Win32:) Accept also forward
slashes. (But still don't accept them in the other functions
here. This is a thorny issue. Windows in fact does treat / like \
on input (at least as local directory separators, dunno about
server/share separators). But GLib only has the one
G_DIR_SEPARATOR value, that apps should scan for, and use when
building pathnames. To properly fix this would require totally
abstracting pathnames, and don't having any path name scanning and
building in applications at all. Fat chance.)
(GLIB_LOCALE_DIR): Redefine only on "pure" Win32, not Cygwin. Use
subdirectory "share\locale", as on Unix.
* glib/gwin32.c: Don't need to define those langiage and
sublanguage constants here, current mingw (w32api) headers have
them.
* glib/glib.def: Add a few missing entry points.
* tests/testglib.c (main): Use same name for DLL as libtool does.
Use G_DIR_SEPARATOR in g_path_get_basename tests.
Wed Sep 19 16:35:22 2001 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c (g_main_context_find_source_by[_funcs]_user_data):

View File

@ -1,3 +1,26 @@
2001-09-20 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_path_is_absolute): (Win32:) Accept also forward
slashes. (But still don't accept them in the other functions
here. This is a thorny issue. Windows in fact does treat / like \
on input (at least as local directory separators, dunno about
server/share separators). But GLib only has the one
G_DIR_SEPARATOR value, that apps should scan for, and use when
building pathnames. To properly fix this would require totally
abstracting pathnames, and don't having any path name scanning and
building in applications at all. Fat chance.)
(GLIB_LOCALE_DIR): Redefine only on "pure" Win32, not Cygwin. Use
subdirectory "share\locale", as on Unix.
* glib/gwin32.c: Don't need to define those langiage and
sublanguage constants here, current mingw (w32api) headers have
them.
* glib/glib.def: Add a few missing entry points.
* tests/testglib.c (main): Use same name for DLL as libtool does.
Use G_DIR_SEPARATOR in g_path_get_basename tests.
Wed Sep 19 16:35:22 2001 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c (g_main_context_find_source_by[_funcs]_user_data):

View File

@ -1,3 +1,26 @@
2001-09-20 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_path_is_absolute): (Win32:) Accept also forward
slashes. (But still don't accept them in the other functions
here. This is a thorny issue. Windows in fact does treat / like \
on input (at least as local directory separators, dunno about
server/share separators). But GLib only has the one
G_DIR_SEPARATOR value, that apps should scan for, and use when
building pathnames. To properly fix this would require totally
abstracting pathnames, and don't having any path name scanning and
building in applications at all. Fat chance.)
(GLIB_LOCALE_DIR): Redefine only on "pure" Win32, not Cygwin. Use
subdirectory "share\locale", as on Unix.
* glib/gwin32.c: Don't need to define those langiage and
sublanguage constants here, current mingw (w32api) headers have
them.
* glib/glib.def: Add a few missing entry points.
* tests/testglib.c (main): Use same name for DLL as libtool does.
Use G_DIR_SEPARATOR in g_path_get_basename tests.
Wed Sep 19 16:35:22 2001 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c (g_main_context_find_source_by[_funcs]_user_data):

View File

@ -1,3 +1,26 @@
2001-09-20 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_path_is_absolute): (Win32:) Accept also forward
slashes. (But still don't accept them in the other functions
here. This is a thorny issue. Windows in fact does treat / like \
on input (at least as local directory separators, dunno about
server/share separators). But GLib only has the one
G_DIR_SEPARATOR value, that apps should scan for, and use when
building pathnames. To properly fix this would require totally
abstracting pathnames, and don't having any path name scanning and
building in applications at all. Fat chance.)
(GLIB_LOCALE_DIR): Redefine only on "pure" Win32, not Cygwin. Use
subdirectory "share\locale", as on Unix.
* glib/gwin32.c: Don't need to define those langiage and
sublanguage constants here, current mingw (w32api) headers have
them.
* glib/glib.def: Add a few missing entry points.
* tests/testglib.c (main): Use same name for DLL as libtool does.
Use G_DIR_SEPARATOR in g_path_get_basename tests.
Wed Sep 19 16:35:22 2001 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c (g_main_context_find_source_by[_funcs]_user_data):

View File

@ -1,3 +1,26 @@
2001-09-20 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_path_is_absolute): (Win32:) Accept also forward
slashes. (But still don't accept them in the other functions
here. This is a thorny issue. Windows in fact does treat / like \
on input (at least as local directory separators, dunno about
server/share separators). But GLib only has the one
G_DIR_SEPARATOR value, that apps should scan for, and use when
building pathnames. To properly fix this would require totally
abstracting pathnames, and don't having any path name scanning and
building in applications at all. Fat chance.)
(GLIB_LOCALE_DIR): Redefine only on "pure" Win32, not Cygwin. Use
subdirectory "share\locale", as on Unix.
* glib/gwin32.c: Don't need to define those langiage and
sublanguage constants here, current mingw (w32api) headers have
them.
* glib/glib.def: Add a few missing entry points.
* tests/testglib.c (main): Use same name for DLL as libtool does.
Use G_DIR_SEPARATOR in g_path_get_basename tests.
Wed Sep 19 16:35:22 2001 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c (g_main_context_find_source_by[_funcs]_user_data):

View File

@ -1,3 +1,26 @@
2001-09-20 Tor Lillqvist <tml@iki.fi>
* glib/gutils.c (g_path_is_absolute): (Win32:) Accept also forward
slashes. (But still don't accept them in the other functions
here. This is a thorny issue. Windows in fact does treat / like \
on input (at least as local directory separators, dunno about
server/share separators). But GLib only has the one
G_DIR_SEPARATOR value, that apps should scan for, and use when
building pathnames. To properly fix this would require totally
abstracting pathnames, and don't having any path name scanning and
building in applications at all. Fat chance.)
(GLIB_LOCALE_DIR): Redefine only on "pure" Win32, not Cygwin. Use
subdirectory "share\locale", as on Unix.
* glib/gwin32.c: Don't need to define those langiage and
sublanguage constants here, current mingw (w32api) headers have
them.
* glib/glib.def: Add a few missing entry points.
* tests/testglib.c (main): Use same name for DLL as libtool does.
Use G_DIR_SEPARATOR in g_path_get_basename tests.
Wed Sep 19 16:35:22 2001 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c (g_main_context_find_source_by[_funcs]_user_data):

View File

@ -143,7 +143,9 @@ EXPORTS
g_file_get_contents
g_file_open_tmp
g_file_test
g_filename_from_uri
g_filename_from_utf8
g_filename_to_uri
g_filename_to_utf8
g_find_program_in_path
g_free
@ -657,6 +659,7 @@ EXPORTS
g_utf8_find_prev_char
g_utf8_get_char
g_utf8_get_char_validated
g_utf8_normalize
g_utf8_offset_to_pointer
g_utf8_pointer_to_offset
g_utf8_prev_char

View File

@ -532,12 +532,16 @@ g_path_is_absolute (const gchar *file_name)
{
g_return_val_if_fail (file_name != NULL, FALSE);
if (file_name[0] == G_DIR_SEPARATOR)
if (file_name[0] == G_DIR_SEPARATOR
#ifdef G_OS_WIN32
|| file_name[0] == '/'
#endif
)
return TRUE;
#ifdef G_OS_WIN32
/* Recognize drive letter on native Windows */
if (g_ascii_isalpha (file_name[0]) && file_name[1] == ':' && file_name[2] == G_DIR_SEPARATOR)
if (g_ascii_isalpha (file_name[0]) && file_name[1] == ':' && (file_name[2] == G_DIR_SEPARATOR || file_name[2] == '/'))
return TRUE;
#endif /* G_OS_WIN32 */
@ -1092,9 +1096,13 @@ g_get_codeset (void)
#include <libintl.h>
#ifndef GLIB_LOCALE_DIR
#ifdef G_PLATFORM_WIN32
#ifdef G_OS_WIN32
/* On Windows we don't want any hard-coded path names */
#undef GLIB_LOCALE_DIR
/* It's OK to leak the g_win32_get_...() and g_strdup_printf() results
* below, as this macro is called only once. */
#define GLIB_LOCALE_DIR \
g_win32_get_package_installation_subdirectory \
(GETTEXT_PACKAGE, \
@ -1102,10 +1110,9 @@ g_get_codeset (void)
GLIB_MAJOR_VERSION, \
GLIB_MINOR_VERSION, \
GLIB_MICRO_VERSION - GLIB_BINARY_AGE), \
"locale")
"share\\locale")
#endif /* G_PLATFORM_WIN32 */
#endif /* !GLIB_LOCALE_DIR */
#endif /* !G_OS_WIN32 */
G_CONST_RETURN gchar *
_glib_gettext (const gchar *str)

View File

@ -225,317 +225,6 @@ g_win32_closedir (DIR *dir)
}
#endif
/* Mingw headers don't have latest language and sublanguage codes */
#ifndef LANG_AFRIKAANS
#define LANG_AFRIKAANS 0x36
#endif
#ifndef LANG_ALBANIAN
#define LANG_ALBANIAN 0x1c
#endif
#ifndef LANG_ARABIC
#define LANG_ARABIC 0x01
#endif
#ifndef LANG_ARMENIAN
#define LANG_ARMENIAN 0x2b
#endif
#ifndef LANG_ASSAMESE
#define LANG_ASSAMESE 0x4d
#endif
#ifndef LANG_AZERI
#define LANG_AZERI 0x2c
#endif
#ifndef LANG_BASQUE
#define LANG_BASQUE 0x2d
#endif
#ifndef LANG_BELARUSIAN
#define LANG_BELARUSIAN 0x23
#endif
#ifndef LANG_BENGALI
#define LANG_BENGALI 0x45
#endif
#ifndef LANG_CATALAN
#define LANG_CATALAN 0x03
#endif
#ifndef LANG_ESTONIAN
#define LANG_ESTONIAN 0x25
#endif
#ifndef LANG_FAEROESE
#define LANG_FAEROESE 0x38
#endif
#ifndef LANG_FARSI
#define LANG_FARSI 0x29
#endif
#ifndef LANG_GEORGIAN
#define LANG_GEORGIAN 0x37
#endif
#ifndef LANG_GUJARATI
#define LANG_GUJARATI 0x47
#endif
#ifndef LANG_HEBREW
#define LANG_HEBREW 0x0d
#endif
#ifndef LANG_HINDI
#define LANG_HINDI 0x39
#endif
#ifndef LANG_INDONESIAN
#define LANG_INDONESIAN 0x21
#endif
#ifndef LANG_KANNADA
#define LANG_KANNADA 0x4b
#endif
#ifndef LANG_KASHMIRI
#define LANG_KASHMIRI 0x60
#endif
#ifndef LANG_KAZAK
#define LANG_KAZAK 0x3f
#endif
#ifndef LANG_KONKANI
#define LANG_KONKANI 0x57
#endif
#ifndef LANG_LATVIAN
#define LANG_LATVIAN 0x26
#endif
#ifndef LANG_LITHUANIAN
#define LANG_LITHUANIAN 0x27
#endif
#ifndef LANG_MACEDONIAN
#define LANG_MACEDONIAN 0x2f
#endif
#ifndef LANG_MALAY
#define LANG_MALAY 0x3e
#endif
#ifndef LANG_MALAYALAM
#define LANG_MALAYALAM 0x4c
#endif
#ifndef LANG_MANIPURI
#define LANG_MANIPURI 0x58
#endif
#ifndef LANG_MARATHI
#define LANG_MARATHI 0x4e
#endif
#ifndef LANG_NEPALI
#define LANG_NEPALI 0x61
#endif
#ifndef LANG_ORIYA
#define LANG_ORIYA 0x48
#endif
#ifndef LANG_PUNJABI
#define LANG_PUNJABI 0x46
#endif
#ifndef LANG_SANSKRIT
#define LANG_SANSKRIT 0x4f
#endif
#ifndef LANG_SERBIAN
#define LANG_SERBIAN 0x1a
#endif
#ifndef LANG_SINDHI
#define LANG_SINDHI 0x59
#endif
#ifndef LANG_SLOVAK
#define LANG_SLOVAK 0x1b
#endif
#ifndef LANG_SWAHILI
#define LANG_SWAHILI 0x41
#endif
#ifndef LANG_TAMIL
#define LANG_TAMIL 0x49
#endif
#ifndef LANG_TATAR
#define LANG_TATAR 0x44
#endif
#ifndef LANG_TELUGU
#define LANG_TELUGU 0x4a
#endif
#ifndef LANG_THAI
#define LANG_THAI 0x1e
#endif
#ifndef LANG_UKRAINIAN
#define LANG_UKRAINIAN 0x22
#endif
#ifndef LANG_URDU
#define LANG_URDU 0x20
#endif
#ifndef LANG_UZBEK
#define LANG_UZBEK 0x43
#endif
#ifndef LANG_VIETNAMESE
#define LANG_VIETNAMESE 0x2a
#endif
#ifndef SUBLANG_ARABIC_SAUDI_ARABIA
#define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
#endif
#ifndef SUBLANG_ARABIC_IRAQ
#define SUBLANG_ARABIC_IRAQ 0x02
#endif
#ifndef SUBLANG_ARABIC_EGYPT
#define SUBLANG_ARABIC_EGYPT 0x03
#endif
#ifndef SUBLANG_ARABIC_LIBYA
#define SUBLANG_ARABIC_LIBYA 0x04
#endif
#ifndef SUBLANG_ARABIC_ALGERIA
#define SUBLANG_ARABIC_ALGERIA 0x05
#endif
#ifndef SUBLANG_ARABIC_MOROCCO
#define SUBLANG_ARABIC_MOROCCO 0x06
#endif
#ifndef SUBLANG_ARABIC_TUNISIA
#define SUBLANG_ARABIC_TUNISIA 0x07
#endif
#ifndef SUBLANG_ARABIC_OMAN
#define SUBLANG_ARABIC_OMAN 0x08
#endif
#ifndef SUBLANG_ARABIC_YEMEN
#define SUBLANG_ARABIC_YEMEN 0x09
#endif
#ifndef SUBLANG_ARABIC_SYRIA
#define SUBLANG_ARABIC_SYRIA 0x0a
#endif
#ifndef SUBLANG_ARABIC_JORDAN
#define SUBLANG_ARABIC_JORDAN 0x0b
#endif
#ifndef SUBLANG_ARABIC_LEBANON
#define SUBLANG_ARABIC_LEBANON 0x0c
#endif
#ifndef SUBLANG_ARABIC_KUWAIT
#define SUBLANG_ARABIC_KUWAIT 0x0d
#endif
#ifndef SUBLANG_ARABIC_UAE
#define SUBLANG_ARABIC_UAE 0x0e
#endif
#ifndef SUBLANG_ARABIC_BAHRAIN
#define SUBLANG_ARABIC_BAHRAIN 0x0f
#endif
#ifndef SUBLANG_ARABIC_QATAR
#define SUBLANG_ARABIC_QATAR 0x10
#endif
#ifndef SUBLANG_AZERI_LATIN
#define SUBLANG_AZERI_LATIN 0x01
#endif
#ifndef SUBLANG_AZERI_CYRILLIC
#define SUBLANG_AZERI_CYRILLIC 0x02
#endif
#ifndef SUBLANG_CHINESE_MACAU
#define SUBLANG_CHINESE_MACAU 0x05
#endif
#ifndef SUBLANG_ENGLISH_SOUTH_AFRICA
#define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
#endif
#ifndef SUBLANG_ENGLISH_JAMAICA
#define SUBLANG_ENGLISH_JAMAICA 0x08
#endif
#ifndef SUBLANG_ENGLISH_CARIBBEAN
#define SUBLANG_ENGLISH_CARIBBEAN 0x09
#endif
#ifndef SUBLANG_ENGLISH_BELIZE
#define SUBLANG_ENGLISH_BELIZE 0x0a
#endif
#ifndef SUBLANG_ENGLISH_TRINIDAD
#define SUBLANG_ENGLISH_TRINIDAD 0x0b
#endif
#ifndef SUBLANG_ENGLISH_ZIMBABWE
#define SUBLANG_ENGLISH_ZIMBABWE 0x0c
#endif
#ifndef SUBLANG_ENGLISH_PHILIPPINES
#define SUBLANG_ENGLISH_PHILIPPINES 0x0d
#endif
#ifndef SUBLANG_FRENCH_LUXEMBOURG
#define SUBLANG_FRENCH_LUXEMBOURG 0x05
#endif
#ifndef SUBLANG_FRENCH_MONACO
#define SUBLANG_FRENCH_MONACO 0x06
#endif
#ifndef SUBLANG_GERMAN_LUXEMBOURG
#define SUBLANG_GERMAN_LUXEMBOURG 0x04
#endif
#ifndef SUBLANG_GERMAN_LIECHTENSTEIN
#define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
#endif
#ifndef SUBLANG_KASHMIRI_INDIA
#define SUBLANG_KASHMIRI_INDIA 0x02
#endif
#ifndef SUBLANG_MALAY_MALAYSIA
#define SUBLANG_MALAY_MALAYSIA 0x01
#endif
#ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM
#define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
#endif
#ifndef SUBLANG_NEPALI_INDIA
#define SUBLANG_NEPALI_INDIA 0x02
#endif
#ifndef SUBLANG_SERBIAN_LATIN
#define SUBLANG_SERBIAN_LATIN 0x02
#endif
#ifndef SUBLANG_SERBIAN_CYRILLIC
#define SUBLANG_SERBIAN_CYRILLIC 0x03
#endif
#ifndef SUBLANG_SPANISH_GUATEMALA
#define SUBLANG_SPANISH_GUATEMALA 0x04
#endif
#ifndef SUBLANG_SPANISH_COSTA_RICA
#define SUBLANG_SPANISH_COSTA_RICA 0x05
#endif
#ifndef SUBLANG_SPANISH_PANAMA
#define SUBLANG_SPANISH_PANAMA 0x06
#endif
#ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC
#define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07
#endif
#ifndef SUBLANG_SPANISH_VENEZUELA
#define SUBLANG_SPANISH_VENEZUELA 0x08
#endif
#ifndef SUBLANG_SPANISH_COLOMBIA
#define SUBLANG_SPANISH_COLOMBIA 0x09
#endif
#ifndef SUBLANG_SPANISH_PERU
#define SUBLANG_SPANISH_PERU 0x0a
#endif
#ifndef SUBLANG_SPANISH_ARGENTINA
#define SUBLANG_SPANISH_ARGENTINA 0x0b
#endif
#ifndef SUBLANG_SPANISH_ECUADOR
#define SUBLANG_SPANISH_ECUADOR 0x0c
#endif
#ifndef SUBLANG_SPANISH_CHILE
#define SUBLANG_SPANISH_CHILE 0x0d
#endif
#ifndef SUBLANG_SPANISH_URUGUAY
#define SUBLANG_SPANISH_URUGUAY 0x0e
#endif
#ifndef SUBLANG_SPANISH_PARAGUAY
#define SUBLANG_SPANISH_PARAGUAY 0x0f
#endif
#ifndef SUBLANG_SPANISH_BOLIVIA
#define SUBLANG_SPANISH_BOLIVIA 0x10
#endif
#ifndef SUBLANG_SPANISH_EL_SALVADOR
#define SUBLANG_SPANISH_EL_SALVADOR 0x11
#endif
#ifndef SUBLANG_SPANISH_HONDURAS
#define SUBLANG_SPANISH_HONDURAS 0x12
#endif
#ifndef SUBLANG_SPANISH_NICARAGUA
#define SUBLANG_SPANISH_NICARAGUA 0x13
#endif
#ifndef SUBLANG_SPANISH_PUERTO_RICO
#define SUBLANG_SPANISH_PUERTO_RICO 0x14
#endif
#ifndef SUBLANG_SWEDISH_FINLAND
#define SUBLANG_SWEDISH_FINLAND 0x02
#endif
#ifndef SUBLANG_URDU_PAKISTAN
#define SUBLANG_URDU_PAKISTAN 0x01
#endif
#ifndef SUBLANG_URDU_INDIA
#define SUBLANG_URDU_INDIA 0x02
#endif
#ifndef SUBLANG_UZBEK_LATIN
#define SUBLANG_UZBEK_LATIN 0x01
#endif
#ifndef SUBLANG_UZBEK_CYRILLIC
#define SUBLANG_UZBEK_CYRILLIC 0x02
#endif
/**
* g_win32_getlocale:
*

View File

@ -401,14 +401,16 @@ main (int argc,
GError *error;
char *name_used;
#ifdef G_OS_WIN32
gchar *glib_dll = g_strdup_printf ("glib-%d.%d.dll",
gchar *glib_dll = g_strdup_printf ("libglib-%d.%d-%d.dll",
GLIB_MAJOR_VERSION,
GLIB_MINOR_VERSION);
GLIB_MINOR_VERSION,
GLIB_MICRO_VERSION - GLIB_BINARY_AGE);
#endif
#ifdef G_WITH_CYGWIN
gchar *glib_dll = g_strdup_printf ("cygglib-%d.%d.dll",
gchar *glib_dll = g_strdup_printf ("cygglib-%d.%d-%d.dll",
GLIB_MAJOR_VERSION,
GLIB_MINOR_VERSION);
GLIB_MINOR_VERSION,
GLIB_MICRO_VERSION - GLIB_BINARY_AGE);
#endif
g_print ("TestGLib v%u.%u.%u (i:%u b:%u)\n",
@ -441,10 +443,10 @@ main (int argc,
g_print ("\n");
g_print ("checking g_path_get_basename()...");
string = g_path_get_basename ("/foo/dir/");
string = g_path_get_basename (G_DIR_SEPARATOR_S "foo" G_DIR_SEPARATOR_S "dir" G_DIR_SEPARATOR_S);
g_assert (strcmp (string, "dir") == 0);
g_free (string);
string = g_path_get_basename ("/foo/file");
string = g_path_get_basename (G_DIR_SEPARATOR_S "foo" G_DIR_SEPARATOR_S "file");
g_assert (strcmp (string, "file") == 0);
g_free (string);
g_print ("ok\n");
@ -1175,6 +1177,7 @@ main (int argc,
#ifdef G_PLATFORM_WIN32
g_print ("current locale: %s\n", g_win32_getlocale ());
g_print ("GLib DLL name tested for: %s\n", glib_dll);
g_print ("GLib installation directory, from Registry entry for %s if available: %s\n",
GETTEXT_PACKAGE,
@ -1184,7 +1187,7 @@ main (int argc,
g_print ("Ditto, only from GLib DLL name: %s\n",
g_win32_get_package_installation_directory (NULL, glib_dll));
g_print ("locale subdirectory of GLib installation directory: %s\n",
g_win32_get_package_installation_subdirectory (NULL, glib_dll, "locale"));
g_win32_get_package_installation_subdirectory (NULL, glib_dll, "share\\locale"));
g_print ("GTK+ 2.0 installation directory, if available: %s\n",
g_win32_get_package_installation_directory ("gtk20", NULL));