platform/upstream/glib.git
11 years agog_unix_open_pipe: Add missing F_SETFD
Colin Walters [Tue, 11 Dec 2012 21:53:48 +0000 (16:53 -0500)]
g_unix_open_pipe: Add missing F_SETFD

Spotted by Ray Strode <rstrode@redhat.com>

While we're here, microoptimize by skipping the fcntl() calls if flags
is 0.

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

11 years agogobject.symbols: Update for g_checksum_get_type()
Colin Walters [Tue, 11 Dec 2012 01:30:44 +0000 (20:30 -0500)]
gobject.symbols: Update for g_checksum_get_type()

See previous commit.

11 years agoMake GChecksum more fully introspectable
Colin Walters [Mon, 10 Dec 2012 15:50:30 +0000 (10:50 -0500)]
Make GChecksum more fully introspectable

In 2.34, g_compute_checksum_for_bytes() was added, but this patch
allows binding users to use the incremental update API; this is
significantly more efficient than reading entire files into memory.

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

11 years agogio: Don't leak the temp file when g_file_replace() fails or is cancelled
Dan Winship [Wed, 7 Nov 2012 15:36:05 +0000 (10:36 -0500)]
gio: Don't leak the temp file when g_file_replace() fails or is cancelled

If the temp file still exists at the end of the close operation,
unlink it.

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

11 years agoAdd g_type_get_type_registration_serial()
Alexander Larsson [Fri, 7 Dec 2012 16:34:52 +0000 (17:34 +0100)]
Add g_type_get_type_registration_serial()

This lets you cache type lookup information and then know when
the cache information is out of date. In particular, we want this
in order to be able to cache g_type_from_name() lookups in the Gtk+
theme machinery.

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

11 years agofileinfo: mark lost+found/ root directory as hidden
David Zeuthen [Thu, 6 Dec 2012 21:21:58 +0000 (16:21 -0500)]
fileinfo: mark lost+found/ root directory as hidden

This was reported in bug 689800.

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

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoSupport for .hidden files
Timothy Arceri [Wed, 28 Nov 2012 23:50:55 +0000 (10:50 +1100)]
Support for .hidden files

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

11 years agoadd two missing version macros
Ryan Lortie [Thu, 6 Dec 2012 18:56:39 +0000 (13:56 -0500)]
add two missing version macros

11 years agovarious: add missing cases of #include "config.h"
Ryan Lortie [Thu, 6 Dec 2012 18:29:31 +0000 (13:29 -0500)]
various: add missing cases of #include "config.h"

11 years agog_get_home_dir(): honour $HOME
Ryan Lortie [Sun, 2 Dec 2012 17:07:24 +0000 (12:07 -0500)]
g_get_home_dir(): honour $HOME

If the $HOME environment variable is set, prefer that to the entry in
/etc/passwd.

This brings us in line with almost every other utility and library on
UNIX-like systems while avoiding some of the more complicated
possibilities that have been suggested.

This incompatible change has been petitioned for quite some time by
many, and in particular from the Debian world, which carries a patch
that adds a new G_HOME environment variable with the same meaning as
this patch now assigns to HOME.

The primary motivation for the change was to increase the testability of
GLib-based programs from 'make check' types of frameworks: it is now
possible to set HOME to a temp directory to avoid the testsuite
modifying the user's real home directory.

The change also brings us increased compliance with the XDG Base
Directory Specification.  The specification specifically states that the
default values should be computed based on the HOME environment
variable, whereas we were basing them on the value from /etc/passwd.

The change was agreed to by all in attendence at the November 29 Gtk+
developer meeting.

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

11 years agoUpdated Spanish translation
Daniel Mustieles [Wed, 5 Dec 2012 19:08:15 +0000 (20:08 +0100)]
Updated Spanish translation

11 years agogdbusobjectskeleton: Fix compiler warnings
Colin Walters [Fri, 30 Nov 2012 20:18:01 +0000 (15:18 -0500)]
gdbusobjectskeleton: Fix compiler warnings

The G_OBJECT_WARN_INVALID_PROPERTY_ID() macro uses a local variable
named "_object"; work around this by using "object" as the variable we
pass in.

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

