platform/upstream/glib.git
14 years agogobject/tests: New test for dynamic class creation/destruction
Edward Hervey [Thu, 24 Sep 2009 11:19:46 +0000 (13:19 +0200)]
gobject/tests: New test for dynamic class creation/destruction

Starts 100 threads which ref/unref a dynamic class to test the recent
changes to class init/uninit.

14 years agoAdd type_data_ref_U() and use it in g_type_class_ref()
Edward Hervey [Thu, 24 Sep 2009 10:42:49 +0000 (12:42 +0200)]
Add type_data_ref_U() and use it in g_type_class_ref()

The function returns TRUE if the type was previously initialized and can
be easily reused. It returns FALSE and does not take a reference if the
type is not referenced yet.

g_type_class_ref() uses this to avoid taking locks in the common path,
which speeds up object creation a lot - in particular in multithreaded
applications.

https://bugzilla.gnome.org/show_bug.cgi?id=585375

14 years agoReorganize g_type_class_ref()
Edward Hervey [Thu, 24 Sep 2009 10:29:25 +0000 (12:29 +0200)]
Reorganize g_type_class_ref()

Moves the first check out of the lock, as it's not required.

https://bugzilla.gnome.org/show_bug.cgi?id=585375

14 years agoMake ClassData->init_state atomic
Benjamin Otte [Thu, 24 Sep 2009 10:26:53 +0000 (12:26 +0200)]
Make ClassData->init_state atomic

This is necessary to make g_type_class_ref() lockless.

https://bugzilla.gnome.org/show_bug.cgi?id=585375

Also includes fix for:

https://bugzilla.gnome.org/show_bug.cgi?id=587892

14 years agoMake type_data_unref_U not take locks in the common case
Edward Hervey [Thu, 24 Sep 2009 09:45:13 +0000 (11:45 +0200)]
Make type_data_unref_U not take locks in the common case

https://bugzilla.gnome.org/show_bug.cgi?id=585375

14 years agoMake all accesses of Node->ref_count atomic
Edward Hervey [Thu, 24 Sep 2009 09:38:49 +0000 (11:38 +0200)]
Make all accesses of Node->ref_count atomic

This does not change any locking behavior at all, it just replaces
simple getters/setters of the variable with atomic versions.

The ref_count variable was kept as unsigned, even though that requires
casting for all operations, to mirror GObject->refcount.

https://bugzilla.gnome.org/show_bug.cgi?id=585375

14 years agotype_data_unref_Wm => type_data_unref_U
Edward Hervey [Thu, 24 Sep 2009 09:19:58 +0000 (11:19 +0200)]
type_data_unref_Wm => type_data_unref_U

Make the type unref function not hold any locks when called. This
makes it easier to optimize it to be atomic later.

https://bugzilla.gnome.org/show_bug.cgi?id=585375

14 years agoAdd a NODE_REFCOUNT getter
Benjamin Otte [Thu, 24 Sep 2009 09:16:10 +0000 (11:16 +0200)]
Add a NODE_REFCOUNT getter

This is useful when moving the code to be atomic.
It also will make that patch smaller.

https://bugzilla.gnome.org/show_bug.cgi?id=585375

14 years agoMove setting the refcount to the end of the function
Edward Hervey [Thu, 24 Sep 2009 08:44:17 +0000 (10:44 +0200)]
Move setting the refcount to the end of the function

This is a safety feature for when making it atomic later.

https://bugzilla.gnome.org/show_bug.cgi?id=585375

14 years agoPass the TypeNode to type_data_last_unref_Wm()
Edward Hervey [Thu, 24 Sep 2009 08:16:48 +0000 (10:16 +0200)]
Pass the TypeNode to type_data_last_unref_Wm()

Previously the GType was looked up just for calling the function
Also moves the unref functions together in the code.

https://bugzilla.gnome.org/show_bug.cgi?id=585375

14 years agoMove ref_count from TypeNode->data to TypeNode
Edward Hervey [Thu, 24 Sep 2009 08:03:14 +0000 (10:03 +0200)]
Move ref_count from TypeNode->data to TypeNode

https://bugzilla.gnome.org/show_bug.cgi?id=585375

