1. 03 Jan, 2005 1 commit
  2. 01 Jan, 2005 1 commit
    • Tor Lillqvist's avatar
      glib/glib.symbols glib/gutils.h Make also g_getenv(), g_setenv(), · 714887d0
      Tor Lillqvist authored
      2005-01-01  Tor Lillqvist  <tml@iki.fi>
      
      	* glib/glib.symbols
      	* glib/gutils.h
      	* glib/gutils.c: Make also g_getenv(), g_setenv(), g_unsetenv()
      	and g_find_program_in_path() take and return UTF-8 strings on
      	Win32. Implement DLL ABI backward compatility for them, too. Move
      	all the DLL ABI stability wrappers to the end of the file. Use
      	wide character API when available in inner_find_program_in_path().
      
      	* glib/gfileutils.c: With the UTF-8ness of g_getenv() above, just
      	use g_getenv() to get PATHEXT. (Yeah, it's probably overdoing it
      	to consider somebody actually having anything else than ASCII
      	in PATHEXT, but...)
      714887d0
  3. 31 Dec, 2004 1 commit
    • Tor Lillqvist's avatar
      Rewrite the Win32 version to use GetFileAttributes() instead of stat(). · 7e6be89c
      Tor Lillqvist authored
      2004-12-31  Tor Lillqvist  <tml@iki.fi>
      
      	* glib/gfileutils.c (g_file_test): Rewrite the Win32 version to
      	use GetFileAttributes() instead of stat(). stat() is unreliable
      	for corner cases like '\\server\share' or '.\'. Part of fixing
      	#161797. When testing for executability, in addition to the fixed
      	set of executable file name extensions also check the PATHEXT
      	environment variable.
      7e6be89c
  4. 30 Dec, 2004 1 commit
  5. 04 Nov, 2004 1 commit
    • Tor Lillqvist's avatar
      Document that the result is guaranteed to be non-NULL. · 912ba0d4
      Tor Lillqvist authored
      2004-11-04  Tor Lillqvist  <tml@iki.fi>
      
      	* glib/gconvert.c (g_filename_display_name): Document that the
      	result is guaranteed to be non-NULL.
      
      	* glib/gfileutils.c (get_contents_stdio, get_contents_regfile,
      	get_contents_posix, get_contents_win32, g_file_open_tmp,
      	g_file_read_link): Use g_filename_display_name() for error
      	messages.
      	(g_mkstemp): Document that the template should be in the GLib file
      	name encoding.
      	(g_file_open_tmp): Ditto. Also document that the actual name
      	returned is also in the GLib file name encoding.
      912ba0d4
  6. 27 Oct, 2004 1 commit
    • Matthias Clasen's avatar
      Introduce the idea of a filename encoding, which is *literally* the · 8a7eecd7
      Matthias Clasen authored
      2004-10-27  Matthias Clasen  <mclasen@redhat.com>
      
      	Introduce the idea of a filename encoding, which is
      	*literally* the filename encoding on Unix. On windows,
      	use the Unicode name converted to UTF-8. (#156325,
      	Tor Lillqvist, Owen Taylor)
      
      	* glib/gdir.[hc]:
      	* glib/gconvert.[hc]:
      	* glib/gfileutils.[hc]:
      	* glib/gutils.[hc]:
      	* glib/giowin32.c: On Windows, keep old ABI versions
      	of GLib pathname api for DLL ABI stability. Use different
      	names for the new-style UTF-8 versions. Hide this through
      	a #define.
      
      	* glib/gstdio.[hc]: New files containing wrappers for
      	POSIX pathname api.
      
      	* glib/glib.symbols: Add new symbols.
      
      	* glib/makegalias.pl: Drop Win32 specific .def syntax,
      	include gstdio.h
      8a7eecd7
  7. 25 Oct, 2004 1 commit
    • Manish Singh's avatar
      rm autom4te.cache, since it might interfere with differing autoconf · 5c38cfa5
      Manish Singh authored
      Mon Oct 25 15:05:18 2004  Manish Singh  <yosh@gimp.org>
      
              * autogen.sh: rm autom4te.cache, since it might interfere with
              differing autoconf versions.
      
              * tests/child-test.c: use GINT_TO_POINTER for g_child_watch_add
              user data.
      
              * glib/gfileutils.c: G_IS_DIR_SEPARATOR is defined in gutils.h now,
              don't redefine it here.
      5c38cfa5
  8. 06 Oct, 2004 1 commit
  9. 30 Sep, 2004 1 commit
  10. 16 Sep, 2004 1 commit
  11. 27 Aug, 2004 1 commit
    • Matthias Clasen's avatar
      Fix #151193, Stepan Kasal: · 981fe434
      Matthias Clasen authored
      2004-08-27  Matthias Clasen  <mclasen@redhat.com>
      
      	Fix #151193, Stepan Kasal:
      
      	* glib/gfileutils.c (g_file_error_from_errno):
      	* glib/gfileutils.h (enum GFileError): Add G_FILE_ERROR_NOSYS.
      981fe434
  12. 14 Dec, 2003 1 commit
  13. 16 Aug, 2003 1 commit
    • Tor Lillqvist's avatar
      Fix #117925 (Dov Grobgeld): · 55d624d8
      Tor Lillqvist authored
      2003-08-16  Tor Lillqvist  <tml@iki.fi>
      
      	Fix #117925 (Dov Grobgeld):
      
      	* glib/gutils.c (g_find_program_in_path, g_basename,
      	g_path_get_basename, g_path_is_absolute, g_path_skip_root,
      	g_path_get_dirname, g_get_any_init): On Win32, look also for
      	slashes ('/') as pathname separators.
      
      	* glib/gfileutils.c (g_file_open_tmp): Ditto. If the template
      	contains a pathname separator, include the actual one in the error
      	message, instead of always the canonical one.
      
      	(g_build_filename): Separate implementation on Win32 that looks
      	for either slash or backslash. Document Unix/Windows differences.
      
      	* tests/testglib.c
      	* tests/strfunc-test.c: Test above functionality on Win32.
      55d624d8
  14. 29 Jul, 2003 2 commits
  15. 28 Jul, 2003 1 commit
  16. 25 Jul, 2003 1 commit
  17. 11 Dec, 2002 1 commit
    • Tor Lillqvist's avatar
      Fix off-by-one error. (#100853) · 12bc3d82
      Tor Lillqvist authored
      2002-12-11  Tor Lillqvist  <tml@iki.fi>
      
      	* glib/gtimer.c (g_timer_elapsed): Fix off-by-one error. (#100853)
      
      	* glib/gfileutils.c (g_file_test): Bypass extra test for root on
      	Win32.
      
      	* glib/glib.def: Add g_{get,set}_application_name.
      12bc3d82
  18. 09 Dec, 2002 1 commit
    • Owen Taylor's avatar
      Guard against the POSIX allowed behavior where access (file, X_OK) · 87f9f151
      Owen Taylor authored
      Sun Dec  8 23:36:12 2002  Owen Taylor  <otaylor@redhat.com>
      
              * glib/gfileutils.c (g_file_test): Guard against
              the POSIX allowed behavior where access (file, X_OK)
              succeeds for uid==0 when no executable bits are set.
      
              * glib/gfileutils.c (g_file_test): Add doc notes
              about the possibility of race conditions, and the
              fact that EXISTS and IS_EXECUTABLE give results
              for the real uid not the effective user ID.
              (#81854, Morten Welinder.)
      87f9f151
  19. 25 Nov, 2002 1 commit
  20. 26 Jul, 2002 1 commit
    • Owen Taylor's avatar
      hu Jul 25 14:23:15 2002 Owen Taylor <otaylor@redhat.com> · 8dd32f57
      Owen Taylor authored
              * glib/gfileutils.c: Clarify the behavior of g_build_path()
              for empty elements and for leading and trailing copies
              of the separator in the docs.
      
              * glib/gfileutils.c: Fix problems with leading elements
              consisting only of "/" characters. (#85928, Guillaume Chazarain)
      
              * tests/strfunc-test.c (main): Add more test cases
              for g_build_filename().
      8dd32f57
  21. 20 May, 2002 1 commit
    • Owen Taylor's avatar
      Fix double close of file descriptor on error. (#82139, Wayne Schuller) · 81ad1bb2
      Owen Taylor authored
      Mon May 20 15:35:59 2002  Owen Taylor  <otaylor@redhat.com>
      
              * glib/gfileutils.c (get_contents_regfile): Fix double
              close of file descriptor on error. (#82139, Wayne Schuller)
      
              * glib/gspawn.c (close_and_invalidate): Don't close
              fd's that have already been closed. (Fix from Michael
              Meeks, #81959)
      
              * glib/giochannel.c (g_io_channel_close): If not flushing,
              dump the contents of the write buffers, so we won't try
              to write them to an invalid fd later. (Patch from Ron Steinke,
              fixing #78290, Andreas Persenius.)
      81ad1bb2
  22. 20 Mar, 2002 1 commit
  23. 08 Mar, 2002 1 commit
    • Owen Taylor's avatar
      Final updates for 2.0.0 · cef5d28c
      Owen Taylor authored
      Fri Mar  8 10:20:46 2002  Owen Taylor  <otaylor@redhat.com>
      
              * NEWS: Final updates for 2.0.0
      
              * glib/gstrfuncs.c: Convert the results of strerror()
              and strsignal() to UTF-8.
      
              * glib/gconvert.c glib/gdir.c glib/giochannel.c glib/giounix.c
              glib/giowin32.c: Use g_strerror(), not strerror().
      cef5d28c
  24. 10 Feb, 2002 1 commit
  25. 08 Feb, 2002 1 commit
  26. 07 Feb, 2002 1 commit
  27. 20 Dec, 2001 1 commit
    • Matthias Clasen's avatar
      Remove FIXME. (#67063) · 9504ea2f
      Matthias Clasen authored
              * glib/gfileutils.c (g_file_get_contents): Remove FIXME. (#67063)
      
              * glib/glib-sections.txt: Move g_get_charset() to the
              Charset conversion section. (#65630)
      9504ea2f
  28. 18 Dec, 2001 1 commit
  29. 16 Dec, 2001 1 commit
    • Matthias Clasen's avatar
      Minor markup fixes. · a52e2986
      Matthias Clasen authored
      
              * glib/gshell.c, glib/gspawn.c, glib/gspawn-win32.c, glib/gerror.c,
              glib/gfileutils.c, glib/ghash.c, glib/gmain.c, glib/gasyncqueue.c,
              glib/gtree.c: Minor markup fixes.
      
              * glib/tmpl/caches.sgml: GCs are cached by GTK, not by GDK.
      a52e2986
  30. 18 Sep, 2001 1 commit
    • Tim Janik's avatar
      add simple test for g_path_get_basename(). · 71075ee0
      Tim Janik authored
      Tue Sep 18 18:19:33 2001  Tim Janik  <timj@gtk.org>
      
              * tests/testglib.c: add simple test for g_path_get_basename().
      
              * glib/gfileutils.c (g_file_open_tmp):
              * glib/gstrfuncs.c (g_strerror): scratch erroneous usages
              of "illegal".
      71075ee0
  31. 10 Sep, 2001 2 commits
    • Owen Taylor's avatar
      Doc fixes. · 16fc3b22
      Owen Taylor authored
      Mon Sep 10 11:42:58 2001  Owen Taylor  <otaylor@redhat.com>
      
              * glib/gutf8.c glib/gstring.c glib/gfileutils.c glib/gmain.c:
              Doc fixes.
      16fc3b22
    • Owen Taylor's avatar
      Add g_build_path(), g_build_filename(), to create separated paths, · 9393fc89
      Owen Taylor authored
      Sat Sep  8 17:14:51 2001  Owen Taylor  <otaylor@redhat.com>
      
              * glib/gfileutils.[ch]: Add g_build_path(),
              g_build_filename(), to create separated paths,
              suppressing duplicate separators, from varargs
              lists.
      
              * tests/strfunc-test.c: Add tests for g_build_path(),
              g_build_filename().
      9393fc89
  32. 19 Jul, 2001 1 commit
  33. 23 Jun, 2001 1 commit
    • Owen Taylor's avatar
      Changes for 64-bit cleanliness, loosely based on patch from Mark Murnane. · f5c28ce4
      Owen Taylor authored
      Wed Jun 20 12:00:54 2001  Owen Taylor  <otaylor@redhat.com>
      
              Changes for 64-bit cleanliness, loosely based on patch
      	from Mark Murnane.
      
      	* gconvert.c (g_convert/g_convert_with_fallback): Remove
      	workarounds for since-fixed GNU libc bugs. Minor
      	doc fix.
      
      	* gconvert.[ch]: Change gint to gsize/gssize as
      	appropriate.
      
      	* gconvert.c (g_locale/filename_to/from_utf8): Fix incorrect
      	computation of bytes_read / bytes_written.
      
      	* gfileutils.[ch] (g_file_get_contents): Make length
      	out parameter 'gsize *len'.
      
      	* ghook.c (g_hook_compare_ids): Don't compare a
      	and b as 'a - b'.
      
      	* gmacros.h (GSIZE_TO_POINTER): Add GPOINTER_TO_SIZE,
      	GSIZE_TO_POINTER.
      
      	* gmain.c (g_timeout_prepare): Rewrite to avoid
      	overflows. (Fixes bug when system clock skews
      	backwards more than 24 days.)
      
      	* gmarkup.[ch]: Make lengths passed to callbacks
      	gsize, length for g_markup_parse-context_parse(),
      	g_markup_escape_text() gssize.
      
      	* gmessages.[ch] (g_printf_string_upper_bound): Change
      	return value to gsize.
      
      	* gmessages.c (printf_string_upper_bound): Remove
      	a ridiculous use of 'inline' on a 300 line function.
      
      	* gstring.[ch]: Represent size of string as a gsize,
      	not gint. Make parameters to functions take gsize,
      	or gssize where -1 is allowed.
      
      	* gstring.c (g_string_erase): Make
      	g_string_erase (string, pos, -1) a synonym for
      	g_string_truncate for consistency with other G*
      	APIs.
      
      	* gstrfuncs.[ch]: Make all functions taking a string
      	length, take a gsize, or gssize if -1 is allowed.
      	(g_strstr_len, g_strrstr_len). Also fix some boundary
      	conditions in g_str[r]str[_len].
      
      	* gutf8.c tests/unicode-encoding.c: Make parameters that
      	are byte lengths gsize, gssize as appropriate. Make
      	character offsets, other counts, glong.
      
      	* gasyncqueue.c gcompletion.c
                timeloop.c timeloop-basic.c gutils.c gspawn.c.
      	Small 64 bit cleanliness fixups.
      
      	* glist.c (g_list_sort2, g_list_sort_real): Fix functions
      	that should have been static.
      
      	* gdate.c (g_date_fill_parse_tokens): Fix extra
      	declaration that was shadowing another.
      
      	* tests/module-test.c: Include string.h
      
      Mon Jun 18 15:43:29 2001  Owen Taylor  <otaylor@redhat.com>
      
      	* gutf8.c (g_get_charset): Make argument
      	G_CONST_RETURN char **.
      f5c28ce4
  34. 16 Apr, 2001 1 commit
    • Havoc Pennington's avatar
      docs · 4eab8758
      Havoc Pennington authored
      2001-04-16  Havoc Pennington  <hp@redhat.com>
      
              * gqsort.c: docs
      
              * gfileutils.c: docs
      
              * gwin32.c: docs fixes
      
              * gconvert.c: docs
      
              * guniprop.c: docs
      
              * gutf8.c: docs
      4eab8758
  35. 09 Mar, 2001 1 commit
    • Tor Lillqvist's avatar
      Cygwin support contributed by Stefan Ondrejicka <ondrej@idata.sk>. · 5c00c349
      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.
      
      	* 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.
      5c00c349
  36. 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
  37. 19 Jan, 2001 1 commit
    • Kjartan Maraas's avatar
      Fix typo. Same here. · 59ce6334
      Kjartan Maraas authored
      2001-01-19  Kjartan Maraas  <kmaraas@gnome.org>
      
      	* gconvert.c: Fix typo.
      	* gfileutils.c: Same here.
      59ce6334
  38. 16 Jan, 2001 1 commit
    • Owen Taylor's avatar
      Add gettext support. · b8796462
      Owen Taylor authored
      Mon Jan 15 21:12:49 2001  Owen Taylor  <otaylor@redhat.com>
      
              * configure.in acconfig.h glibintl.h gutils.c
      	po/{Makefile.in.in,POTFILES.in,po2tbl.in}: Add gettext
      	support.
      
      	* glib-gettext.m4 acinclude.m4: Clean up the GTK+ gettext macros
      	some more and put them in this file, though they also need
      	to be included in acinclude.m4 due to the brokeness of
      	aclocal.
      
      	* gspawn.c gspawn-win32.c gutf8.c gconvert.c gfileutils.c
      	gshell.c: Remove dummy _() #defines, include glibintl.m4.
      b8796462