11 years agogobject: Use local variable names in macros less likely to clash
Colin Walters [Fri, 30 Nov 2012 20:22:54 +0000 (15:22 -0500)]
gobject: Use local variable names in macros less likely to clash

At least GDBus had code that had "_object" as a parameter to one of
its functions, but this clashes with the GObject macro
G_OBJECT_WARN_INVALID_PROPERTY_ID() which created a local "_object".

Since many of us cargo cult around copies of objects, let's be
defensive here and use local variable names less likely to clash with
application code.

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

11 years agowin32: suppress fatal error dialog box when running tests
Dan Winship [Fri, 16 Nov 2012 03:26:54 +0000 (22:26 -0500)]
win32: suppress fatal error dialog box when running tests

When running a test program (ie, if g_test_init() has been called),
don't pop up a dialog box when a fatal error occurs. Just print the
message to stderr and exit.

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

11 years agogsocketlistener: set source object tag before completing the GTask
Aleksander Morgado [Mon, 3 Dec 2012 14:59:06 +0000 (15:59 +0100)]
gsocketlistener: set source object tag before completing the GTask

Otherwise, the finish() method won't find the source object.

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

11 years agowin32: Fix GDBusDaemon build when glib is built as a static lib
Kalev Lember [Sun, 2 Dec 2012 14:34:37 +0000 (15:34 +0100)]
win32: Fix GDBusDaemon build when glib is built as a static lib

This makes sure not to ifdef _g_io_win32_get_module() out when glib is
built as a static lib, and also fixes it to work when DllMain isn't
available.

The implementation uses GetModuleHandleEx() which is only available on
Windows XP and later, so this commit effectively drops the Windows 2000
support in glib. Earlier commit 731b4699 already took care of defining
_WIN32_WINNT to support the Windows XP API.

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

11 years agowin32: Use AC_CHECK_TOOL to find dlltool
Arnel A. Borja [Fri, 14 Sep 2012 00:58:04 +0000 (08:58 +0800)]
win32: Use AC_CHECK_TOOL to find dlltool

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

11 years agogtask: annotate source_object arguments and return values as GObject
Evan Nemerson [Thu, 15 Nov 2012 19:52:28 +0000 (11:52 -0800)]
gtask: annotate source_object arguments and return values as GObject

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

11 years agoOptimize reading strings when deserializing gdbus messages
Mike Gorse [Thu, 29 Nov 2012 22:51:59 +0000 (16:51 -0600)]
Optimize reading strings when deserializing gdbus messages

Now that we're directly accessing the memory holding a message blob,
we can access strings directly while reading them. This speeds up
read_string significantly, since we no longer malloc/memcpy/free.

11 years agog_file_enumerate_children: Fix reference to wrong error code
Matthias Clasen [Fri, 30 Nov 2012 14:03:20 +0000 (09:03 -0500)]
g_file_enumerate_children: Fix reference to wrong error code

This function does in fact return G_IO_ERROR_NOT_DIRETORY, and
not G_FILE_ERROR_NOTDIR.

11 years agoAssamese translation updated
Nilamdyuti Goswami [Fri, 30 Nov 2012 11:53:29 +0000 (17:23 +0530)]
Assamese translation updated

11 years agoUpdated Hebrew translation.
Yaron Shahrabani [Fri, 30 Nov 2012 09:01:53 +0000 (11:01 +0200)]
Updated Hebrew translation.

11 years agoUpdated Hebrew translation.
Yaron Shahrabani [Fri, 23 Nov 2012 08:11:32 +0000 (10:11 +0200)]
Updated Hebrew translation.

11 years agoDon't look for icons called "(null)" if no xdg mime icon
Alexander Larsson [Fri, 30 Nov 2012 08:39:13 +0000 (09:39 +0100)]
Don't look for icons called "(null)" if no xdg mime icon

11 years agoFix race condition in gapplication/basic test
Emilio Pozuelo Monfort [Thu, 29 Nov 2012 16:48:35 +0000 (17:48 +0100)]
Fix race condition in gapplication/basic test