14 years agoImplement O(1) interface lookups
Alexander Larsson [Wed, 9 Sep 2009 14:42:32 +0000 (16:42 +0200)]
Implement O(1) interface lookups

Currently interface lookups are do a binary search over all the interfaces
an object implements. Its possible to do this lookup in constant time using for
instance the gcj algorighm described at:
http://gcc.gnu.org/ml/java/1999-q3/msg00377.html

This is an implementation of that based on GAtomicArray.

14 years agoImplement lock free interface lookup
Alexander Larsson [Wed, 9 Sep 2009 14:51:28 +0000 (16:51 +0200)]
Implement lock free interface lookup

We implement lock free interface lookup by moving the n_ifaces
counter into memory pointed to by TypeNode->iface_entries, and
then updating this in RCU-style by always copying it, modifying
the copy and then when the modification is done replace the old
pointer with g_atomic_pointer_set.

There is one additional complexity when freeing the old memory,
since the old memory region can be in use. To handle this we
don't free such memory, but put it on a free list and reuse it
later. This means that lock-free lookups must be able to
handle the memory being modified in random ways without crashing,
and at the end we verify that the memory didn't change and the
transaction is ok.

With this infrastructure the patch then implements a lock-free
version of type_lookup_iface_entry_L called type_lookup_iface_vtable_I
and use it in: g_type_interface_peek, g_type_interface_peek_parent
and type_node_check_conformities_UorL.

Using the performance tests from bug 557100 shows that the general
performance difference is negligible, but the lack of a lock for each
type check and interface vfunc call should greatly enhance threaded
scalability.

14 years agoAdd GAtomicArray for RCU-style lockless updates
Alexander Larsson [Wed, 9 Sep 2009 14:47:44 +0000 (16:47 +0200)]
Add GAtomicArray for RCU-style lockless updates

This adds supports for a lock-less a non-shrinking growable array.
You can use it to do reads using no locks, as long as your read-code
can handle that during the read transaction the object can be modified
by another writer (but it will not change size or be freed), and you
can only trust the result once the transaction has finished successfully.

This doesn't free things like RCU normally does, instead it pushes the
memory on a free list that is reused for other atomic arrays.

14 years agoUpdating Estonian translation
Ivar Smolin [Mon, 30 Nov 2009 11:08:18 +0000 (13:08 +0200)]
Updating Estonian translation

14 years agoBump version
Matthias Clasen [Mon, 30 Nov 2009 05:11:10 +0000 (00:11 -0500)]
Bump version

14 years ago2.23.0 2.23.0
Matthias Clasen [Mon, 30 Nov 2009 05:09:36 +0000 (00:09 -0500)]
2.23.0

14 years agoMore updates
Matthias Clasen [Mon, 30 Nov 2009 03:57:00 +0000 (22:57 -0500)]
More updates

14 years agoFix up GIO docs
Matthias Clasen [Mon, 30 Nov 2009 03:54:16 +0000 (22:54 -0500)]
Fix up GIO docs

14 years agoFix dynamictype test to build
Matthias Clasen [Mon, 30 Nov 2009 02:19:10 +0000 (21:19 -0500)]
Fix dynamictype test to build

14 years agoFix 'make check' in gio
Matthias Clasen [Mon, 30 Nov 2009 01:55:25 +0000 (20:55 -0500)]
Fix 'make check' in gio

14 years agoRemove filter-cat from TEST_PROGS
Matthias Clasen [Mon, 30 Nov 2009 01:48:52 +0000 (20:48 -0500)]
Remove filter-cat from TEST_PROGS

Since it is not intended to be run as part of make check.

14 years agoDisable a broken test
Matthias Clasen [Mon, 30 Nov 2009 01:47:51 +0000 (20:47 -0500)]
Disable a broken test

One of the option context tests relied on the ability to
call g_set_pgrname() more than once. Thats no longer possible
(without incurring a warning that wrecks the test).

14 years agoUpdated Catalan translations, with some corrections from Carles Ferrando
David Planella [Sun, 29 Nov 2009 18:27:45 +0000 (19:27 +0100)]
Updated Catalan translations, with some corrections from Carles Ferrando

14 years agoFix return type of g_converter_[in|out]put_stream.
Paolo Borelli [Sun, 29 Nov 2009 14:14:10 +0000 (15:14 +0100)]
Fix return type of g_converter_[in|out]put_stream.

