1. 13 Sep, 2008 1 commit
    • Tor Lillqvist's avatar
      glib/gutils.h Deprecate G_WIN32_DLLMAIN_FOR_DLL_NAME(), · e55fca95
      Tor Lillqvist authored
      2008-09-13  Tor Lillqvist  <tml@novell.com>
      
      	* glib/gutils.h
      	* glib/gwin32.h: Deprecate G_WIN32_DLLMAIN_FOR_DLL_NAME(),
      	g_win32_get_package_installation_directory() and
      	g_win32_get_package_installation_subdirectory() as their
      	documentation has warned for a while. Sorry that I forgot to do
      	this before 2.18.0.
      
      	* glib/gwin32.c (g_win32_get_package_installation_directory):
      	Print a warning if a non-NULL package parameter is passed to this
      	function, as that is deprecated usage, as the documentation says.
      
      
      svn path=/trunk/; revision=7480
      e55fca95
  2. 05 May, 2008 1 commit
    • Michael Natterer's avatar
      #define __GLIB_H_INSIDE__ around including everything. · e0aa9d8a
      Michael Natterer authored
      2008-05-05  Michael Natterer  <mitch@imendio.com>
      
      	* glib/glib.h: #define __GLIB_H_INSIDE__ around including
      	everything.
      
      	* glib/*.h: check for that define instead of __G_LIB_H__ if
      	G_DISABLE_SINGLE_INCLUDES is defined.
      
      	* glib/gdatasetprivate.h: #include <glib.h> instead of
      	<glib/gdataset.h>
      
      
      svn path=/trunk/; revision=6875
      e0aa9d8a
  3. 14 Mar, 2008 1 commit
    • Michael Natterer's avatar
      make it possible to disable single-file includes by defining · f4bb21aa
      Michael Natterer authored
      2008-03-14  Michael Natterer  <mitch@imendio.com>
      
      	* glib/*.h: make it possible to disable single-file includes by
      	defining G_DISABLE_SINGLE_INCLUDES when building against GLib.
      	Approved by Tim Janik.
      
      	* glib/glib.h: include <glib/gslice.h>.
      
      	* glib/gi18n.h
      	* glib/gi18n-lib.h
      	* glib/gprintf.h: include <glib.h> so the above works when these
      	files are included without including <glib.h> first.
      
      
      svn path=/trunk/; revision=6713
      f4bb21aa
  4. 24 Feb, 2008 1 commit
    • Tor Lillqvist's avatar
      New function. Supersedes g_win32_get_package_installation_directory() and · 3af00194
      Tor Lillqvist authored
      2008-02-24  Tor Lillqvist  <tml@novell.com>
      
      	* glib/gwin32.c
      	(g_win32_get_package_installation_directory_of_module): New
      	function. Supersedes g_win32_get_package_installation_directory()
      	and g_win32_get_package_installation_directory().
      
      	It makes more sense to have the function for this functionality
      	take a HMODULE as parameter instead of DLL name. The typical use
      	scenario has been to have a DllMain() function that retrieves the
      	full pathname for the DLL in question, and saves just the basename
      	of that. Then later code passes that saved dll basename to
      	g_win32_get_package_installation_directory(), which retrieves the
      	corresponding DLL handle, and then retrieves up its full
      	pathname. (Which DLlMain() already had.) It is less convoluted to
      	have a DllMain() that just saves the DLL handle, and then when
      	needed call this function to get the corresponding installation
      	folder.
      
      	(get_package_directory_from_module): Use
      	g_win32_get_package_installation_directory_of_module().
      
      	(g_win32_get_package_installation_directory)
      	(g_win32_get_package_installation_subdirectory): Mention these
      	functions will be deprecated and recommend using
      	g_win32_get_package_installation_directory_of_module() instead.
      	
      	* glib/gwin32.h: Declare
      	g_win32_get_package_installation_directory_of_module().
      
      	* glib/glib.symbols: Add it.
      
      
      svn path=/trunk/; revision=6569
      3af00194
  5. 13 May, 2007 1 commit
    • Tor Lillqvist's avatar
      Drop the pipe() macro. Defining macros outside of its namespace that look · 20d47d6f
      Tor Lillqvist authored
      2007-05-13  Tor Lillqvist  <tml@novell.com>
      
      	* glib/gwin32.h: Drop the pipe() macro. Defining macros outside of
      	its namespace that look like POSIX functions is not GLib's
      	business in my opinion. This means pipe()-using code that has
      	relied on this definition will need changing to call _pipe() on
      	Windows, and make the decision itself on what size pipe buffer to
      	use, and whether to use text or binary mode, and whether the pipe
      	handles should be inheritable or not.
      
      	* glib/gspawn-win32.c (make_pipe): Use _pipe() instead of pipe().
      
      
      svn path=/trunk/; revision=5490
      20d47d6f
  6. 27 Dec, 2006 1 commit
  7. 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
  8. 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
  9. 02 Feb, 2005 2 commits
  10. 05 Dec, 2004 1 commit
  11. 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
  12. 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
  13. 02 Jan, 2003 1 commit
  14. 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
  15. 26 Jun, 2001 1 commit
    • Owen Taylor's avatar
      Move glib library into a subdirectory, make all GLib include files include · 2fd6b001
      Owen Taylor authored
      Tue Jun 26 11:43:46 2001  Owen Taylor  <otaylor@redhat.com>
      
      	* configure.in Makefile.am *.[ch] glib/*.[ch] glib/Makefile.am:
      	Move glib library into a subdirectory, make all GLib include
      	files include as <glib/glist.h>
      
      	* tests/testglib.c tests/testgdate.c tests/testgdateparser.c
      	  tests/timeloop.c tests/timeloop-basic.c: Move all tests into
      	the tests/ subdirectory.
      2fd6b001
  16. 09 Mar, 2001 1 commit
    • Tor Lillqvist's avatar
      Cygwin support contributed by Stefan Ondrejicka <ondrej@idata.sk>. · 754d8dda
      Tor Lillqvist authored
      2001-02-21  Tor Lillqvist  <tml@iki.fi>
      
      	Cygwin support contributed by Stefan Ondrejicka
      	<ondrej@idata.sk>. Hopefully I got it all in while simultaneously
      	adding support for auto*/libtool for mingw.
      
      	* Makefile.am: Changes for auto* support on Cygwin and Win32. Do
      	still distribute the hand-written makefiles and *.win32.in files,
      	though. Use GIO, GSPAWN and PLATFORMDEP macros set by configure.
      	Use -no-undefined. Pass -export-symbols glib.def to libtool.
      
      	* configure.in: Define G_PLATFORM_WIN32 on both pure Win32 (mingw)
      	and Cygwin. Add AC_CYGWIN, AC_EXEEXT and AC_LIBTOOL_WIN32_DLL
      	calls for Cygwin and mingw support.  Check for %I64u guint64
      	format (in MS C library). Set G_MODULE_IMPL on mingw and
      	Cygwin. Use ac_object and ac_exeext.  Set GIO, GSPAWN, PLATFORMDEP
      	and G_LIBS_EXTRA. Compile timeloop only on Unix. Define OS_WIN32
      	automake conditional on Win32.
      
      	* glib.h: Include gwin32.h also on Cygwin.
      
      	* gfileutils.c (get_contents_posix): Use O_BINARY (defined as 0 on
      	Unix) for Cygwin's sake.
      
      	* gtimer.c (GETTIME): Reduce #ifdefs, use a macro GETTIME().
      
      	* gconvert.c
      	* gthread.c
      	* gutf8.c
      	* gutils.c: For code needed both on Cygwin and native Win32,
      	test for G_PLATFORM_WIN32.
      
      	* gmarkup.h: Use G_BEGIN_DECLS and G_END_DECLS.
      
      	* gtypes.h: Refine GLIB_VAR definition. Also check for DLL_EXPORT
      	in case compiling a static library on Win32 or Cygwin.
      
      	* gwin32.c: No <direct.h> on Cygwin. No need for ftruncate() or
      	dirent emulation on Cygwin.
      	(get_package_directory_from_module) Convert return value from
      	GetModuleFileName() to POSIX path on Cygwin.
      
      	* tests/Makefile.am (progs_LDADD): Link with libglib, libgthread
      	and libgmodule as appropriate. Use -no-undefined.
      
      	* gbacktrace.c: Move #ifdefs around a bit on Win32.
      
      	* gshell.c (unquote_string_inplace): Make static.
      
      	* testglib.c: Make some vars static. Add Cygwin path tests.
      754d8dda
  17. 17 Feb, 2001 1 commit
    • Havoc Pennington's avatar
      include string.h · 1c391cc6
      Havoc Pennington authored
      2001-02-17  Havoc Pennington  <hp@pobox.com>
      
      	* gthread.c: include string.h
      
              Applied patch from Soeren Sandmann:
      
      	* testglib.c: const fixes
      
      	* gwin32.h: format cleanups
      
      	* gutils.c (g_atexit): constify a variable
      	(g_find_program_in_path): constification
      	(g_basename): G_CONST_RETURN
      	(g_path_skip_root): G_CONST_RETURN
      	(g_getenv): G_CONST_RETURN
      	(g_get_user_name): G_CONST_RETURN
      	(g_get_real_name): G_CONST_RETURN
      	(g_get_home_dir): G_CONST_RETURN
      	(g_get_tmp_dir): G_CONST_RETURN
      	(g_get_prgname): G_CONST_RETURN
      	(_glib_gettext): G_CONST_RETURN
      
      	* gunicode.h: formatting cleanups
      
      	* gstrfuncs.c (g_strerror): G_CONST_RETURN
      	(g_strsignal): G_CONST_RETURN
      
      	* gspawn.c (g_execute): const on variables
      
      	* gmessages.c (printf_string_upper_bound): fix const on a variable
      
      	* gmem.c (g_mem_chunk_new): make the "name" arg const
      	(struct _GRealMemChunk): make the "name" field const
      
      	* gfileutils.c (g_file_open_tmp): store const return in a const
      	gchar* variable
      
      	* gdataset.c (g_quark_to_string): G_CONST_RETURN
      
      2001-02-17  Havoc Pennington  <hp@pobox.com>
      
              Applied patch from Soeren Sandmann:
      
      	* gvaluetypes.c (g_value_get_string): G_CONST_RETURN
      
      	* gtype.c (g_type_name): G_CONST_RETURN
      
      	* gsignal.c (g_signal_name): G_CONST_RETURN
      
      	* gobject-query.c (main): const fix
      
      2001-02-17  Havoc Pennington  <hp@pobox.com>
      
              Applied patch from Soeren Sandmann:
      
      	* gmodule.c (g_module_error): G_CONST_RETURN
      	(g_module_name): G_CONST_RETURN
      1c391cc6
  18. 17 Jan, 2001 1 commit
    • Tor Lillqvist's avatar
      Add doc comments. (g_win32_get_package_installation_directory): Add one · 69dbd6eb
      Tor Lillqvist authored
      2001-01-17  Tor Lillqvist  <tml@iki.fi>
      
      	* gwin32.c (g_win32_getlocale, g_win32_error_message): Add doc
      	comments.
      	(g_win32_get_package_installation_directory): Add one parameter,
      	the name of a DLL in the package. Add possibility to use that to
      	deduce the installation directory if not entered into the
      	Registry. Make the return value dynamically allocated.
      	(g_win32_get_package_installation_subdirectory): New convenience
      	function.
      
      	* gutils.c (GLIB_LOCALE_DIR)
      	* gwin32.h: Adapt accordingly.
      
      	* testglib.c (main): Adapt tests accordingly.
      69dbd6eb
  19. 16 Jan, 2001 1 commit
    • Tor Lillqvist's avatar
      Define ENABLE_NLS and GETTEXT_PACKAGE. · a9d05d4c
      Tor Lillqvist authored
      2001-01-17  Tor Lillqvist  <tml@iki.fi>
      
      	* config.h.win32.in: Define ENABLE_NLS and GETTEXT_PACKAGE.
      
      	* makefile.mingw.in
      	* makefile.msc.in: Use the GNU intl library.
      
      	* gwin32.c (g_win32_get_package_installation_directory): New
      	function. To be used by various GLib-using packages to get their
      	installation directory, which should be stored in the Registry by
      	some installer.
      
      	* gwin32.h: Declare it.
      
      	* testglib.c (main): Test it.
      
      	* gutils.c: On Win32, define GLIB_LOCALE_DIR using
      	g_win32_get_package_installation_directory().
      
      	* glib.def: Update.
      a9d05d4c
  20. 14 Nov, 2000 1 commit
  21. 19 Oct, 2000 1 commit
    • Tor Lillqvist's avatar
      Pass -DGSPAWN_HELPER when building it. Link with user32.lib. · 4905022b
      Tor Lillqvist authored
      2000-10-19  Tor Lillqvist  <tml@iki.fi>
      
      	* makefile.msc.in: Pass -DGSPAWN_HELPER when building it. Link
      	with user32.lib.
      
      	* gspawn-win32.c
      	* gfileutils.c: Make them compile with picky MSVC.
      
      	* gwin32.h: New file. Move Win32-only stuff that isn't related to
      	GIOChannels here from giochannel.h.
      
      	* Makefile.am: Add it here.
      
      	* giochannel.h: Move stuff to gwin32.h.
      
      	* glib.h: On Win32, include gwin32.h.
      4905022b