The three processes this test creates need to be executed
in order, and g_usleep was used to guarantee that.
However, under heavy load, that is not enough. Instead,
wait until the children start by making sure they have
written to stdout before proceeding any further.

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

11 years agoUse a simple struct when reading and writing gdbus messages
Mike Gorse [Thu, 1 Nov 2012 00:44:03 +0000 (19:44 -0500)]
Use a simple struct when reading and writing gdbus messages

GData*Streams incur significant overhead, and we do not need all of the
functionality that they provide, since we only ever read from/write to
memory when handling message blobs, so it is more performant to use a
simple structure.

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

11 years agoAdded G_IO_ERROR_BROKEN_PIPE
Juan Pablo Ugarte [Thu, 29 Nov 2012 19:12:25 +0000 (16:12 -0300)]
Added G_IO_ERROR_BROKEN_PIPE

11 years agogio: GLIB_AVAILABLE_IN to more APIs
Ryan Lortie [Thu, 29 Nov 2012 14:03:32 +0000 (09:03 -0500)]
gio: GLIB_AVAILABLE_IN to more APIs

Useful on its own, but also for a future patch for symbol visibility.

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

11 years agoUnconditionally use g_content_type_get_symbolic_icon()
Kalev Lember [Wed, 28 Nov 2012 22:25:52 +0000 (23:25 +0100)]
Unconditionally use g_content_type_get_symbolic_icon()

... and g_content_type_get_generic_icon_name(). The new functions are
implemented for Win32 since commit dace477c, so we no longer need to
guard them with G_OS_UNIX.

11 years agoRevert "Fix compilation on Android with the bionic C library"
Sebastian Dröge [Wed, 28 Nov 2012 15:55:12 +0000 (16:55 +0100)]
Revert "Fix compilation on Android with the bionic C library"

This reverts commit cb0ed84d4022e0fba6aaa9e99e258d8d507a90e5.

It wasn't meant to be pushed yet.

11 years agoFix duplicated case value for mingw runtimes defining EOVERLFOW as EFBIG
Andoni Morales Alastruey [Wed, 28 Nov 2012 15:34:18 +0000 (16:34 +0100)]
Fix duplicated case value for mingw runtimes defining EOVERLFOW as EFBIG

11 years agoFix compilation on Android with the bionic C library
Sebastian Dröge [Wed, 28 Nov 2012 15:28:28 +0000 (16:28 +0100)]
Fix compilation on Android with the bionic C library

11 years agoProtect against strcmp() on NULL strings
Sebastian Dröge [Wed, 28 Nov 2012 15:25:43 +0000 (16:25 +0100)]
Protect against strcmp() on NULL strings

11 years agog_unix_signal_add_full(): Annotate to shadow g_unix_signal_add()
Martin Pitt [Wed, 28 Nov 2012 11:09:17 +0000 (12:09 +0100)]
g_unix_signal_add_full(): Annotate to shadow g_unix_signal_add()

Just like g_timeout_add() and friends, we want to hide the unintrospectable
g_unix_signal_add() from GI bindings and present g_unix_signal_add_full() as
GLib.unix_signal_add() to them.

11 years agoAdd new api to the docs
Matthias Clasen [Wed, 28 Nov 2012 05:04:45 +0000 (00:04 -0500)]
Add new api to the docs

11 years agoFix suprisingly hard-to-spot typo
Matthias Clasen [Wed, 28 Nov 2012 05:01:11 +0000 (00:01 -0500)]
Fix suprisingly hard-to-spot typo

11 years agoGMemoryOutputStream: Add new _resizable() constructor usable from bindings
Colin Walters [Thu, 22 Nov 2012 13:23:27 +0000 (08:23 -0500)]
GMemoryOutputStream: Add new _resizable() constructor usable from bindings

Really, the memory output stream API is too warped around the model
where it's a fixed size buffer that you've already allocated.  Even in
C, I find myself always wanting to use it to just accumulate data into
an arbitrary-sized buffer it allocates.

Unfortunately, it's also not usable from bindings because it's not
common to bind g_free() and g_realloc(), but if you just pass NULL, you
get the default of a fixed size, which is useless as per above.