Fixes bug #603265

14 years agoUpdated Spanish translation
Jorge González [Sat, 28 Nov 2009 12:26:38 +0000 (13:26 +0100)]
Updated Spanish translation

14 years agoUpdates
Matthias Clasen [Sat, 28 Nov 2009 06:59:12 +0000 (01:59 -0500)]
Updates

14 years agoBump version to 2.23.0
Matthias Clasen [Sat, 28 Nov 2009 06:30:27 +0000 (01:30 -0500)]
Bump version to 2.23.0

14 years agoUpdated Slovenian translation
Matej Urbančič [Fri, 27 Nov 2009 12:33:16 +0000 (13:33 +0100)]
Updated Slovenian translation

14 years agoUpdated Spanish translation
Jorge González [Fri, 27 Nov 2009 00:37:49 +0000 (01:37 +0100)]
Updated Spanish translation

14 years agoBug 589631 - enclose literals with double quotes
Ryan Lortie [Thu, 26 Nov 2009 17:15:04 +0000 (12:15 -0500)]
Bug 589631 - enclose literals with double quotes

Improve strings for purpose of translation.

Based on a patch from Leonardo Ferreira Fontenelle.

14 years agoAdd "default location" support to GMount
Christian Kellner [Fri, 9 Oct 2009 13:06:44 +0000 (15:06 +0200)]
Add "default location" support to GMount

The "default location" of the given mount is a path that reflects
the main entry point for the user (e.g. the home directory, or the
root of the volume).

https://bugzilla.gnome.org/show_bug.cgi?id=561998

14 years agoPass in the right device to vfs->local_file_add_info for symlinks
Alexander Larsson [Thu, 26 Nov 2009 15:05:07 +0000 (16:05 +0100)]
Pass in the right device to vfs->local_file_add_info for symlinks

We used to pass the path for the symlink, but the device of the target
which is wrong and breaks metadata access.

https://bugzilla.gnome.org/show_bug.cgi?id=593809

14 years agoFixed bug 91 (GIO monitoring not working due to bad assert)
Mures Andone [Tue, 10 Nov 2009 12:59:31 +0000 (14:59 +0200)]
Fixed bug 91 (GIO monitoring not working due to bad assert)

https://bugzilla.gnome.org/show_bug.cgi?id=593856

14 years agoApply English pedantry to GAsyncInitable's docs
Will Thompson [Fri, 20 Nov 2009 13:01:17 +0000 (13:01 +0000)]
Apply English pedantry to GAsyncInitable's docs

• "asynchronous" was misspelled as "asyncronous" in various places;
• punctuation was missing;
• g_async_initable_new_async() had a stray "and";
• references to g_async_initable_new_finish() were missing a "the".

https://bugzilla.gnome.org/show_bug.cgi?id=602417

14 years agoRemove unused variable
Alexander Larsson [Thu, 26 Nov 2009 12:15:11 +0000 (13:15 +0100)]
Remove unused variable

14 years agoCast iface_init to GInterfaceInitFunc
Alexander Larsson [Thu, 26 Nov 2009 11:30:14 +0000 (12:30 +0100)]
Cast iface_init to GInterfaceInitFunc

This is in line with what all other type define macros do.

https://bugzilla.gnome.org/show_bug.cgi?id=508157

14 years agoAdd test for G_IMPLEMENT_INTERFACE_DYNAMIC
Alexander Larsson [Thu, 26 Nov 2009 10:54:44 +0000 (11:54 +0100)]
Add test for G_IMPLEMENT_INTERFACE_DYNAMIC

14 years agoAdd G_IMPLEMENT_INTERFACE_DYNAMIC
Alexander Larsson [Tue, 24 Nov 2009 08:53:15 +0000 (09:53 +0100)]
Add G_IMPLEMENT_INTERFACE_DYNAMIC

Convenience macro to easy interface addition for dynamic types.

https://bugzilla.gnome.org/show_bug.cgi?id=508157

14 years agoAdd TB and PB cases to g_format_size_for_display
Christian Persch [Sat, 24 May 2008 19:00:11 +0000 (21:00 +0200)]
Add TB and PB cases to g_format_size_for_display

