2007-05-02 Marco Barisione <marco@barisione.org>
* glib/gregex.c: Made more clear that the string passed to the match
functions cannot be freed before using g_match_info_fetch() and
similar functions, and fixed a typo.
svn path=/trunk/; revision=5474
2007-04-30 Chris Wilson <chris@chris-wilson.co.uk>
* glib/gbookmarkfile.c (g_bookmark_file_get_app_info):
Include the gshell.h header file (to define g_shell_[un]quote)
and correct the order of the arguments to g_propagate_error(), as
spotted by gcc.
svn path=/trunk/; revision=5467
2007-04-29 Emmanuele Bassi <ebassi@gnome.org>
* glib/gbookmarkfile.c:
(g_bookmark_file_set_app_info): Quote the passed command line...
(g_bookmark_file_get_app_info): ... and unquote it when giving it
back. (#432274)
svn path=/trunk/; revision=5466
2007-04-27 Tor Lillqvist <tml@novell.com>
* glib/gstdio.c (g_mkdir): Document that the mode argument is
ignored on Windows
(g_stat): Document that st_mode is mostly useless on Windows.
svn path=/trunk/; revision=5463
2007-04-25 Michael Natterer <mitch@imendio.com>
* gparamspecs.c (param_string_validate): also clear the
NOCOPY_CONTENTS flag when replacing NULL with the empty string.
svn path=/trunk/; revision=5458
2007-04-24 Matthias Clasen <mclasen@redhat.com>
* glib/glib.symbols:
* glib/goption.h:
* glib/goption.c (g_option_context_get_help): New function to
get the formatted help string. (#336089, Dom Lachowicz)
svn path=/trunk/; revision=5456
2007-04-24 Michael Natterer <mitch@imendio.com>
* gobject/gparamspecs.c (param_string_validate): don't free or
modify static strings, dup them when needed and clear the
G_VALUE_NOCOPY_CONTENTS flag. Fixes bug #432895.
* tests/gobject/paramspec-test.c: test all GParamSpecString
validations with static and allocated strings.
svn path=/trunk/; revision=5454
2007-04-19 William Jon McCann <mccann@jhu.edu>
* glib/gkeyfile.[ch]: (find_file_in_data_dirs),
(g_key_file_load_from_dirs), (g_key_file_load_from_data_dirs):
Add g_key_file_load_from_dirs for looking through a search
path for a key-file. (#355334)
svn path=/trunk/; revision=5453
2007-04-11 Emmanuele Bassi <ebassi@gnome.org>
* glib/ghash.[ch]: Add g_hash_table_get_keys() and
g_hash_table_get_values(), API to retrieve the keys
and values inside an hash table in list form. (#413133)
* glib/glib.symbols: Update symbols.
* tests/hash-test.c: Exercise newly added functions.
svn path=/trunk/; revision=5444
2007-04-11 Matthias Clasen <mclasen@redhat.com>
* configure.in: Use CFLAGS/LDFLAGS in addition to
PCRE_CFLAGS/PCRE_LIBS when checking system PCRE. (#421607,
Paul Jarc)
svn path=/trunk/; revision=5443
2007-03-22 Chris Wilson <chris@chris-wilson.co.uk>
* glib/gkeyfile.c: Track whether the last key=value pair in a group
is a blank line and during to_data() only insert a new blank line
betweens group in its absence. This allows the beautification of the
GKeyFile and prevents newlines being inserted indefinitely. (#420686)
* tests/keyfile-test.c (test_reload_idempotency): Test that after a
single beautification pass, g_key_file_to_data() does not alter its
input data.
svn path=/trunk/; revision=5431
2007-03-17 Marco Barisione <marco@barisione.org>
* glib/update-pcre/table-reduction.patch:
* glib/update-pcre/make_utt.py:
* glib/update-pcre/utt.patch: Add forgotten files
* glib/update-pcre/update.sh: Call python directly instead of relying
on shebang. Also copy the changes from glib/pcre/makefile.msc to this
file
svn path=/trunk/; revision=5425
2007-03-17 Hans Breuer <hans@breuer.org>
* glib/makefile.msc.in glib/pcre/makefile.msc
glib/update-pcre/update.sh : define PCRE_STATIC to reflect the
inclusion of pcre as LIB, not stand-alone DLL. Also set NEWLINE=-1
to match any newline by default, use of ../../build/win32/make.msc
* glib/gregex.h : minimal includes of <glib/*.H> instead of <glib.h>
* glib/gnulib/makefile.msc : make use of ../../build/win32/make.msc
* tests/regex-test.c(verbose): don't pass a string containing '%'
as first parameter to g_print ()
(test_match) : for the unexpected case output pattern and string
escaped
* tests/child-test.c tests/slice-color.c : fix c99ism
* tests/slice-test.c : fix c99ism and gccism
* tests/mapping-test.c tests/base-64-tests.c : don't
#include <unistd.h> unconditionally
* tests/option-test.c : use G_GINT64_CONSTANT() instead of direct LL
* tests/makefile.msc.in : more tests build
svn path=/trunk/; revision=5423
2007-03-16 Matthias Clasen <mclasen@redhat.com>
* glib/gbase64.c (g_base64_decode): Warn if the input
is too short. (#418862, Halton Huo)
svn path=/trunk/; revision=5417
Fri Mar 16 11:24:51 2007 Tim Janik <timj@imendio.com>
* glib/gscanner.[hc]: reverted premature commit which broke
GScanner ABI and API, #415323.
svn path=/trunk/; revision=5415
2007-03-16 Chris Wilson <chris@chris-wilson.co.uk>
* glib/gkeyfile.c: Convert to GSlice and check for redundant
clears. (#418637)
svn path=/trunk/; revision=5413
2007-03-15 Matthias Clasen <mclasen@redhat.com>
* glib/gscanner.c (g_scanner_get_token_ll): Fix a typo
in the last commit. (#415323, Richard Hult)
svn path=/trunk/; revision=5412
2007-03-15 Tor Lillqvist <tml@novell.com>
* glib/gnulib/Makefile.am (INCLUDES): Add -I$(top_srcdir)/glib so
that gregex.h finds <glib.h>.
* glib/update-pcre/Makefille.am-1: Add -DGLIB_COMPILATION so that
we don't think g_ascii_table is dllimport.
* glib/pcre/Makefile.am: Corresponding change.
* glib/update-pcre/notdll.patch: New file. Drop
dllimport/dllexport magic for the pcre symbols.
* glib/update-pcre/Makefile.am: Dist it.
* glib/update-pcre/update.sh: Apply notdll.patch.
* glib/pcre/pcre.h: Corresponding change.
2007-03-15 Tor Lillqvist <tml@novell.com>
* glib/gtypes.h: Add comment to avoid misleading people with the
large number of digits in G_PI etc. (#404338)
svn path=/trunk/; revision=5410
2007-03-15 Chris Wilson <chris@chris-wilson.co.uk>
* glib/gmain.c (g_main_dispatch): Replace a
g_slist_prepend/g_slist_remove pair with an on-stack link
and open coding. (#416094)
svn path=/trunk/; revision=5407
2007-03-15 Matthias Clasen <mclasen@redhat.com>
* glib/gscanner.[hc]: Some optimizations, use a lookup
table for character classes, pre-allocate GStrings with
reasonable sizes. (#415323, Charlie Brej)
svn path=/trunk/; revision=5405
2007-03-06 Matthias Clasen <mclasen@redhat.com>
* glib/gkeyfile.c (g_key_file_parse_value_as_boolean):
Remove a NULL check that didn't do any good. (#360904,
Paolo Borelli)
svn path=/trunk/; revision=5375
2007-03-06 Matthias Clasen <mclasen@redhat.com>
* glib/gmarkup.c (g_markup_parse_context_parse): Report
more accurate position for invalid UTF-8. (#350802,
Simon Budig)
svn path=/trunk/; revision=5373
2007-03-06 Matthias Clasen <mclasen@redhat.com>
Work with Solaris gettext (#341988, Laszlo Peter)
* m4macros/glib-gettext.m4: Make GLIB_WITH_NLS define
MSGFMT_OPTS if msgfmt supports -c.
* po/Makefile.in.in: Use MSGFMT_OPTS when calling
msgfmt.
svn path=/trunk/; revision=5369
2007-03-06 Matthias Clasen <mclasen@Redhat.com>
* tests/Makefile.am: Apply a patch by Loïc Minier
to fix building with -Wl,-z,defs. (#149144)
svn path=/trunk/; revision=5367
2007-02-17 Tor Lillqvist <tml@novell.com>
* glib/gdate.c (win32_strftime_helper): New Win32-only
function. Use the wide character Win32 API to do the work of
strftime(): GetThreadLocale(), GetLocaleInfoW(), GetDateFormatW()
and GetTimeFormatW().
(g_date_strftime): On Windows use win32_strftime_helper()
instead of strftime() to avoid codepage issues with strftime().
Unfortunately using wcsftime() would not help either. (#404832)
svn path=/trunk/; revision=5339
2007-02-16 Soren Sandmann <sandmann@redhat.com>
* tests/sequence-test.c: For move, test moving between two
sequences. Add test for swap.
* glib/gsequence.c: Replace splay tree with a treap.
(check_node): Add checks for the treap invariants.
svn path=/trunk/; revision=5337
Fri Feb 9 17:46:18 2007 Søren Sandmann <sandmann@redhat.com>
* glib/gsequence.c (g_sequence_get_end_iter): Remove assertion.
* glib/gsequence.c (is_end): Return TRUE if the iter doesn't have
a parent.
* glib/gsequence.c: Fix grammar of comment.
* glib/gsequence.c (node_update_fields): Use a temporary variable
for the n_nodes.
svn path=/trunk/; revision=5331
2007-02-07 Soren Sandmann <sandmann@daimi.au.dk>
* tests/sequence-test.c (compare_items): Force an arbitrary order
on otherwise identical items.
* glib/gsequence.c: Add comment discussing splay trees vs. other trees.
* glib/gsequence.c (is_end): Add fast path for the common case
when the node is not actually the end node.
svn path=/trunk/; revision=5328
2007-02-03 Soren Sandmann <sandmann@daimi.au.dk>
* glib/gsequence.c (struct _GSequence): Add a new 'real_sequence'
field.
(g_sequence_new): Initialize real_sequence to the sequence
(g_sequence_sort_iter): Set real_sequence of the temporary
sequence to the real sequence.
(g_sequence_sort_changed_iter): Same
(g_sequence_insert_sorted_iter): Same
(g_sequence_search_iter): Same
(g_sequence_iter_get_sequence): Return real_sequence
* tests/sequence-test.c (compare_iters): Insert assertions that
the iters point to the sequence being manipulated.
svn path=/trunk/; revision=5323
2007-02-03 Soren Sandmann <sandmann@daimi.au.dk>
* glib/gsequence.[ch]: New files implementing GSequence, a list
implemented using a binary tree.
* glib/glib.h, glib/glib.symbols: Update for GSequence.
* docs/reference: Add documentation for GSequence
* tests: Add sequence-test.c, a thorough test of all of
the GSequence API.
svn path=/trunk/; revision=5322
2007-01-30 Matthias Clasen <mclasen@redhat.com>
* glib/glib.symbols:
* glib/gslice.h:
* glib/gslice.c: Don't make ABI depend on G_ENABLE_DEBUG,
just add an empty g_slice_debug_tree_statistics () implementation
in the !G_ENABLE_DEBUG case.
svn path=/trunk/; revision=5318
2007-01-26 Matthias Clasen <mclasen@redhat.com>
* configure.in: Define G_GNUC_INTERNAL for Sun Studio
as __hidden. (#342981, Brian Cameron)
* glib/gconvert.c:
* glib/gutf8.c: Move G_GNUC_INTERNAL uses to the right
spot.
2
svn path=/trunk/; revision=5317
2007-01-26 Matthias Clasen <mclasen@redhat.com>
* gmem.c:
* gslice.c:
* gmessages.c:
* gutils.c: Make some structs which are used only once
non-static.
svn path=/trunk/; revision=5316
2007-01-23 Matthias Clasen <mclasen@redhat.com>
* glib/gutf8.c (g_utf8_get_char_validated): Clarify
the behaviour is max_len is zero. (#400044,
Benjamin Dauvergne)
svn path=/trunk/; revision=5311
2007-01-23 Matthias Clasen <mclasen@redhat.com>
* glib/goption.c (print_help): Use bitwise &
when operating on flags. (#399971, Jon Oberheide)
svn path=/trunk/; revision=5308
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
2007-01-17 Tor Lillqvist <tml@novell.com>
* glib-zip.in: DLLs are always installed in "bin" with current
libtool, drop unnecessary logic to check where they are. Include
also the COPYING file.
svn path=/trunk/; revision=5287
2007-01-17 Tor Lillqvist <tml@novell.com>
* glib/galloca.h: Use <malloc.h> also with Digital Mars compiler
on Win32. (#346808, Serhat Sevki Dincer)
svn path=/trunk/; revision=5285
2007-01-16 Matthias Clasen <mclasen@redhat.com>
* glib/gthread.h:
* glib/gthread.c:
* glib/glib.symbols: Revert an accidental ABI break by
moving gettime out of the GThreadFunctions struct and making
it a separate variable. (#397139, Joe Marcus Clarke)
* gthread/*.c: Adapt.
svn path=/trunk/; revision=5279
2007-01-16 Tor Lillqvist <tml@novell.com>
* glib/gthread.c (gettime)
* gthread-win32.c (g_gettime_win32_impl):
GetSystemTimeAsFileTime() returns 100s of nanoseconds since 1601,
so offset to Unix epoch (1970) and multiply by 100 to get
nanoseconds which is what we want.
svn path=/trunk/; revision=5277
2007-01-16 Tor Lillqvist <tml@novell.com>
* glib/gthread.c (gettime)
* gthread-win32.c (g_gettime_win32_impl):
GetSystemTimeAsFileTime() returns 100s of nanoseconds, so multiply
by 100 to get nanoseconds which is what we want.
svn path=/trunk/; revision=5276
2005-01-15 Matthias Clasen <mclasen@redhat.com>
* glib/gthread.c:
* gthread/gthread-posix.c: Correct the gettime calculations
once more. (#395203, Chris Wilson)
svn path=/trunk/; revision=5262
2007-01-15 Tor Lillqvist <tml@novell.com>
* glib/gmain.h (struct _GPollFD): Prepare for potential Win64
build: Use gint64 for the fd field on Win64, as we want to be able
to store a HANDLE in it. (#395422) (Other changes will surely also
be necessary when building on Win64, at least in gwin32.c.)
svn path=/trunk/; revision=5260
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
2007-01-12 Matthias Clasen <mclasen@redhat.com>
* glib/gkeyfile.c: Rework the handling of invalid
keys/groups again. We are back to being liberal about
what we accept, and only reject things that would lead
to non-rereadable keyfiles.
* tests/keyfile-test.c: Adapt tests.
svn path=/trunk/; revision=5254
2007-01-12 Matthias Clasen <mclasen@redhat.com>
* configure.in: Make G_GNUC_INTERNAL a no-op for
gcc 2.95. (#329031, David Schleef, Marc Brockschmidt)
svn path=/trunk/; revision=5245
2007-01-12 Matthias Clasen <mclasen@redhat.com>
* gthread/gthread-posix.c:
* glib/gtimer.c:
* glib/gthread.c: Fix errors in the recently moved
time calculations. (#395203, Chris Wilson)
svn path=/trunk/; revision=5244
2007-01-09 Behdad Esfahbod <behdad@gnome.org>
* glib/gutils.h: Use a more optimized g_bit_storage() when gcc is
available. (#371670, Daniel Elstner)
svn path=/trunk/; revision=5234
2007-01-07 Matthias Clasen <mclasen@redhat.com>
Don't link glib against libpthread. (#393812)
* configure.in: Link gthread against librt, not glib itself.
* glib/gthread.h:
* glib/gthread.c: Add a new thread function, gettime.
* glib/gtimer.c: Use gettime instead of directly working with
the various system interfaces.
* gthread/gthread-impl.c:
* gthread/gthread-posix.c:
* gthread/gthread-win32.c: Implement gettime.
svn path=/trunk/; revision=5227
2007-01-07 Tor Lillqvist <tml@novell.com>
* glib/giowin32.c: Handle GIOChannels for file descriptors
connected to the console separately. This would typically be the
fd 0, 1, or 2 (if not redirected) in a console application. For
such fds we don't need a separate thread, as console HANDLEs are
waitable objects. (#359202, Michiel de Hoon)
svn path=/trunk/; revision=5222
2007-01-03 Behdad Esfahbod <behdad@gnome.org>
* glib/goption.c (_g_unichar_get_width), (_g_utf8_strwidth),
(calculate_max_length), (print_entry), (print_help): Take zerowidth
and double-width chars into consideration when computing width of a
string. Also fix another bug in width computation.
* glib/guniprop.c (g_unichar_iszerowidth): Fix typo. It was not
working correctly.
svn path=/trunk/; revision=5204
2007-01-03 Behdad Esfahbod <behdad@gnome.org>
* glib/gutils.h: Fix bug in g_bit_nth_lsf (#371631) and use
__builtin_clzl for g_bit_storage if available (#371670).
* tests/Makefile.am:
* tests/bit-test.c: New test, to test g_bit_* operations against
naive and builtin implementations.
svn path=/trunk/; revision=5200
2007-01-02 Emmanuele Bassi <ebassi@gnome.org>
* glib/gbookmarkfile.c (expand_exec_line): Add support for
expanding the desktop entry spec variables %U (list of URIs)
and %F (list of filenames), so that using the command line
from the Exec and TryExec key of a desktop entry file works
as intended.
svn path=/trunk/; revision=5196
2007-01-02 Matthias Clasen <mclasen@redhat.com>
* glib/gbookmarkfile.c (g_bookmark_file_get_app_info):
Return an error if the uri is bad. (#391370, Maciej Piechotka)
svn path=/trunk/; revision=5192
2007-01-02 Michael Natterer <mitch@imendio.com>
* configure.in
* Makefile.am: remove references to build/ until a proper decision
has been made what to do with it.
svn path=/trunk/; revision=5189
Fri Dec 29 13:28:07 2006 Tim Janik <timj@imendio.com>
* glib/gslice.c: turned detection of too late g_thread_init() calls
into a warning. this is a temporary work-around for some head-room
to fix affected programs, memory corruption still occours regardless.
Thu Dec 28 21:14:45 2006 Tim Janik <timj@imendio.com>
* glib/gslice.c: removed pthread-dependant debugging bits, the code
was already converted to GMutex. this obsoletes Tor's recent fixups.
2006-12-28 Tor Lillqvist <tml@novell.com>
* glib/gmessages.c (g_logv): On Win32, if we get a fatal error
message while being debugged we break into the debugger with
G_BREAKPOINT(). Don't call abort() if the user is foolhardy enough
to continue after the breakpoint. The user presumably knows what
he is doing and deserves what he gets. (#376645, Andreas Köhler)
Thu Dec 28 12:50:31 2006 Tim Janik <timj@imendio.com>
* glib/gslice.h, glib/gslice.c: implemented static debugging
hash-tree to validate slice adresses and sizes with G_SLICE=debug-blocks.
use abort() to exit in mem_error() to allow catching of these in gdb.
abort programs with a descriptive error message if g_thread_init() is
called after GSlice was in use. previously this just silently corrupted
the magazines.
* glib/ghash.c (struct _GHashNode): reordered fields to keep 8-byte
pointer alignment on 64bit systems and request smaller slice sizes
on 32bit systems.
* tests/slice-test.c: support '~' option flag to introduce slice
allocation/release corruption with a significant probability. this
allowes testing of G_SLICE=debug-blocks.
2006-12-27 Ryan Lortie <desrt@desrt.ca>
* glib/ghash.c: cache the value of the hash function
in the GHashNode. this speeds up resizing the hash
table and it also allows a slight optimisation on
lookups. (#388332)
2006-12-24 Matthias Clasen <mclasen@redhat.com>
* tests/run-collate-tests.sh:
* tests/unicode-collate.c: Silently skip tests if
we can't set LC_COLLATE to en_US. (#336438)
2006-12-19 Matthias Clasen <mclasen@redhat.com>
* glib/gkeyfile.c (g_key_file_is_key_name): Accept
'/', '+' and '.' in key names, since gnome-vfs uses
mime types as keys in some cache.
2
* glib/gmain.c (child_watch_helper_thread): Readd a
return which was removed as dead code a while ago.
icc may consider it dead, but gcc doesn't like non-void
functions without a return... (#354707)
2006-12-18 Matthias Clasen <mclasen@redhat.com>
* glib/gkeyfile.c: Tighten up the check for allowed
key and group names. (#343191, Tommi Komulainen)
* tests/keyfile-test.c: Test handling of key and group names.
2006-12-17 Matthias Clasen <mclasen@redhat.com>
* configure.in: Make montonic clock test work again. Does
AC_COMPILE_IFELSE not get confdefs ? Also, move the clock
tests below the thread checks to fix#364663.
2006-12-16 Matthias Clasen <mclasen@redhat.com>
* configure.in: Use AC_COMPILE_IFELSE for the monotonic
clock test. (#362918, Han-Wen Nienhuys, Jeremy Lainé)
2006-12-15 Matthias Clasen <mclasen@redhat.com>
* configure.in: On Solaris, set CFLAGS and LDFLAGS that
work both with Sun cc and gcc. (#315061, Lazlo Peter)
2006-12-15 Matthias Clasen <mclasen@redhat.com>
* glib/glib.symbols:
* glib/gstring.[hc] (g_string_chunk_clear): Add a function
for clearing a GStringChunk. (#364608, Matt Barnes)
2006-12-15 Matthias Clasen <mclasen@redhat.com>
Fix#357585, Padraig O'Briain.
* configure.in: Check for fdwalk.
* glib/gspawn.c (do_exec): Use fdwalk() to close all
file descriptors.
* glib/gspawn.c (fdwalk): Fallback implementation of
fdwalk.
2006-12-14 Matthias Clasen <mclasen@redhat.com>
* glib/gconvert.c (open_converter): Don't use alloca
and avoid allocating memory for small keys that are
already cached. (#172406, Morten Welinder)
2006-12-14 Matthias Clasen <mclasen@redhat.com>
* glib/gkeyfile.c (g_key_file_add_group): If the group
is already there, make it current. (#385910, Joe Halliwell)
* tests/keyfile-test.c: Add a test for duplicate groups/keys.
2006-12-12 Matthias Clasen <mclasen@redhat.com>
* configure.in: Add a check for broken poll on Mac OS X.
* glib/gmain.c: Use poll emulation on OS X. (#302672, Toby Peterson,
patch by Dave Vasilevsky)
2006-10-26 Pascal Terjan <pterjan@linuxfr.org>
* glib/libcharset/localcharset.c: Fix small leak on failed
realloc in _g_locale_get_charset_aliases (#338582)
2006-10-15 Sebastian Wilhelmi <seppi@seppi.de>
* tests/Makefile.am: Compile errorcheck-mutex-test with thread
libraries explicitly. (#74748, Javier Villavicencio)
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)
2006-10-02 Behdad Esfahbod <behdad@gnome.org>
* glib/Makefile.am:
* gobject/Makefile.am:
Include pltcheck.sh in EXTRA_DIST, and remove redefinition of TESTS.
(#358966)
2006-10-01 Matthias Clasen <mclasen@redhat.com>
* glib/gtimer.c (g_usleep): Use nsleep to implement
g_usleep on AIX. (#321974, Andrew Paprocki)
* configure.in: Check for nsleep
2006-09-17 Hans Breuer <hans@breuer.org>
* glib/makefile.msc.in gobject/makefile.msc.in : better filtering
of G_GNUC_* stuff when generating .def files. Now also works with
newer (less tolerant) linkers, e.g. from vc2500e
2006-09-02 Tor Lillqvist <tml@novell.com>
* glib/gutils.c (g_get_any_init_do): Correct C99ism (mixed
declarations and code) in Win32 ifdef branch. (#353903, Mike
Edenfield)
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.
2006-08-27 Matthias Clasen <mclasen@redhat.com>
* glib/gtimer.c: Use Posix monotonic clocks instead of
gettimeofday when available. (#336114, William Jon McCann)
2006-08-25 Matthias Clasen <mclasen@redhat.com>
* configure.in: Fix the pthread compiler flag detection.
* glib/gunicode.h:
* glib/gutf8.c (_g_utf8_make_valid): Rename make_valid_utf8
from gconvert.c, move it to gutf8.c, and export it privately.
* glib/gconvert.c (g_filename_display_name): Adjust callers.
* glib/gkeyfile.c: Use _g_utf8_make_valid() in a number of
places to ensure error messages are valid UTF-8. (#351853,
Simon Budig)
Wed Aug 23 10:35:32 2006 Tim Janik <timj@gtk.org>
* gobject.[hc]: changed return value of g_value_dup_object(), fixes#343292.
2006-08-23 Sven Neumann <sven@gimp.org>
* gobject/glib-genmarshal.[c1]: added new command-line option
"--internal" that can be used to let glib-genmarshal generate
internal functions using the G_GNUC_INTERNAL attribute (bug #346647).
2006-08-23 Sven Neumann <sven@gimp.org>
* gobject/glib-genmarshal.[c1]: added new command-line option
"--internal" that can be used to let glib-genmarshal generate
internal functions using the G_GNUC_INTERNAL attribute (bug
#346647).
2006-08-20 Tor Lillqvist <tml@novell.com>
* glib/gnulib/vasnprintf.c (vasnprintf): Fix crash when printing
large 64-bit values on Win32 using the %I64x format. (#351034,
Neil Piercy)
Wed Aug 16 13:59:07 2006 Tim Janik <timj@gtk.org>
* tests/gobject/Makefile.am:
* tests/gobject/singleton.c: added test program which demonstrates
and checks singleton construction.
2006-08-08 Emmanuele Bassi <ebassi@gnome.org>
* glib/gbookmarkfile.c (g_bookmark_file_remove_group)
(g_bookmark_file_set_app_info): Plug a couple of leaks
when removing data from a bookmark.
2006-08-05 Matthias Clasen <mclasen@redhat.com>
* glib/gbookmarkfile.c (find_file_in_data_dirs): Correct the
grammar of an error message. (#349792, Jakub Friedl)
2006-08-05 Matthias Clasen <mclasen@redhat.com>
* glib/guniprop.c (g_unichar_toupper, g_unichar_tolower)
(real_toupper, real_tolower): If a character can't be converted,
don't replace it with a NUL byte, but leave it unchanged.
(#348491, Nikolai Weibull)
* tests/unicode-caseconv.c: Adapt to this change.
* tests/unicode-caseconv.c (main): Add a comment to point out
a quirk in the test data that we are working around here.
2006-07-31 Behdad Esfahbod <behdad@gnome.org>
* glib/guniprop.c (g_unichar_isxdigit): Make it only accept those
characters that we accept i g_unichar_xdigit_value(), i.e. don't
accept non-decimal digits. (#347842, Nikolai Weibull)
2006-07-31 Behdad Esfahbod <behdad@gnome.org>
* glib/gunidecomp.c (_g_utf8_normalize_wc): Update to reflect Unicode
PR #29 (#348694, Nikolai Weibull)
* tests/unicode-normalize.c (encode), (test_form): Make output more
useful, reporting the unexpected output of the test.
2006-07-06 Behdad Esfahbod <behdad@gnome.org>
* glib/gutils.c (g_parse_debug_string): When matching debug flag keys,
ignore case and accept any of comma, colon, semicolon, space, and tab
as separators. Also, match dash with underscore.
2006-06-20 Matthias Clasen <mclasen@redhat.com>
* glib/gtimer.c (mktime_utc): Fix an off-by-2 error
in the leap year calculation. (#344905, Dan Winship)
* tests/testglib.c (main): Change the test data for
the g_time_val_from_iso8601 tests to expose an off-by-2
error in the leap year calculation.
2006-06-16 Matthias Clasen <mclasen@redhat.com>
* tests/file-test.c (test_mkstemp): Add tests.
* glib/gfileutils.c (g_mkstemp): Allow the XXXXXX to occur
inside the template, not just at the end.
2006-06-12 Emmanuele Bassi <ebassi@cvs.gnome.org>
* glib/gbookmarkfile.h:
* glib/gbookmarkfile.c (g_bookmark_file_remove_item): Return
a boolean instead of void.
* tests/bookmarkfile-test.c (test_modify): Add a test case
for g_bookmark_file_remove_item().
2006-06-09 Emmanuele Bassi <ebassi@cvs.gnome.org>
* glib/gbookmarkfile.c (g_bookmark_file_remove_application): Use
an empty string to pass the test in set_app_info.
(g_bookmark_file_move_item): Remove the old item from the
look up table; return success in case of empty target.
2006-06-08 Tor Lillqvist <tml@novell.com>
* glib/gunicollate.c (msc_strxfrm_wrapper): Workaround for bug in
strxfrm() in Microsoft's newer C runtimes. (#343919, Kazuki
Iwamoto)
2006-06-02 Behdad Esfahbod <behdad@gnome.org>
* gobject/genum.h: Make value_name and value_nick const in structs
_GEnumValue and _GFlagValue. (#317793)
2006-06-01 Matthias Clasen <mclasen@redhat.com>
* glib/glib.symbols:
* glib/gmain.h:
* glib/gmain.c: Add two new functions,
g_source_set_funcs and g_source_is_destroyed,
that will be necessary to solve thread-safety
issues with idles in GTK+. (#321886, Chris Wilson)
2006-06-01 Matthias Clasen <mclasen@redhat.com>
* glib/giochannel.c (g_io_channel_write_chars): Avoid
running in an assertion with small writes. (#343566, Chris
Wilson)
* tests/iochannel-test.c: Add a testcase for small writes.
2006-06-01 Matthias Clasen <mclasen@redhat.com>
* glib/glib.symbols:
* glib/ghash.h:
* glib/ghash.c: Add g_hash_table_{remove,steal}_all to
remove all nodes from a hash table. (#168538, Matt Barnes)
2006-05-28 Matthias Clasen <mclasen@redhat.com>
* glib/gmarkup.h: Add a GMarkupParseFlags flag for
treating CDATA as text.
* glib/gmarkup.c (g_markup_parse_context_parse):
Implement it here.
2006-05-28 Matthias Clasen <mclasen@redhat.com>
* tests/markups/expected-*: Output that test-markup
is expected to produce when run on the valid gmarkup
examples.
* tests/markup-test.c: Only dump the results of the
first, unchunked parse, to compare it against the expected
output.
* tests/run-markup-tests.sh: For valid examples, compare
the output of test-markup against the corresponding
expected-<n> file.
2006-05-22 Sebastian Wilhelmi <wilhelmi@google.com>
* glib/gthread.c (g_thread_init_glib): Run _g_atomic_thread_init
as the first of the full fledged initializers to allow the later
to potentially use atomic ints (which they currently do
not). (#342563, Peter Kjellerstedt)
2006-05-13 Matthias Clasen <mclasen@redhat.com>
* glib/glib.symbols:
* glib/goption.h:
* glib/goption.c: Allow optional summary and description
texts before and after the option descriptions, and add
a way to translate them. (#336120, Behdad Esfahbod)
2006-05-12 Tor Lillqvist <tml@novell.com>
* glib/giowin32.c (g_io_win32_sock_set_flags): Implement
setting/clearing G_IO_FLAG_NONBLOCK for channels attached to
sockets. (#341192)
(g_io_win32_unimpl_set_flags): set_flags method for the
unimplemented case.
2006-05-10 Sebastian Wilhelmi <wilhelmi@google.com>
* glib/gthread.h, gthread/gthread-impl.c: Make the magic and
location arguments to the error-checking-mutex functions const and
do not write to them, as we might not own them. Clean up the
error-checking-mutex code quite a bit. (#335198, Chris Wilson)
2006-05-10 Sebastian Wilhelmi <wilhelmi@google.com>
* glib/gthread.c: Use g_atomic_pointer_set instead of old
homegrown version now that we have it. (#335198, Chris Wilson)
2006-05-10 Sebastian Wilhelmi <wilhelmi@google.com>
* gthread/gthread-posix.c, gthread/gthread-win32.c: Prevent
calling into g_cond_wait resp. g_mutex_lock/unlock directly to
avoid recursions into the errorcheking mutex code (and out of
principle anyway). (#335198, Chris Wilson)
2006-05-09 Sebastian Wilhelmi <wilhelmi@google.com>
* glib/gthreadinit.h: Renamed to glib/gthreadprivate.h and moved
system thread identifier comparision and assignment macros from
glib/gthread.c to glib/gthreadprivate.h.
* glib/Makefile.am, glib/gatomic.c, glib/gconvert.c, glib/gmain.c,
glib/gmem.c, glib/gmessages.c, glib/grand.c, glib/gslice.c,
glib/gthread.c, glib/gutils.c, gthread/gthread-impl.c: Use
glib/gthreadprivate.h instead of glib/gthreadinit.h.
* gthread/gthread-impl.c: Use GSystemThread instead of GThread for
owner determination. This fixes#311043 and is mostly modeled
after the patch from jylefort@FreeBSD.org.
2006-05-09 Sebastian Wilhelmi <wilhelmi@google.com>
* glib/gprintf.c, glib/gspawn-win32.c, glib/gutf8.c,
gthread/gthread-impl.c, gthread/gthread-posix.c,
gthread/gthread-win32.c: Use canonical include form for internal
headers. config.h is always there.
2006-05-08 Matthias Clasen <mclasen@redhat.com>
* tests/convert-test.c (test_one_half): Use encoding names which
may work better on Solaris. (#340434, Alessandro Vesely)
2006-05-03 Matthias Clasen <mclasen@redhat.com>
* tests/base64-test.c (test_incremental): Use malloced memory
instead of stack-allocated, so that MALLOC_CHECK_=2 catches
the OOB write...
Tue May 2 14:18:25 2006 Tim Janik <timj@gtk.org>
* glib/goption.c (g_option_context_parse): fixed leak in short
option parsing. rewrote parts of the code to be more concise to
enhance readability. fixed exaggerated uses of strlen.
2006-04-27 Matthias Clasen <mclasen@redhat.com>
* glib/gbookmarkfile.c (g_bookmark_file_set_description)
(g_bookmark_file_set_title, g_bookmark_file_set_icon):
Remove some special-casing of empty string which led to
dangling pointers. (#339337, Morten Welinder)
2006-04-25 Matthias Clasen <mclasen@redhat.com>
* glib/gbookmarkfile.c (is_element_full): Avoid a possible
NULL dereference (found by Coverity), also avoid some
pointless strdups.
2006-04-19 Tor Lillqvist <tml@novell.com>
* glib/gatomic.c: Adapt to the changed prototype of
InterlockedCompareExchange() in newer SDKs. Use
InterlockedCompareExchangePointer() when applicable. (#155884,
John Ehresman)
2006-04-18 Matthias Clasen <mclasen@redhat.com>
* glib/gkeyfile.h:
* glib/glib.symbols:
* glib/gkeyfile.c: Add api to get and set doubles and
lists of doubles. (#164719, Maurizio Monge, Dom Lachowicz)
* tests/keyfile-test.c: Add tests for new api.
2006-04-17 Matthias Clasen <mclasen@redhat.com>
* glib/gcompletion.c (g_completion_complete_utf8): Make passing
NULL for new_prefix work as documented. (#338845, Yevgen Muntyan)
* tests/completion-test.c: Test that passing NULL for
new_prefix in g_completion_complete_utf8 works.
2006-04-12 Bastien Nocera <hadess@hadess.net>
reviewed by: Matthias Clasen <mclasen@redhat.com>
* glib/gconvert.c: add more details about which RFC is concerned
when using g_filename_to_uri (#337553)
2006-04-07 Hans Breuer <hans@breuer.org>
* glib/makefile.msc.in : added gbase64.obj and derive the static libs
name from auto* variables
* glib/makefile.msc.in : link user32.lib for MessageBox()
* glib/gthreadpool.c: Make sure
g_thread_pool_stop_unused_threads() actually stops unused threads
and global limits (like max idle time and max unused threads) can
be set without creating a thread pool first. Fixed#335215 (patch
from Chris Wilson).
* tests/threadpool-test.c: Added two new tests, tests setting
global limits before creating a thread pool. The second test
makes sure unused threads are actually stopped when using the
g_thread_pool_stop_unused_threads().
2006-04-05 Matthias Clasen <mclasen@redhat.com>
* glib/gnulib/vasnprintf.c (vasnprintf): Make
long long printing work if snprintf is not
available. (#332841, Michael McDonald)
2006-04-05 Behdad Esfahbod <behdad@gnome.org>
* tests/option-test.c: Check the return value of g_get_prgname for
NULL before passing to strcmp.
* tests/slice-test.c: Report the correct name in Usage summary.
2006-03-31 Tor Lillqvist <tml@novell.com>
* glib/gstdio.c (g_remove): Revert change below. It wasn't a good
idea after all, says the original bug reporter. See bug for
discussion.
2006-03-30 Tor Lillqvist <tml@novell.com>
* glib/gstdio.c (g_remove): [Win32] call rmdir() only if remove()
fails with errno set to ENOENT, to leave errno set to EACCESS if
that is the problem. (#334799, Yevgen Muntyan)
2006-03-27 Dom Lachowicz <cinamod@hotmail.com>
* tests/option-test.c: Copy-and-paste error slipped into test5. Enable
test5, as per Matthias' comments in bug 329548#c11.
2006-03-26 Matthias Clasen <mclasen@redhat.com>
* glib/goption.c (g_option_context_new): Improve the description
of parameter_string in the docs. (#336085, Claudio Saavedra)
* glib/gthreadpool.c: Updated the documentation to explain that
when the maximum threads is > 1 the sort functionality is not 100%
accurate due to the ramdom nature of the scheduler choosing which
threads to execute. Fixes bug #334943.
* tests/threadpool-test.c: Disabled the debugging by default and
fixed the sort test to set the maximum threads to 1 to guarantee
the thread entry function is called in order.
2006-03-23 Emmanuele Bassi <ebassi@cvs.gnome.org>
* configure.in: Check for timegm.
* glib/gtimer.h:
* glib/gtimer.c:
* glib/glib.symbols:
* docs/reference/glib/glib-sections.txt: Added g_time_val_to_iso8601
and g_time_val_from_iso8601, to convert a GTimeVal to and from an
ISO 8601 encoded date.
* tests/testglib.c: Added test cases for g_time_val_to_iso8601()
and g_time_val_from_iso8601() functions.
2006-03-20 Matthias Clasen <mclasen@redhat.com>
* glib/gmem.c (profiler_log): use standard_calloc to allocate
the profile_data. (#335209, Chris Wilson)
* glib/gmain.c (g_main_context_unref): Avoid a deadlock.
(#335207, Chris Wilson)
Minor optimizations (#335216, Chris Wilson):
* glib/gasyncqueue.c (g_async_queue_pop_intern_unlocked): Use
g_queue_peek_tail_link instead of g_queue_peek_tail.
* glib/glist.c:
* glib/gslist.c: Avoid some memset calls.
2006-03-15 Matthias Clasen <mclasen@redhat.com>
* glib/goption.c (g_option_context_parse): Only set the prgname
if it hasn't been set before. (#334611, Chong Kai Xiong)
2006-03-14 Matthias Clasen <mclasen@redhat.com>
* glib/gutils.c (g_parse_debug_string): Don't read past the
end of the string. (#334471, Morten Welinder)
2006-03-13 Anders Carlsson <andersca@luminoth.local>
* configure.in: Revert fix for #322476, it breaks module loading
since libtool on darwin makes shared modules use .so and shared
libraries use .dylib. The fix breaks shared module loading everywhere
in GTK+.
2006-03-02 Marcus Brinkmann <mb@g10code.de>
Implement watches for GIOChannels for write file descriptors on
Win32 (#333098).
* glib/giowin32.c (GIOWin32Channel): Add a new direction field.
(read_thread): Initialize direction.
(write_thread): New function.
(buffer_write): New function.
(g_io_win32_prepare): Handle the G_IO_WIN32_FILE_DESC case for the
write direction.
(g_io_win32_fd_write): Call buffer_write() if there is a writer
thread.
(g_io_win32_fd_close): Set space_avail_event for writer threads.
(g_io_win32_fd_create_watch): Create the writer thread if
condition is G_IO_OUT.
(g_io_channel_win32_make_pollfd): Likewise here.
2006-03-07 Matthias Clasen <mclasen@redhat.com>
* glib/gutf8.c (_g_charset_get_aliases): Match the prototype
in gconvert.c to fix build problems in NetBSD. (#333651,
Julio M. Merino Vidal)
2006-03-06 Anders Carlsson <andersca@imendio.com>
* configure.in:
Skip checking thread flags on Darwin. Fix suggested by Manish Singh.
(#314794, Gregor Riepl)
2006-03-01 Tor Lillqvist <tml@novell.com>
* glib/gutils.c (g_listenv): Separate implementation on Win32: Use
the wide character API on NT-based Windows. Return UTF-8 strings.
* glib/glib.symbols: Don't mark g_listenv as PRIVATE, as that
meant it wasn't present in the import library. PRIVATE is used
only for the backwards-compatibility DLL ABI stability hacks.
* tests/asyncqueue-test.c:
* tests/list-test.c:
* tests/slist-test.c: Updated to test _sort, _sort_with_data,
_insert_sorted and _insert_sorted_with_data API.
2006-02-15 Sebastian Wilhelmi <seppi@seppi.de>
* glib/gthreadpool.c: Fix deadlock when signalling the thread
which freed a thread pool (#331110, Chris Wilson).
Tue Feb 14 17:00:43 2006 Tim Janik <timj@imendio.com>
* glib/gslice.c: only define _XOPEN_SOURCE to 600 to get at
posix_memalign() in case we actually are going to use it, because
we detected a compliant implementation (#328997).
* configure.in (enable_included_printf): don't include malloc.h when
testing for posix_memalign() funcitonality, since this may break the
test on some systems (#328997).
2006-01-31 Behdad Esfahbod <behdad@gnome.org>
* docs/reference/glib/tmpl/relations.sgml (g_relation_insert): Specify
the type of varargs arguments. (bug #317679)
Tue Jan 31 16:45:03 2006 Tim Janik <timj@imendio.com>
* glib/gdataset.c: carry out all dtalist pointer accesses atomically,
some missing cases where pointed out by Sebastian Wilhelmi.
2006-01-29 Sven Herzberg <herzi@gnome-de.org>
* docs/reference/gobject/tmpl/param_value_types.sgml: tell how to
create container classes which are as flexible as a GValue is
Wed Jan 25 19:16:57 2006 Tim Janik <timj@imendio.com>
* fixed buglets reported by Jens Granseuer in #328254.
* configure.in: free the memory allocated in posix_memalign() tests.
* glib/gslice.c: spelling fixes.
Wed Jan 25 16:39:18 2006 Tim Janik <timj@imendio.com>
* glib/gslice.c: honour g_mem_gc_friendly settings when freeing
slices, make sure g_mem_gc_friendly is properly initialized.
* gmem.[hc]: ensure g_mem_gc_friendly is initialized from G_DEBUG upon
the first allocation. applied some branching optimizations.
* docs/macros.txt: reflected --enable-gc-friendly change and
described ENABLE_GC_FRIENDLY_DEFAULT as well as G_DEBUG=gc-friendly.
* configure.in: changed --enable-gc-friendly=yes to define
ENABLE_GC_FRIENDLY_DEFAULT.
* glib/garray.c: changed ENABLE_GC_FRIENDLY macro #ifdef-s to
if (G_UNLIKELY (g_mem_gc_friendly)).
* glib/gtree.c:
* glib/ghash.c: removed ENABLE_GC_FRIENDLY code which is now taken
care of by g_slice_free1().
* tests/slice-test.c: fixed leaks, reported by Kjartan Maraas.
Tue Jan 24 17:49:36 2006 Tim Janik <timj@imendio.com>
* glib/gslice.c: only use posix_memalign() if it's known to work,
revert to memalign() otherwise.
* configure.in: check for broken posix_memalign() implementations
to fix#328254.
2006-01-24 Matthias Clasen <mclasen@redhat.com>
* tests/unicode-encoding.c: Use UTF-16LE as target encoding
on all little-endian systems. (#143380, Marc Moorcroft)
Mon Jan 23 17:30:33 2006 Tim Janik <timj@imendio.com>
* glib/gutils.c (_g_getenv_nomalloc): wiped out all the wonderfull
G_OS_WIN32 code i wrote ;-[) after tml told me windows has getenv()
as well.
Mon Jan 23 16:46:20 2006 Tim Janik <timj@imendio.com>
* glib/gslice.c (slice_config_init): initialize GSlice config from
G_SLICE environemtn variable. we support G_SLICE=always-malloc
currently, which forces all g_slice_*() allocations to use the system
malloc instead.
* glib/gutils.c:
g_parse_debug_string(): added a note about not using g_malloc() here.
_g_getenv_nomalloc(): getenv() variant that doesn't use g_malloc or
g_slice. contains only guesswork in the WIN32 branch.
2006-01-17 Sebastian Wilhelmi <seppi@seppi.de>
* glib/gthreadpool.c: To avoid deadlocks get rid of the settings
G_LOCK. Use the unused_thread_queue lock instead. Change
g_thread_pool_thread_proxy such that threads only wait on
non-exlusive pools for at most a 1/2 second. Do not reorder tasks
due to superfluous tasks. Global tasks wait at most for
max-idle-time milliseconds. Make sure, that no task is woken up
twice for the same event via a wakeup_serial. This fixes#324228.
* tests/threadpool-test.c: Adapt test accordingly. Do not pass
invalid NULL into the thread pools. This as well fixes#327290.
2006-01-16 Matthias Clasen <mclasen@redhat.com>
* glib/gthread.h (g_static_mutex_get_mutex_impl_shortcut):
Rework the strict aliasing fix to not break C++, pointed
out by Murray Cumming.
2006-01-16 Matthias Clasen <mclasen@redhat.com>
* glib/gasyncqueue.c (g_async_queue_push_sorted_unlocked):
Signal waiting threads, problem noticed by Christian Kellner.
2006-01-16 Matthias Clasen <mclasen@redhat.com>
Fix bug 326747, Alberto Ruiz:
* glib/gconvert.c (make_valid_utf8): Change this function to
replace unknown characters by the Unicode replacement character
instead of '?', and don't append "(invalid encoding)".
(g_filename_display_name, g_filename_display_basename): Document
how to determine if the filename was in an invalid encoding.
2006-01-14 Matthias Clasen <mclasen@redhat.com>
* glib/gtree.c: Replace the simple recursive implementation
by a nonrecursive, threaded implementation by Maurizio
Monge. (#169285)