I am going to use this from a gjs test case, and the GSubprocess test
cases also will use it.

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

11 years agofileinfo: Add missing AVAILABLE macro
Bastien Nocera [Tue, 27 Nov 2012 16:23:08 +0000 (17:23 +0100)]
fileinfo: Add missing AVAILABLE macro

As forgotten in previous patch.

11 years agofileinfo: Add _get_deletion_date() helper
Bastien Nocera [Tue, 27 Nov 2012 15:59:28 +0000 (16:59 +0100)]
fileinfo: Add _get_deletion_date() helper

For use in gnome-settings-daemon, so that callers don't have
to parse the deletion date by hand.

11 years agogio: New API for GFile from remote commandline arg
Ryan Lortie [Sun, 25 Nov 2012 19:25:59 +0000 (14:25 -0500)]
gio: New API for GFile from remote commandline arg

Add a pair of new APIs: one to GFile to create a new file from a
commandline arg relative to a given cwd and one to
GApplicationCommandLine to create a GFile from an arg, relative to the
cwd of the invoking commandline.

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

11 years agoUpdated Odia Translation with FUEL implementation.
ManojKumar Giri [Tue, 27 Nov 2012 13:51:43 +0000 (19:21 +0530)]
Updated Odia Translation with FUEL implementation.

11 years agog_test_expect_message: fix pattern syntax in example code
Dan Winship [Sat, 24 Nov 2012 20:47:45 +0000 (15:47 -0500)]
g_test_expect_message: fix pattern syntax in example code

11 years agostop using libgthread internally
Ryan Lortie [Sun, 25 Nov 2012 19:47:53 +0000 (14:47 -0500)]
stop using libgthread internally

The gobject tools (glib-genmarshal and gobject-query) were linking
against libgthread.  Stop that.

Also, remove the gthread_INCLUDES internal automake substitution.

11 years agoBug 681685: Transcoding fails on OSX
John Ralls [Sun, 25 Nov 2012 07:35:08 +0000 (16:35 +0900)]
Bug 681685: Transcoding fails on OSX

Add aliases for codesets supported by iconv and included in locales.
Ifdef-out tests in glib/tests/gdatetime.c which fail because on OSX only
ASCII numbers or symbols are returned for the format.

Even though nl_langinfo does weird things on Darwin in some cases, it
still acts correctly when LANG/LC_ALL is set to a supported
locale.codeset.

11 years agoAdd GApplication local_command_line test
Paolo Borelli [Sat, 24 Nov 2012 18:12:13 +0000 (19:12 +0100)]
Add GApplication local_command_line test

Assert that startup and shutdown are not called if we return TRUE from
local_command_line

11 years agoGApplication: don't shutdown() on failure to start
Ryan Lortie [Sat, 24 Nov 2012 18:20:29 +0000 (13:20 -0500)]
GApplication: don't shutdown() on failure to start