14 years agoRemove fuzzy marker from header, which crashed my msgfmt
Tor Lillqvist [Wed, 25 Nov 2009 10:57:10 +0000 (12:57 +0200)]
Remove fuzzy marker from header, which crashed my msgfmt

14 years agoBug 601637 - add GUnixFDList
Ryan Lortie [Thu, 12 Nov 2009 03:40:28 +0000 (22:40 -0500)]
Bug 601637 - add GUnixFDList

change GUnixFDMessage to contain a GUnixFDList.

add test case for GUnixFDMessage and GUnixFDList.

update docs.

14 years agoUpdate gio.symbols with new functions
Alexander Larsson [Tue, 24 Nov 2009 12:31:33 +0000 (13:31 +0100)]
Update gio.symbols with new functions

14 years agoExport g_charset_converter_get_num_fallbacks in header
Alexander Larsson [Tue, 24 Nov 2009 12:31:10 +0000 (13:31 +0100)]
Export g_charset_converter_get_num_fallbacks in header

14 years agoFix GZlibCompressorFormat names
Alexander Larsson [Tue, 24 Nov 2009 12:02:05 +0000 (13:02 +0100)]
Fix GZlibCompressorFormat names

What used to be called RAW is really the zlib header format.
There is a real "raw" format, so rename the default and add a RAW type.

14 years agoBug 591214 - Warnings building gcancellable.o
Ryan Lortie [Thu, 12 Nov 2009 04:31:12 +0000 (23:31 -0500)]
Bug 591214 - Warnings building gcancellable.o

- check for EINTR on read() and write() calls
- remove unused 'priv' variable

14 years agoBug 598712 - can't detect text file with backspace
Ryan Lortie [Fri, 20 Nov 2009 18:54:35 +0000 (12:54 -0600)]
Bug 598712 - can't detect text file with backspace

looks_like_text(): Allow '\b' to appear in text files.

14 years agoAdd filter-cat test for GConverter streams
Alexander Larsson [Wed, 18 Nov 2009 15:07:16 +0000 (16:07 +0100)]
Add filter-cat test for GConverter streams

14 years agoAdd GZlibCompressor
Alexander Larsson [Fri, 20 Nov 2009 11:04:31 +0000 (12:04 +0100)]
Add GZlibCompressor

14 years agoAdd GZlibDecompressor for zlib decompression
Alexander Larsson [Thu, 19 Nov 2009 16:20:20 +0000 (17:20 +0100)]
Add GZlibDecompressor for zlib decompression

14 years agoAdd zlib dependency to gio
Alexander Larsson [Thu, 19 Nov 2009 16:16:29 +0000 (17:16 +0100)]
Add zlib dependency to gio

Will be used by compression APIs

14 years agoAdd test for converter streams
Alexander Larsson [Fri, 23 Oct 2009 17:59:03 +0000 (19:59 +0200)]
Add test for converter streams

14 years agoAdd GConverterOutputStream
Alexander Larsson [Mon, 23 Nov 2009 14:03:57 +0000 (15:03 +0100)]
Add GConverterOutputStream

This allows for conversion when saving

14 years agoAdd g_output_stream_is_closing
Alexander Larsson [Mon, 23 Nov 2009 14:02:50 +0000 (15:02 +0100)]
Add g_output_stream_is_closing

Need this to check how we're flushing when closing a converter
output stream.

14 years agoAdd GConverterInputStream
Alexander Larsson [Thu, 22 Oct 2009 20:50:52 +0000 (22:50 +0200)]
Add GConverterInputStream

Read and convert data from an input stream

14 years agoAdd fallback mode to GCharsetConverter
Alexander Larsson [Mon, 23 Nov 2009 15:19:08 +0000 (16:19 +0100)]
Add fallback mode to GCharsetConverter

14 years agoAdd GCharsetConverter
Alexander Larsson [Wed, 21 Oct 2009 19:25:36 +0000 (21:25 +0200)]
Add GCharsetConverter

14 years agoAdd GConverter interface
Alexander Larsson [Wed, 18 Nov 2009 12:14:13 +0000 (13:14 +0100)]
Add GConverter interface

