1. 18 Jan, 2007 1 commit
    • Tor Lillqvist's avatar
      config.h.win32.in glib/galloca.h glib/gbacktrace.h glib/gwin32.c · 98a5ddc4
      Tor Lillqvist authored
      2007-01-17  Tor Lillqvist  <tml@novell.com>
      
      	* config.h.win32.in
      	* glib/galloca.h
      	* glib/gbacktrace.h
      	* glib/gwin32.c
      	* glibconfig.h.win32.in
      	* README.win32: More minor tweaks for Digital Mars
      	compiler. (#346808, Serhat Sevki Dincer)
      
      
      svn path=/trunk/; revision=5294
      98a5ddc4
  2. 15 Jan, 2007 1 commit
    • Tor Lillqvist's avatar
      Simplify greatly. Instead of hardcoding a large switch statement, just ask · 15354468
      Tor Lillqvist authored
      2007-01-15  Tor Lillqvist  <tml@novell.com>
      
      	* glib/gwin32.c (g_win32_getlocale): Simplify greatly. Instead of
      	hardcoding a large switch statement, just ask Windows for the
      	ISO639 and ISO3166 codes. Tack on @Latn or @Cyrl for those
      	languages which can alternatively be written in Latin or Cyrillic.
      
      
      svn path=/trunk/; revision=5257
      15354468
  3. 27 Dec, 2006 1 commit
  4. 07 Oct, 2006 1 commit
    • Tor Lillqvist's avatar
      g_strdup the keys that we are passed before adding them to the hash · 891fcada
      Tor Lillqvist authored
      2006-10-07  Tor Lillqvist  <tml@novell.com>
      
      	* glib/gwin32.c (get_package_directory_from_module)
      	(g_win32_get_package_installation_directory): g_strdup the keys
      	that we are passed before adding them to the hash tables, to guard
      	against the caller freeing them. (#355955, Andreas Köhler)
      891fcada
  5. 29 Aug, 2006 1 commit
    • Tor Lillqvist's avatar
      Remove support for Windows 9x/ME, as will be done also in Pango and GTK+. · da422c00
      Tor Lillqvist authored
      2006-08-29  Tor Lillqvist  <tml@novell.com>
      
      	Remove support for Windows 9x/ME, as will be done also in Pango
      	and GTK+. GTK+ hasn't worked on Win9x since 2.6 or 2.8 anyway, so
      	it's pretty pointless to keep the Win9x code in here either. If
      	somebody is interested, the code can always be found in older GLib
      	versions, and in CVS.
      
      	* glib/gdir.c
      	* glib/gfileutils.c
      	* glib/gspawn-win32-helper.c
      	* glib/gspawn-win32.c
      	* glib/gstdio.c
      	* glib/gutils.c
      	* glib/gwin32.c
      	* glib/gwin32.h: Remove the G_WIN32_IS_NT_BASED() and
      	G_WIN32_HAVE_WIDECHAR_API() tests and their false (Win9x)
      	branches, and any variables or static functions used only by the
      	Win9x branches.
      
      	* glib/gwin32.c (g_win32_windows_version_init): Call g_error() if
      	run on Win9x.
      da422c00
  6. 19 Oct, 2005 1 commit
  7. 09 Jun, 2005 1 commit
    • Tor Lillqvist's avatar
      glib/gstdio.h glib/gstdio.c Add a chdir() wrapper, too. · f928d834
      Tor Lillqvist authored
      2005-06-09  Tor Lillqvist  <tml@novell.com>
      
      	* glib/gstdio.h
      	* glib/gstdio.c
      	* glib/glib.symbols: Add a chdir() wrapper, too.
      
      	* glib/glib.symbols: Add g_win32_locale_filename_from_utf8().
      
      	* glib/gwin32.c (g_win32_locale_filename_from_utf8): Clarify doc
      	comment.
      f928d834
  8. 01 May, 2005 1 commit
  9. 27 Apr, 2005 1 commit
    • Tor Lillqvist's avatar
      Don't call g_set_error() unless the GError pointer is non-NULL. This · dc11b437
      Tor Lillqvist authored
      2005-04-27  Tor Lillqvist  <tml@novell.com>
      
      	* glib/gconvert.c (open_converter, g_convert_with_iconv): Don't
      	call g_set_error() unless the GError pointer is non-NULL. This
      	avoids infinite recursion problems in certain rare situations on
      	Windows, when g_locale_from_utf8() is called from
      	_glib_get_locale_dir() after the change below. It's the
      	_glib_gettext() calls to translate error messages that are
      	parameters to g_set_error() that cause the recursion, not
      	g_set_error() itself.
      
      	* glib/gwin32.c (g_win32_locale_filename_from_utf8): New
      	function. Converts a filename to the system codepage, and if a
      	straight conversion isn't possible (because the filename contains
      	characters not in the system codepage), try looking up the
      	filename (which should refer to an existing file for this to
      	succeed) with short (8.3) pathname components.
      
      	* glib/gutils.c (_glib_get_locale_dir): No need to cache the
      	result, this function is normally called only once. Return the
      	path to the locale directory in system codepage, not UTF-8. The
      	path is passed to bindtextdomain(), which doesn't use UTF-8 file
      	names. Use g_win32_locale_filename_from_utf8(). (#301772)
      
      	Don't do run-time lookup of message catalog directory on
      	Cygwin. Cygwin is supposed to look and feel like Unix, and on Unix
      	we use paths fixed at configure time.
      dc11b437
  10. 14 Mar, 2005 1 commit
    • Matthias Clasen's avatar
      Make PLT-reduction work with gcc4, and don't include everything in · 608a31b9
      Matthias Clasen authored
      2005-03-13  Matthias Clasen  <mclasen@redhat.com>
      
      	Make PLT-reduction work with gcc4, and don't include
      	everything in galias.h:
      
      	* glib/glib.symbols: Group symbols by header and source file.
      	* glib/makegalias.pl: Protect definitions by the same
      	preprocessor symbols used to guard the headers. Move
      	the alias declarations to a separate file which is
      	produced when calling makegalias.pl -def
      	* glib/Makefile.am (galiasdef.c): Add a rule to generate this
      	file.
      	* glib/*.c: Include galias.h after the other GLib headers,
      	include galiasdef.c at the bottom.
      608a31b9
  11. 09 Jan, 2005 2 commits
  12. 05 Dec, 2004 1 commit
  13. 24 Nov, 2004 1 commit
    • Tor Lillqvist's avatar
      Use wide character API when available. Document that string parameters and · 567bf3a0
      Tor Lillqvist authored
      2004-11-24  Tor Lillqvist  <tml@iki.fi>
      
      	* glib/gwin32.c (g_win32_error_message,
      	get_package_directory_from_module,
      	g_win32_get_package_installation_directory,
      	g_win32_get_package_installation_subdirectory): Use wide character
      	API when available. Document that string parameters and return
      	values are in UTF-8.
      567bf3a0
  14. 31 Oct, 2004 2 commits
  15. 26 Oct, 2004 1 commit
    • Matthias Clasen's avatar
      Make this function thread-safe in the GLib style. · 9b66aa42
      Matthias Clasen authored
      2004-10-26  Matthias Clasen  <mclasen@redhat.com>
      
      	* glib/gwin32.c (g_win32_get_windows_version): Make this
      	function thread-safe in the GLib style.
      	* glib/gthreadinit.h:
      	* glib/gwin32.c (_g_win32_thread_init): New function to
      	initialize the version.
      	* glib/gthread.c (g_thread_init_glib): Call
      	_g_win32_thread_init() from here.
      9b66aa42
  16. 16 Sep, 2004 1 commit
  17. 15 Sep, 2004 1 commit
    • Tor Lillqvist's avatar
      Convert message to UTF-8. Technically this breaks API, but the actual use · 1852bc0d
      Tor Lillqvist authored
      2004-09-15  Tor Lillqvist  <tml@iki.fi>
      
      	* glib/gwin32.c (g_win32_error_message): Convert message to
      	UTF-8. Technically this breaks API, but the actual use cases in
      	gdk/win32 have assumed it is UTF-8 anyway. Fix
      	documentation. (#152618, Kazuki Iwamoto)
      
      	* glib/gwin32.h: Don't define ftruncate as a macro. Was never a
      	good idea, and it clashes with newest mingw headers, which have a
      	ftruncate implementation as an inline function. Thanks to Dominik R.
      
      	* glib/gwin32.c (g_win32_ftruncate): Simplify implementation, just
      	call _chsize() in the C library.
      1852bc0d
  18. 25 Aug, 2004 1 commit
    • Tor Lillqvist's avatar
      New function. Returns the Windows version code like GetVersion(), except · 1de0e063
      Tor Lillqvist authored
      2004-08-25  Tor Lillqvist  <tml@iki.fi>
      
      	* glib/gwin32.c (g_win32_get_windows_version): New
      	function. Returns the Windows version code like GetVersion(),
      	except that one can pretend to be running on Win9x by setting the
      	G_WIN32_PRETEND_WIN9X environment variable. This is mainly for
      	debugging purposed.
      
      	* glib/gwin32.h: Declare it. Define macros G_WIN32_WINDOWS_IS_NT_BASED
      	and G_WIN32_HAVE_WIDECHAR_API to test Windows features at run-time.
      1de0e063
  19. 25 Apr, 2004 1 commit
  20. 10 Apr, 2004 1 commit
  21. 25 Jul, 2003 1 commit
  22. 11 Jun, 2003 1 commit
  23. 04 Dec, 2002 1 commit
  24. 03 Jun, 2002 1 commit
    • Matthias Clasen's avatar
      Replace homegrown "hash" entity by standard ISO entity "num". · a2e3f606
      Matthias Clasen authored
      	* glib/gwin32.c (g_win32_get_package_installation_directory):
      	Replace homegrown "hash" entity by standard ISO entity "num".
      
      	* gobject/gobject-docs.sgml:
      	* glib/glib-docs.sgml:
      	* glib/tmpl/macros.sgml:
      	* glib/tmpl/string_utils.sgml: Replace homegrown "nbsp", "hash"
      	and "percent" entities by standard ISO entities "nbsp", "num" and
      	"percnt".
      a2e3f606
  25. 26 May, 2002 1 commit
    • Matthias Clasen's avatar
      Remove references to nonexisting functions · 5e45a337
      Matthias Clasen authored
      	* glib/gmain.c: Remove references to nonexisting functions
      	g_source_set_callback_closure(), g_source_poll(), g_source_add()
      	from docs.
      
      	* glib/gdir.c (g_dir_open): Typo fix in docs.
      
      	* glib/gasyncqueue.c (g_async_queue_lock):
      	(g_async_queue_unref_and_unlock): Fix markup to avoid erroneous
      	<link>s in docs.
      
      	* glib/gwin32.c: Escape #'s leading to erroneous <link>s in docs.
      
      	* glib/gtree.c: Replace some occurances of Gtree by GTree in docs.
      
      	* glib/gstring.c (g_string_insert_unichar): Typo fix in docs.
      
      	* glib/tmpl/conversions.sgml: Add GIConv.
      
      	* glib/tmpl/main.sgml: Fix references to nonexisting functions
      	g_main_loop_destroy(), g_source_add(), g_source_connect().
      
      	* glib/glib-sections.txt: Add GIConv, g_str_has_prefix, g_str_has_suffix.
      
      	* glib/tmpl/linked_lists_single.sgml:
      	* glib/tmpl/linked_lists_double.sgml: GListAllocator doesn't exist.
      
      	* glib/glib-docs.sgml: Declare hash entity.
      
      	* glib/tmpl/macros.sgml: Escape # in #ifdef to suppress erroneous links.
      
      	* gobject/Makefile.am, gobject/gobject-docs.sgml, gobject/tmpl/*:
      	* glib/Makefile.am, glib/glib-docs.sgml, glib/tmpl/*: Produce XML,
      	not SGML.
      5e45a337
  26. 13 Dec, 2001 1 commit
    • Matthias Clasen's avatar
      Revert mistaken change: it is UNIX, not Unix. · a3d7806b
      Matthias Clasen authored
              * glib/tmpl/completion.sgml, glib/tmpl/date.sgml,
              glib/tmpl/fileutils.sgml, glib/tmpl/iochannels.sgml,
              glib/tmpl/macros.sgml, glib/tmpl/memory.sgml,
              glib/tmpl/misc_utils.sgml, glib/tmpl/warnings.sgml,
              glib/tmpl/windows.sgml: Revert mistaken change: it is UNIX, not Unix.
      
              * glib/tmpl/memory_chunks.sgml,
              glib/tmpl/date.sgml, glib/tmpl/threads.sgml,
              glib/tmpl/gtype.sgml: Trivial markup fixes.
      
              * glib/gconvert.c, glib/giochannel.c, glib/gmain.c,
              glib/gwin32.c: Revert mistaken change: it is UNIX, not Unix.
      a3d7806b
  27. 09 Nov, 2001 1 commit
  28. 08 Nov, 2001 1 commit
    • Tor Lillqvist's avatar
      Don't define LANG_AZERI etc in case those aren't defined in the headers · 4da724f8
      Tor Lillqvist authored
      2001-11-08  Tor Lillqvist  <tml@iki.fi>
      
      	* glib/gwin32.c: Don't define LANG_AZERI etc in case those aren't
      	defined in the headers (MSVC 5.0).
      	(g_win32_getlocale): Instead, surround uses of those with
      	#ifdef. Those MSVC 5.0 users that want to build a GLib that
      	recognizes those languages should download the Platform SDK and
      	use the headers from it.
      
      2001-11-07  Peter Williams  <peterw@ximian.com>
      
      	* glib/gdir.c (g_dir_read_name): Return NULL when done reading.
      4da724f8
  29. 03 Nov, 2001 1 commit
    • Hans Breuer's avatar
      static correctness · 5981d6fe
      Hans Breuer authored
      2001-11-03  Hans Breuer  <hans@breuer.org>
      
      	* glib/giowin32.c : static correctness
      
      	* glib/gwin32.c : some more #if defined (SUBLANG_* ...
      	(g_win32_get_package_installation_subdirectory) use g_build_filename
      	instead of duplicating its logic
      
      	* glib/glib.def : removed duplicates, added mising, removed
      	compat cruft
      5981d6fe
  30. 28 Oct, 2001 1 commit
    • Tor Lillqvist's avatar
      Add missing g_pattern_match_simple and g_pattern_spec_equal. · 9c35df3d
      Tor Lillqvist authored
      2001-10-28  Tor Lillqvist  <tml@iki.fi>
      
      	* glib/glib.def: Add missing g_pattern_match_simple and
      	g_pattern_spec_equal.
      
      	* glib/gwin32.c (g_win32_get_package_installation_subdirectory):
      	Set separator correctly.
      
      	* glib/libcharset/config.charset (os): Match also mingw*.
      
      	* tests/testglib.c (main): (Win32): Print the lib/locale
      	subdirectory, as that is what actually gets used.
      9c35df3d
  31. 22 Oct, 2001 1 commit
    • Tor Lillqvist's avatar
      Add macros G_WIN32_DLLMAIN_FOR_DLL_NAME and G_HARDCODED_PATH_WRAPPER. · 3984621b
      Tor Lillqvist authored
      2001-10-23  Tor Lillqvist  <tml@iki.fi>
      
      	* glib/gutils.h: Add macros G_WIN32_DLLMAIN_FOR_DLL_NAME and
      	G_HARDCODED_PATH_WRAPPER. These are used to avoid hardcoding path
      	names into Windows DLLs.
      
      	* glib/gutils.c: Use them for GLIB_LOCALEDIR.
      
      	* glib/gwin32.c (get_package_directory_from_module): Plug a small
      	memory leak. Minor code reordering.
      	(g_win32_get_package_installation_subdirectory):  Allow empty subdir.
      3984621b
  32. 04 Oct, 2001 1 commit
  33. 03 Oct, 2001 1 commit
    • Tor Lillqvist's avatar
      New function (DLL entry point) to tuck away actual DLL name. · 7ede4e50
      Tor Lillqvist authored
      2001-10-03  Tor Lillqvist  <tml@iki.fi>
      
      	* glib/gutils.c (Win32) (DllMain): New function (DLL entry point)
      	to tuck away actual DLL name.
      	(GLIB_LOCALE_DIR) Use actual DLL name, instead of assuming one
      	naming convention for DLLs.
      
      	* glib/glib.def: g_string_append_printf.
      7ede4e50
  34. 01 Oct, 2001 1 commit
  35. 29 Sep, 2001 1 commit
    • Tor Lillqvist's avatar
      glib/gwin32.c glib/gwin32.h Remove own implementation of dirent functions. · e4e2fc51
      Tor Lillqvist authored
      2001-09-30  Tor Lillqvist  <tml@iki.fi>
      
      	* glib/gwin32.c
      	* glib/gwin32.h
      	* glib/glib.def: Remove own implementation of dirent
      	functions. Instead, gcc (mingw) users should go ahead and use the
      	<dirent.h> included with the mingw gcc, and the dirent functions
      	included in libmingw32, while MSVC users can use the same (public
      	domain) code, extracted from mingw-runtime sources and placed in
      	build/win32/dirent.[ch].
      
      	* glib/gwin32.c (get_package_directory_from_module,
      	g_win32_get_package_installation_directory): Use static lock to
      	protect static hash table.
      e4e2fc51
  36. 27 Sep, 2001 1 commit
    • Bruno Haible's avatar
      When the sublangid is SUBLANG_DEFAULT, return the locale of the language's · 34462896
      Bruno Haible authored
      2001-09-24  Bruno Haible  <haible@clisp.cons.org>
      
      	* glib/gwin32.c (g_win32_getlocale): When the sublangid is
      	SUBLANG_DEFAULT, return the locale of the language's main country,
      	not a country-neutral locale. E.g. "en_US" instead of "en". Add
      	handling of LANG_SORBIAN. Fix typo for SUBLANG_CHINESE_SIMPLIFIED
      	(China == CN, CH == Switzerland). Ignore empty environment
      	variable values.
      
      2001-09-28  Tor Lillqvist  <tml@iki.fi>
      
      	* glib/makefile.{mingw,msc}.in: Add localcharset.o. Just copy the
      	source file from libcharset and compile in this directory.
      
      	* glib/giochannel.c: Mark rest of g_set_error strings for
      	translation, too.
      
      	* glib/giowin32.c: Add some debugging output functions, call them
      	when debugging.
      	(create_events, g_io_win32_msg_write): Free message fetched with
      	g_win32_error_message ().
      	(g_io_win32_check): Indentation fixes.
      	(g_io_win32_fd_read,g_io_win32_sock_read): Don't always return
      	G_IO_STATUS_NORMAL. Do return G_IO_STATUS_EOF if we got 0 bytes,
      	like on Unix. This helps making the test programs run
      	successfully.
      
      	* glib/gmain.c (g_poll): Return the code ifdeffed out with
      	TEST_WITHOUT_THIS. Can't remember why it was ifdeffed out. Things
      	seem to work as previously with the code in place. Especially
      	spawn-test didn't work with the code ifdeffed out (Bug#61067).
      
      	* glib/grand.c (g_rand_new): Don't try to use /dev/urandom unless
      	on Unix.
      
      	* glib/gspawn-win32-helper.c (WinMain): Remove Sleep(10000)
      	accidentally left in.
      
      gthread:
      
      2001-09-28  Tor Lillqvist  <tml@iki.fi>
      
      	* gthread-win32.c: Use an extra level of indirection for GMutex.
      	It is now a pointer either to a pointer to a CRITICAL_SECTION
      	struct, or to a mutex HANDLE. This is needed in case the user
      	defines G_ERRORCHECK_MUTEXES. G_MUTEX_SIZE must correctly reflect
      	the size of *GMutex, but this used to vary depending on whether we
      	at run-time chose to use CRITICAL_SECTIONs or mutexes.
      	(g_mutex_free_win32_cs_impl, g_cond_free_win32_impl): Call
      	DeleteCriticalSection() when done with it.
      
      	* gthread-impl.c (g_thread_init_with_errorcheck_mutexes): Call
      	g_thread_impl_init() before accessing
      	g_thread_functions_for_glib_use_default, as the
      	g_thread_impl_init() function might modify it.
      
      po:
      
      2001-09-28  Tor Lillqvist  <tml@iki.fi>
      
      	* POTFILES.in: Add iochannel.c and giowin32.c.
      
      	* sv.po: Remove a bogus fuzziness indicator.
      34462896
  37. 21 Sep, 2001 1 commit
    • Hans Breuer's avatar
      added rule for glibconfig.h · fdc27bb8
      Hans Breuer authored
      2001-09-21  Hans Breuer  <hans@breuer.org>
      
      	* makefile.msc : added rule for glibconfig.h
      
      	* glib/giowin32.c (g_io_channel_new_file) : always open
      	in binary mode
      
      	* glib/glib.def : updated externals
      
      	* glib/gwin32.c : re-added LANG_* and SUBLANG_* definitions,
      	which are missing from the msvc 5.0 win32 sdk
      
      	* glib/makefile.msc.in : added gbsearcharry
      fdc27bb8
  38. 20 Sep, 2001 1 commit
    • Tor Lillqvist's avatar
      Accept also forward slashes. (But still don't accept them in the other · 58f3fdd7
      Tor Lillqvist authored
      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.
      58f3fdd7