This is an interface for stateful conversions of data. Its a generic
interface suitable for things like IConv, compression, decompression,
and regexp replacement.
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.
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.
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'.
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.
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>
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
5a633f82db as that is now no longer
necessary.
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.
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.