This is an interface for stateful conversions of data. Its a generic
interface suitable for things like IConv, compression, decompression,
and regexp replacement.

14 years agoAdd G_IO_ERROR_PARTIAL_INPUT and G_IO_ERROR_INVALID_DATA errors
Alexander Larsson [Tue, 20 Oct 2009 12:12:31 +0000 (14:12 +0200)]
Add G_IO_ERROR_PARTIAL_INPUT and G_IO_ERROR_INVALID_DATA errors

These are needed for GConverter

14 years agogtester should fail even if -k is passed
Cody Russell [Mon, 23 Nov 2009 13:48:14 +0000 (07:48 -0600)]
gtester should fail even if -k is passed

14 years agoUpdated Brazilian Portuguese translation.
Vladimir Melo [Mon, 23 Nov 2009 13:36:06 +0000 (08:36 -0500)]
Updated Brazilian Portuguese translation.

14 years agoRemove #include "glocalfile.h" from GFile
Ryan Lortie [Fri, 20 Nov 2009 20:40:58 +0000 (14:40 -0600)]
Remove #include "glocalfile.h" from GFile

It might give somebody the wrong idea. =)

14 years agoFix thread-safety
Benjamin Otte [Fri, 20 Nov 2009 15:47:09 +0000 (16:47 +0100)]
Fix thread-safety

The n_children variable can be written when locked, while the n_supers
variable is read at any time. As they both share the same bytes,
accessing them is not threadsafe.
This patch puts them into different bytes.

Thanks to Xan Lopez and valgrind for noticing this.

14 years agopriv variable should only be used in win32 code
Juan A. Suarez Romero [Fri, 20 Nov 2009 15:46:41 +0000 (16:46 +0100)]
priv variable should only be used in win32 code

14 years agog_socket_listener_add_any_inet_port is Since 2.24
Ryan Lortie [Thu, 19 Nov 2009 16:19:01 +0000 (10:19 -0600)]
g_socket_listener_add_any_inet_port is Since 2.24

accidentally committed an old patch without updating.

14 years agoBug 585566 - GSocketListener API issues
Ryan Lortie [Mon, 15 Jun 2009 18:07:13 +0000 (14:07 -0400)]
Bug 585566 - GSocketListener API issues

Add a new function, g_socket_listener_add_any_inet_port(), to deal with
the desired use case.

14 years agoBug 600550 - (...) doesn't treat arguments properly
Christian Dywan [Thu, 19 Nov 2009 15:58:43 +0000 (09:58 -0600)]
Bug 600550 - (...) doesn't treat arguments properly

Add some additional checking to g_app_info_create_from_commandline to
make it handle strange inputs more elegantly.

14 years agoBug 600620 - Add g_app_info_get_display_name()
Vincent Untz [Wed, 18 Nov 2009 22:37:47 +0000 (16:37 -0600)]
Bug 600620 - Add g_app_info_get_display_name()

This new API can make use of X-GNOME-FullName in .desktop files, to have
the full name of applications.

14 years agoBug 595138 - GFile not robust with invalid input
Ryan Lortie [Thu, 19 Nov 2009 00:43:30 +0000 (18:43 -0600)]
Bug 595138 - GFile not robust with invalid input

Improve handling of g_file_query_default_handler() when called on an
invalid GFile (ie: one created with an invalid URI).

14 years agoBug 600141 - Add -pthread to gmodule pkg-config
Ryan Lortie [Wed, 18 Nov 2009 02:41:48 +0000 (20:41 -0600)]
Bug 600141 - Add -pthread to gmodule pkg-config

It is not generally permissible to dlopen() libpthread into a program
that is not already linked with threading support.  The most common case
of this happening is when GIO opens Gvfs (which includes DBus, which
links against libpthread).

Since gmodule is the way that most users cause this problem for
themselves and since the easiest workaround is to link the program with
-pthread, the best fix for the issue is to add -pthread to the gmodule
pkg-config.

14 years agoBug 535159 - g_file_has_parent
Ryan Lortie [Thu, 12 Nov 2009 06:37:27 +0000 (01:37 -0500)]
Bug 535159 - g_file_has_parent

- add a g_file_has_parent() function as a wrapper around
   g_file_get_parent()