If we fail to start (and don't register() or call startup()) then also
don't call shutdown().  This happens in the case of failing to parse
commandline arguments, for example.

11 years agogdatetime: Fix some docs sed damage
Ryan Lortie [Sat, 24 Nov 2012 16:23:22 +0000 (11:23 -0500)]
gdatetime: Fix some docs sed damage

11 years agohindi translation update
Rajesh Ranjan [Fri, 23 Nov 2012 08:52:25 +0000 (14:22 +0530)]
hindi translation update

11 years agohindi translation update
Rajesh Ranjan [Fri, 23 Nov 2012 08:34:34 +0000 (14:04 +0530)]
hindi translation update

11 years agohindi translation update
Rajesh Ranjan [Fri, 23 Nov 2012 08:32:05 +0000 (14:02 +0530)]
hindi translation update

11 years agoImprove i18n documentation
Sébastien Wilmet [Thu, 22 Nov 2012 18:41:19 +0000 (19:41 +0100)]
Improve i18n documentation

Clearly explain which gettext functions must be called. It depends
whether the program is an application or a library.

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

11 years agoconfigure: Make GNUC visibility attribute test more reliable.
Krzesimir Nowak [Thu, 22 Nov 2012 15:56:52 +0000 (16:56 +0100)]
configure: Make GNUC visibility attribute test more reliable.

Using "int main (int argc, char** argv)" in this test causes GCC to
issue two warnings about unused variable if CFLAGS envvar has
-Wunused-parameter (or just -Wextra). Those warnings are not related
to the attribute checking but they can make the test fail anyway.

11 years agoAssamese translation updated
Nilamdyuti Goswami [Thu, 22 Nov 2012 16:29:15 +0000 (21:59 +0530)]
Assamese translation updated

11 years agoUpdated Odia Translation with FUEL implementation.
ManojKumar Giri [Thu, 22 Nov 2012 14:50:05 +0000 (20:20 +0530)]
Updated Odia Translation with FUEL implementation.

11 years agoUpdated Odia Translation with FUEL implementation.
ManojKumar Giri [Thu, 22 Nov 2012 14:48:15 +0000 (20:18 +0530)]
Updated Odia Translation with FUEL implementation.

11 years agogthread: add AVAILABLE_IN_2_32 annotations
Will Thompson [Wed, 14 Nov 2012 14:59:42 +0000 (14:59 +0000)]
gthread: add AVAILABLE_IN_2_32 annotations

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

11 years agoAdd a test for the GAppLaunchContext::launched signal
Matthias Clasen [Wed, 21 Nov 2012 22:39:19 +0000 (17:39 -0500)]
Add a test for the GAppLaunchContext::launched signal

11 years agoGAppLaunchContext: make it possible ot get the effective startup id
Matthias Clasen [Fri, 16 Nov 2012 23:24:21 +0000 (18:24 -0500)]
GAppLaunchContext: make it possible ot get the effective startup id

gnome-session needs to know the startup id that was given to
a started app; this was not available via GAppLaunchContext.
This commit adds a ::launched signal to get this information.
At the same time, turn the launch_failed vfunc into a signal
as well.

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

11 years agoAdd new api to exported symbols
Matthias Clasen [Thu, 22 Nov 2012 02:14:26 +0000 (21:14 -0500)]
Add new api to exported symbols

11 years agoAdd new API to the docs
Matthias Clasen [Thu, 22 Nov 2012 02:13:40 +0000 (21:13 -0500)]
Add new API to the docs

11 years agoAdd a test for new GDesktopAppInfo getters
Matthias Clasen [Wed, 21 Nov 2012 21:15:14 +0000 (16:15 -0500)]
Add a test for new GDesktopAppInfo getters

11 years agoGDesktopAppInfo: add enough api to make autostart implementable
Matthias Clasen [Fri, 16 Nov 2012 23:22:45 +0000 (18:22 -0500)]
GDesktopAppInfo: add enough api to make autostart implementable

gnome-session still uses EggDesktopFile, since GDesktopAppInfo is
missing a handful of APIs that are needed to implement the
autostart spec. This patch adds the minimum that is required.

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

11 years agobuild/win32/Makefile.am: Also go into the vs11 subdirectory
Chun-wei Fan [Thu, 22 Nov 2012 00:59:02 +0000 (08:59 +0800)]
build/win32/Makefile.am: Also go into the vs11 subdirectory

11 years agoAdd autotools scripts to create VS2012 projects
Chun-wei Fan [Mon, 19 Nov 2012 04:58:55 +0000 (12:58 +0800)]
Add autotools scripts to create VS2012 projects

As the project file format for Visual Studio 2012 is only slightly
different from Visual Studio 2010 projects, we can provide support for
building GLib (and other projects) with Visual Studio 2012 with relatively
little effort.  This might change when we eventually get GLib to work with
the Windows 8 (Modern UI/formerly Metro) APIs, but this will suffice for
the time being for people needing to build GLib with Visual Studio 2012.

Basically all that needs to be done at 'make dist' is:
-Copy the .sln/.props/README.txt/.vcxproj files and replace the VS2010
 stuff with VS2012 stuff
-Copy the .vcxproj.filters as is

11 years agoGObject: Fix code snippet in description of floating reference.
Kjell Ahlstedt [Mon, 12 Nov 2012 16:07:39 +0000 (17:07 +0100)]
GObject: Fix code snippet in description of floating reference.

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

11 years agoconfigure: add missing square bracket in AS_IF for memmove
Olivier Blin [Wed, 14 Nov 2012 18:08:10 +0000 (19:08 +0100)]
configure: add missing square bracket in AS_IF for memmove

This has been broken in commit 54e31ab4f172bbb28434eafc34c9345a93c9ccf5
It seems to be the only hunk that was incorrectly converted.

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

11 years agogchecksum: Adds SHA512 support
Eduardo Lima Mitev [Fri, 16 Nov 2012 17:20:09 +0000 (18:20 +0100)]
gchecksum: Adds SHA512 support

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

11 years agoUpdated Spanish translation
Daniel Mustieles [Tue, 20 Nov 2012 14:50:54 +0000 (15:50 +0100)]
Updated Spanish translation

11 years agoAdd boxed GType for GThread
Sebastian Dröge [Tue, 20 Nov 2012 07:58:30 +0000 (08:58 +0100)]
Add boxed GType for GThread

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

11 years agoUpdated Kannada Translations
Shankar Prasad [Tue, 20 Nov 2012 06:12:27 +0000 (11:42 +0530)]
Updated Kannada Translations

11 years agofile-info: Don't leak the filename if thumbnailing failed
Debarshi Ray [Mon, 19 Nov 2012 23:11:56 +0000 (00:11 +0100)]
file-info: Don't leak the filename if thumbnailing failed

Fixes: https://bugzilla.gnome.org/686895

11 years ago*bump*
Ryan Lortie [Mon, 19 Nov 2012 23:20:41 +0000 (18:20 -0500)]
*bump*

11 years agoNEWS 2.35.2 upstream/2.35.2
Ryan Lortie [Mon, 19 Nov 2012 21:14:05 +0000 (16:14 -0500)]
NEWS

11 years agoRemove two accidentally-exported symbols
Ryan Lortie [Mon, 19 Nov 2012 21:10:55 +0000 (16:10 -0500)]
Remove two accidentally-exported symbols

This reverts commit 85976cf91deae6ac7cf1639a187a424ff7296968 and
properly removes the offending symbols from gio.symbols.

These two private symbols were found to be exported during Colin's
recent work cleaning up function visibility (among other things).

They were never exposed in any header file and I am 100% certain that
they have never been used by anybody.  They were always private -- only
exposed on the library symbol list.

This change will cause ABI checking tools to complain that we have
removed functions, but the change is completely harmless for actual
applications.

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

11 years agoRevert "[gobject] set all properties before constructed()"
Ryan Lortie [Mon, 19 Nov 2012 15:28:55 +0000 (10:28 -0500)]
Revert "[gobject] set all properties before constructed()"

This reverts commit 028d4a03f2baa7ca9243a2819f30ffb0d5e137d7.

I thought that we would be able to get away with this incompatible
change but it appears to impact far too much existing code.  The only
thing we can do is revert.

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

11 years agoUpdate config.h.win32.in
Chun-wei Fan [Mon, 19 Nov 2012 04:38:28 +0000 (12:38 +0800)]
Update config.h.win32.in

Make its entries correspond to the entries in config.h.in, and use
_strnicmp for strncasecmp on Visual C++.

11 years agogio-kqueue: use O_EVTONLY on MacOS
Antoine Jacoutot [Sat, 17 Nov 2012 08:44:48 +0000 (09:44 +0100)]
gio-kqueue: use O_EVTONLY on MacOS

MacOS provides the O_EVTONLY flag to open(2) which allow to open a file
for monitoring without preventing an unmount of the volume that contains
it.

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

11 years agoBug 673047 - gunicollate is broken on OS X
Michael Natterer [Fri, 16 Nov 2012 17:48:09 +0000 (18:48 +0100)]
Bug 673047 - gunicollate is broken on OS X

Apply slightly modified patch from Camillo Lugaresi which fixes
gunicollate for OSX >= 10.6. It was totally hilariously broken
for anyone on 10.6 and later, I dont know if it's now broken
on 10.5, but better fix it for the vast majority of users.

11 years agoFix a broken link in GConf migration guide
Kalev Lember [Fri, 16 Nov 2012 16:33:14 +0000 (17:33 +0100)]
Fix a broken link in GConf migration guide

gnome-utils git repo was moved to archive/ and this broke the link.

11 years agowin32: re-fix the _utf8 compat function situation
Dan Winship [Thu, 15 Nov 2012 23:18:54 +0000 (18:18 -0500)]
win32: re-fix the _utf8 compat function situation

The previous fix didn't work, because every place within glib that
used any of the functions also needed to be including win32compat.h.

So, move the prototypes back to their original headers (but at least
all in one place at the bottom).

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

11 years agodocs: Fix spelling of "exceed" in gobject/gtype.c
Paul Menzel [Wed, 14 Nov 2012 17:49:50 +0000 (18:49 +0100)]
docs: Fix spelling of "exceed" in gobject/gtype.c

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

11 years agogdbus: improve documentation of the GDBusError section
Aleksander Morgado [Thu, 15 Nov 2012 08:31:14 +0000 (09:31 +0100)]
gdbus: improve documentation of the GDBusError section

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

11 years agogtestutils: don't try to print long doubles
Dan Winship [Sun, 11 Nov 2012 18:07:30 +0000 (13:07 -0500)]
gtestutils: don't try to print long doubles

A few gtestutils function use long double as a type that can (in
theory) hold any int or any double. But win32 doesn't support long
doubles in printf, so convert them to ints or doubles first before
trying to print them.

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

11 years agowin32: work around broken winsock prototypes
Dan Winship [Sun, 11 Nov 2012 18:05:16 +0000 (13:05 -0500)]
win32: work around broken winsock prototypes

Re-#define a few socket functions to work around winsock's prototypes
having, eg, "int *" rather than "unsigned int *", or "char *" rather
than "void *".

(Also fix two places that mistakenly assumed guint==guint32.)

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

11 years agowin32: avoid printf format warnings on nonstandard formats
Dan Winship [Sun, 11 Nov 2012 16:29:16 +0000 (11:29 -0500)]
win32: avoid printf format warnings on nonstandard formats

glib/tests/test-printf tests some non-standard printf formats on
Windows, which gcc doesn't recognize, and so complains about. Disable
those warnings for that test.

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

11 years agowin32: make gio/tests/gdbus-proxy.c compile
Dan Winship [Sun, 11 Nov 2012 16:21:07 +0000 (11:21 -0500)]
win32: make gio/tests/gdbus-proxy.c compile

win32 doesn't have kill(), so this won't even compile on Windows
unless that is ifdeffed out. The test probably still doesn't *work*,
but...

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

11 years agogvariant-internal.h: fix the include hack
Dan Winship [Sat, 10 Nov 2012 16:13:24 +0000 (11:13 -0500)]
gvariant-internal.h: fix the include hack

gvariant-internal.h was defining GLIB_COMPILATION so that it could
include individual headers, but this broke tests/gvariant on windows
because setting GLIB_COMPILATION changes the definition of GLIB_VAR,
causing external variables to not be found. Fix this by having it
define __GLIB_H_INSIDE__ instead.

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

11 years agoGLocalFile: canonicalize the initial directory separator
Dan Winship [Sat, 10 Nov 2012 16:09:18 +0000 (11:09 -0500)]
GLocalFile: canonicalize the initial directory separator

GLocalFile was (in certain situations) translating a path like
"/foo/bar/baz" to "/foo\bar\baz" on win32. Fix it to make sure the
initial directory separator gets canonicalized too.

Fixes gio/tests/g-icon on win32.

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

11 years agowin32: various fixes to test programs
Dan Winship [Sat, 10 Nov 2012 16:06:57 +0000 (11:06 -0500)]
win32: various fixes to test programs

Fix a few win32-specific bugs in various tests, and #ifdef out code
that is UNIX- or Linux-specific that wouldn't be expected to pass on
Windows.

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

11 years agowin32: misc warning fixes
Dan Winship [Sat, 10 Nov 2012 15:58:19 +0000 (10:58 -0500)]
win32: misc warning fixes

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

11 years agowin32: move some code into #ifdef G_OS_UNIX
Dan Winship [Sun, 11 Nov 2012 16:32:40 +0000 (11:32 -0500)]
win32: move some code into #ifdef G_OS_UNIX

Fix various bits of code/declarations that are only used by G_OS_UNIX
but were still visible to G_OS_WIN32.

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

11 years agowin32: define _WIN32_WINNT globally
Dan Winship [Sat, 10 Nov 2012 15:54:43 +0000 (10:54 -0500)]
win32: define _WIN32_WINNT globally

Rather than defining _WIN32_WINNT only in a handful of files, define
it in config.h, like we do with _GNU_SOURCE.

(Also remove a "#define WIN32_LEAN_AND_MEAN" that isn't really all
that useful.)

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

11 years agowin32: prototype _glib_get_dll_directory() and _glib_get_locale_dir()
Dan Winship [Sat, 10 Nov 2012 15:51:18 +0000 (10:51 -0500)]
win32: prototype _glib_get_dll_directory() and _glib_get_locale_dir()

Rather than using "extern" declarations of these win32 functions
everywhere they're needed, just prototype them in glib-private.h.
(Which also fixes the fact that they weren't prototyped in the files
where they're defined.)

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

11 years agowin32: add gwin32compat.h, for utf8-renaming compatibility defines
Dan Winship [Thu, 15 Nov 2012 17:24:57 +0000 (12:24 -0500)]
win32: add gwin32compat.h, for utf8-renaming compatibility defines

To avoid -Wmissing-prototype warnings, we need to prototype both the
original and the _utf8 versions of all of the functions that have had
_utf8-renaming on Windows. But duplicating all the prototypes is ugly,
so rather than doing them "in-place", move them all to a new header
file just for that.

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

11 years agogsocket: fix joining/leaving multicast groups
Wim Taymans [Thu, 15 Nov 2012 10:37:20 +0000 (11:37 +0100)]
gsocket: fix joining/leaving multicast groups

Initialize the structure passed to setsockopt to 0 to avoid random
errors when joining or leaving a multicast group.

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

11 years agoRevert "gmain: Add private API to create Unix child watch that uses waitid()"
Michael Natterer [Thu, 15 Nov 2012 14:23:07 +0000 (15:23 +0100)]
Revert "gmain: Add private API to create Unix child watch that uses waitid()"

This reverts commit 93bf37ce1507380f74d4cb4cab6640fc7d2eb7d1.

11 years agoRevert "gio: Add private API to create win32 streams from fds"
Michael Natterer [Thu, 15 Nov 2012 14:22:52 +0000 (15:22 +0100)]
Revert "gio: Add private API to create win32 streams from fds"

This reverts commit 292de8cc5259eb66c40d9a74d85389650ef67747.

11 years agoRevert "gspawn: support creating pipes with O_CLOEXEC"
Michael Natterer [Thu, 15 Nov 2012 14:22:37 +0000 (15:22 +0100)]
Revert "gspawn: support creating pipes with O_CLOEXEC"

This reverts commit 2054ccad95cfdcf5eccd2ef6847c12039c9678e8.

11 years agogdbus: Fix some compiler warnings
Colin Walters [Thu, 15 Nov 2012 13:42:36 +0000 (08:42 -0500)]
gdbus: Fix some compiler warnings

Code appears to have been copy/pasted from a bit which used _object,
but I think it's clearer to always use the "self" parameter anyways.

11 years agoGFileMonitor: Add kqueue(3) support to GIO
Antoine Jacoutot [Wed, 14 Nov 2012 11:57:42 +0000 (12:57 +0100)]
GFileMonitor: Add kqueue(3) support to GIO

Written by Dmitry Matveev as part of GSoC 2011:
http://netbsd-soc.sourceforge.net/projects/kqueue4gio/

This brings native file monitoring support on systems supporting kqueue(3)
(all BSDs) and remove the need to rely on the unmaintained gamin software.
The backend adds GKqueueDirectoryMonitor and GKqueueFileMonitor.

Some parts rewritten by myself (to prevent needing a configuration file).
Helpful inputs from Colin Walters and Simon McVittie.

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