14 years agoFix compilation warning: Initialize the variable
Javier Jardón [Sun, 15 Nov 2009 23:29:39 +0000 (00:29 +0100)]
Fix compilation warning: Initialize the variable

14 years agoFix compilation warning: Remove unused function
Javier Jardón [Sun, 15 Nov 2009 23:33:07 +0000 (00:33 +0100)]
Fix compilation warning: Remove unused function

14 years agoFix compilation warning: cast to (GCompareFunc)
Javier Jardón [Sun, 15 Nov 2009 23:22:03 +0000 (00:22 +0100)]
Fix compilation warning: cast to (GCompareFunc)

14 years agoDon't mention g_utf32_to_utf8() and g_utf8_to_utf32()
Javier Jardón [Sun, 15 Nov 2009 04:51:45 +0000 (05:51 +0100)]
Don't mention g_utf32_to_utf8() and g_utf8_to_utf32()

These functions doesn't exist.
Suggest to use g_ucs4_to_utf8/g_utf8_to_ucs4 to produce the UTF-8
representation of a gunichar

This fix bug: https://bugzilla.gnome.org/show_bug.cgi?id=601874

14 years agoSuggest the use of G_STRFUNC
Javier Jardón [Sun, 15 Nov 2009 22:58:23 +0000 (23:58 +0100)]
Suggest the use of G_STRFUNC

Suggest G_STRFUNC in the documentation of the deprecated functions
G_GNUC_PRETTY_FUNCTION and G_GNUC_FUNCTION

14 years agoBug 587300 - g_cancellable_disconnect deadlock
Ryan Lortie [Thu, 12 Nov 2009 04:48:06 +0000 (23:48 -0500)]
Bug 587300 - g_cancellable_disconnect deadlock

add documentation to clarify that a deadlock is the expected case for
calling this function from a signal handler

14 years agoBug 591216 - Warning building resolver.o
Ryan Lortie [Thu, 12 Nov 2009 04:21:48 +0000 (23:21 -0500)]
Bug 591216 - Warning building resolver.o

check result of write system call to quiet compiler warning

14 years agoGSocket.receive_message: fix bogus allocation math
Ryan Lortie [Thu, 12 Nov 2009 03:20:11 +0000 (22:20 -0500)]
GSocket.receive_message: fix bogus allocation math

14 years agoUpdated Norwegian bokmål translation.
Kjartan Maraas [Wed, 11 Nov 2009 19:09:53 +0000 (20:09 +0100)]
Updated Norwegian bokmål translation.

14 years agoInclude all of share/gtk-doc/html to get also the gio docs
Tor Lillqvist [Tue, 10 Nov 2009 12:19:59 +0000 (14:19 +0200)]
Include all of share/gtk-doc/html to get also the gio docs

Also add -D switches to not pointlessly include entries for directories
in the zip files.

14 years agoAvoid gcc warning about redeclaration of atexit() on MinGW
Tor Lillqvist [Mon, 9 Nov 2009 23:37:13 +0000 (01:37 +0200)]
Avoid gcc warning about redeclaration of atexit() on MinGW

14 years agoUpdated Swedish translation
Daniel Nylander [Sun, 8 Nov 2009 21:04:51 +0000 (22:04 +0100)]
Updated Swedish translation

14 years agoUpdated Galician Translation
Fran Diéguez [Sat, 7 Nov 2009 13:40:58 +0000 (14:40 +0100)]
Updated Galician Translation

14 years agoUpdated Spanish translation
Jorge González [Fri, 6 Nov 2009 20:51:28 +0000 (21:51 +0100)]
Updated Spanish translation

14 years agoUpdating Estonian translation
Ivar Smolin [Fri, 6 Nov 2009 16:15:29 +0000 (18:15 +0200)]
Updating Estonian translation

14 years agoUpdated Slovenian translation
Matej Urbančič [Fri, 6 Nov 2009 13:58:44 +0000 (14:58 +0100)]
Updated Slovenian translation

15 years agoBug 324930 - Nicer message for EPERM on symlink
Stéphane Démurget [Sun, 25 Oct 2009 10:14:36 +0000 (11:14 +0100)]
Bug 324930 - Nicer message for EPERM on symlink

Introduced a more precise error message for EPERM when symlinking to
a local filesystem.

EPERM on symlink means symlinking is not supported by the underlying
fs so it is not the general meaning of EPERM which roughly translates
to 'Operation not permitted'.

15 years agoDon't call WSAEventSelect() on -1
Tor Lillqvist [Wed, 4 Nov 2009 21:59:18 +0000 (23:59 +0200)]
Don't call WSAEventSelect() on -1

If g_io_win32_sock_close() has been called on a socket channel, don't
later in g_io_win32_free() call WSAEventSelect() on its fd which has
been set to -1.

15 years agoDon't run system("touch conf.glibtest)" in the AM_PATH_GLIB_2_0 macro
Paolo Bonzini [Tue, 3 Nov 2009 16:38:58 +0000 (18:38 +0200)]
Don't run system("touch conf.glibtest)" in the AM_PATH_GLIB_2_0 macro

Just use the C library instead to create the file. Helps building
using Wine. Not that I think we want to endorse that, but accepting
this minimal patch doesn't hurt. From bug #590016.

Signed-off-by: Tor Lillqvist <tml@iki.fi>
15 years agoImprove descriptive comment text
Tor Lillqvist [Tue, 3 Nov 2009 16:21:19 +0000 (18:21 +0200)]
Improve descriptive comment text

15 years agoFix check for C++ compiler when cross-compiling
Hib Eris [Tue, 3 Nov 2009 13:06:29 +0000 (15:06 +0200)]
Fix check for C++ compiler when cross-compiling

Use AC_CHECK_TOOLS instead of AC_CHECK_PROGS. Patch from bug #577711.

15 years agoMake g_file_test() behave on Windows more like as on POSIX
Carlo Bramini [Tue, 3 Nov 2009 12:26:25 +0000 (14:26 +0200)]
Make g_file_test() behave on Windows more like as on POSIX

Patch from bug #572252.

15 years agoShavian translation
Thomas Thurman [Sat, 31 Oct 2009 06:49:31 +0000 (02:49 -0400)]
Shavian translation

15 years agoProperly nul-terminate return values from g_convert()
Benjamin Otte [Wed, 28 Oct 2009 18:18:20 +0000 (19:18 +0100)]
Properly nul-terminate return values from g_convert()

The patch ensures that multibyte character sets are properly
nul-terminated. This is an issue because the documentation claims to
return a "nul-terminated" string and users of the API assume that means
a proper nul-termination in the resulting character set.

I looked at Pidgin and GStreamer code and found at least 3 cases where
this was happening.

This patch also reverts the documentation change from
5a633f82dbbce067c56fba0ee372fd341b76368d as that is now no longer
necessary.

15 years agoClarify documentation about g_convert() nul-terminated returns
Benjamin Otte [Tue, 27 Oct 2009 20:07:13 +0000 (21:07 +0100)]
Clarify documentation about g_convert() nul-terminated returns

THere is effectively no nul-termination for multibyte characters.

15 years agoAvoid a warning
Matthias Clasen [Sun, 25 Oct 2009 06:56:13 +0000 (02:56 -0400)]
Avoid a warning

15 years agoDon't give up too early when collecting mime types
Matthias Clasen [Sun, 25 Oct 2009 06:55:46 +0000 (02:55 -0400)]
Don't give up too early when collecting mime types

Since returning exactly one match has special significance, don't
give up matching before we've found at least 2 types. Also, make
sure that we don't return the same mime type more than once.
Bug 541236.

15 years agomake sure g_set_prgname() gets called only once
Sven Herzberg [Fri, 23 Oct 2009 12:49:38 +0000 (14:49 +0200)]
make sure g_set_prgname() gets called only once

* glib/gutils.c: copy the call-once statement from g_set_application_name();
  Fixes Bug #563627: g_get_prgname() threadsafety

15 years agoFix GWin32DirectoryMonitor
Tor Lillqvist [Thu, 22 Oct 2009 21:46:50 +0000 (00:46 +0300)]
Fix GWin32DirectoryMonitor

GWin32DirectoryMonitor was quite broken, but nobody had apparently
noticed, or at least not filed any bug. Only now with a bleeding edge
GTK+ file chooser does the code get exercised in common programs like
gtk-demo or GIMP, apparently. Bug #598899.