13594 Commits

Author SHA1 Message Date
Ryan Lortie
cf1922965a g_file_set_contents(): don't fsync on ext3/4
ext3 and ext4 (for quite some time) with default mount options don't
need fsync() to ensure safety of replace-by-rename.  Stop doing that for
these filesystems.

Note: this patch also impacts ext2, which is probably not safe, but I
don't know of any way to check ext2. vs the others because they all have
the same magic numbers (short of opening /proc/mount).

This patch assumes that if BTRFS_SUPER_MAGIC is defined then so will be
EXT3_SUPER_MAGIC.

https://bugzilla.gnome.org/show_bug.cgi?id=701560
2013-06-09 18:15:54 -04:00
Ryan Lortie
ee8d3333dd g_file_set_contents: change {posix_ => }fallocate
Use fallocate() instead of posix_fallocate() so that we just fail
instead of getting the emulated version from the libc.

https://bugzilla.gnome.org/show_bug.cgi?id=701560
2013-06-09 18:15:46 -04:00
Ryan Lortie
c244222d65 g_file_set_contents(): fix simple logic error
CI FTW.
2013-06-09 18:15:34 -04:00
Ryan Lortie
dad3cb55cf g_file_set_contents(): use unistd instead of stdio
Use a normal write() system call instead of fdopen() and fwrite().

This will definitely work on UNIX system and should work on Windows as
well...

As an added bonus, we can use g_close() now as well.

https://bugzilla.gnome.org/show_bug.cgi?id=701560
2013-06-09 18:15:26 -04:00
Ryan Lortie
75c0593a26 g_file_set_contents(): don't allocate display name
g_file_set_contents() sets a GError in the event of various failures
that count occur.  It uses g_filename_display_name() in order to get the
filename to include in the messages.

Factor out the error handling to make it easier to allocate the display
name only when we need it (instead of allocating it every time).

https://bugzilla.gnome.org/show_bug.cgi?id=701560
2013-06-09 18:15:15 -04:00
Ryan Lortie
2d827a25af g_file_set_contents(): use posix_fallocate()
Extents-based filesystems like knowing in advance how much data will be
written to a file in order to prevent fragmentation.  If we have it, use
posix_fallocate() before writing data in g_file_set_contents().

https://bugzilla.gnome.org/show_bug.cgi?id=701560
2013-06-09 18:15:07 -04:00
William Jon McCann
5d1969c8cb Fix property example in gobject tutorial
https://bugzilla.gnome.org/show_bug.cgi?id=692848
2013-06-09 18:13:28 -04:00
Matthias Clasen
a2f1b4b60e Trivial doc typo fix 2013-06-09 18:13:00 -04:00
Matthias Clasen
6e4b7a4ab8 Trivial documentation typos 2013-06-09 18:12:53 -04:00
Matthias Clasen
baed05fbea Avoid a segfault in gdbus tool
When the interface name is invalid, we don't get an error
back from g_dbus_connection_call_sync.
2013-06-09 18:11:59 -04:00
Simon Kågedal Reimer
b14e899b5e G_GNUC_FORMAT: documentation error
Attribute should be placed just before the semicolon, not after.
As can be seen in the example.

https://bugzilla.gnome.org/show_bug.cgi?id=699779
2013-06-09 18:11:44 -04:00
Jason L. Quinn
bc9470f3c8 spelling fixes of 'runtine' and 'adresses' in cross.xml and running.xml, respectively
https://bugzilla.gnome.org/show_bug.cgi?id=697849
2013-06-09 18:11:32 -04:00
Giovanni Campagna
03d3a53876 GThreadedResolver: set an error if no records could be found
It is possible that the upstream servers return something, but
we then filter all results because they are of the wrong type.
In that case the API and subsequent GTask calls expect a GError
to be set.

https://bugzilla.gnome.org/show_bug.cgi?id=696857
2013-06-09 18:07:09 -04:00
Chun-wei Fan
36284c5d59 Fix the GObject Visual Studio Projects
Update G_LOG_DOMAIN to be "GLib-GObject" so that we are consistent with
the autotools builds, and that tests expecting the log domain to be
"GLib-GObject" would not fail.
2013-05-27 15:57:54 +08:00
Chun-wei Fan
f3b1bab8ad Fix the GLib Visual Studio Projects
Define the G_LOG_DOMAIN of the GLib DLL as "GLib", because:
-This makes it consistent with the autotools builds
-Some tests expect the log domain to be "GLib"
2013-05-27 13:24:58 +08:00
Shankar Prasad
e7ba0c489a updated kn translations 2013-05-14 15:27:33 +05:30
Matthias Clasen
ced0cea5bb Bump versin 2013-05-13 09:59:47 -04:00
Matthias Clasen
469d4ac68a 2.36.2 2.36.2 2013-05-13 08:26:41 -04:00
Kjartan Maraas
9ba55166dc Updated Norwegian bokmål translation 2013-05-13 11:14:48 +02:00
Мирослав Николић
22f3503414 Updated Serbian translation 2013-05-13 10:30:05 +02:00
Matthias Clasen
ca3dba9be2 Clarify GValueArray docs
Don't refer to Quicksort in the documentation of
g_value_array_sort, but just to qsort().
2013-05-09 16:05:20 -04:00
Matthias Clasen
a1a621785f Document all gtester-report options
The --subunit option was missing from the man page.
2013-05-04 21:13:30 -04:00
Matthias Clasen
3fbcf027ce Document all glib-mkenums placeholders
The @ENUMPREFIX@ placeholder was missing in the man page.
2013-05-04 21:13:24 -04:00
Matthias Clasen
3dbde50835 Document all glib-genmarshal options
The --stdinc option was missing from the man page.
2013-05-04 21:13:18 -04:00
Matthias Clasen
059f5a7e12 Fix a typo 2013-05-04 21:13:09 -04:00
Matthias Clasen
20b349ccc5 Document all gdbus-codegen options
The --help and --xml-files options were missing from the man page.
2013-05-04 21:13:02 -04:00
Dan Winship
879692b287 gbitlock: fix this to not unconditionally use futex emulation
Ryan accidentally committed some debugging code a long time ago,
causing this file to always use futex emulation even when real futex
support was available. I noticed this a while later and pointed it out
to him, and assumed he was going to fix it, but I guess he assumed I
was going to fix it, and then neither of us did...

https://bugzilla.gnome.org/show_bug.cgi?id=699500
2013-05-04 21:12:54 -04:00
Matthias Clasen
91179be5a8 Silently handle icon being NULL
While an emblemed icon without a base icon is not very
useful, no need to crash here.
This was crashing the object finalization test in gtk.
2013-05-04 21:12:48 -04:00
Colin Walters
03086e0b0f tests/mappedfile: Also handle ENOMEM
The RHEL6.4 kernel gives me that instead of EINVAL.

https://bugzilla.gnome.org/show_bug.cgi?id=699485
2013-05-04 21:12:42 -04:00
Simon McVittie
0ba982e058 GSocks5Proxy: don't crash if parsing negotiation reply fails
The GError should be initialized to NULL, otherwise we'll
"pile up" errors, then try to free an uninitialized pointer.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Dan Winship <danw@gnome.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=699493
2013-05-02 18:37:59 +01:00
Aurimas Černius
a70f7cd043 Updated Lithuanian translation 2013-04-27 22:45:15 +03:00
Matej Urbančič
a73a14b4f9 Updated Slovenian translation 2013-04-27 21:29:11 +02:00
Andika Triwidada
eb1bbb2d66 Updated Indonesian translation 2013-04-27 09:20:08 +07:00
Milo Casagrande
1711b41ae8 [l10n] Updated Italian translation. 2013-04-25 09:01:11 +02:00
Piotr Drąg
a471ce94bc Updated Polish translation 2013-04-24 00:01:48 +02:00
Ryan Lortie
f3b1054b0e Partially revert "Merge waitpid() from g_spawn_sync into gmain()"
This partially reverts commit ce0022933c255313e010b27f977f4ae02aad1e7e.

It used to be safe to use g_spawn_sync() from processes that had their
own SIGCHLD handler because it simply called wait().  When it was
changed to depend on the GLib child watching infrastructure this meant
that GLib had to own the SIGCHLD handler.

This caused hangs in at least Pidgin.

The patch contained two other improvements to the child watch code which
we want to keep, so only revert the changes to gspawn itself.

https://bugzilla.gnome.org/show_bug.cgi?id=698081
2013-04-23 15:00:01 -04:00
Giovanni Campagna
7304bbd5d8 GVariant: fix transfer annotation
g_variant_new_from_bytes() returns a floating reference, so it
must be annotated (transfer none)

https://bugzilla.gnome.org/show_bug.cgi?id=697887
2013-04-16 15:58:35 +02:00
Ryan Lortie
e02fbacc9d One more NEWS 2.36.1 2013-04-15 23:58:15 +02:00
Marc-André Lureau
b972018d6c win32: add back missing _utf8 symbols on x64 builds
The _utf8 functions have been wrongly removed from GLib on x64.

https://bugzilla.gnome.org/show_bug.cgi?id=697879
2013-04-15 23:27:24 +02:00
Matthias Clasen
d8c9b263e6 2.36.1 2013-04-15 10:18:40 -04:00
Marek Kasik
7630f2ab5d tests: Add test for disabled help options
Test whether help options are hidden when they are disabled
by g_option_context_set_help_enabled(.., FALSE).

https://bugzilla.gnome.org/show_bug.cgi?id=697652
2013-04-12 17:06:21 +02:00
Marek Kasik
3e3fe296e5 Don't show help options when help is disabled
Check whether help is enabled when creating help text
in g_option_context_get_help().

https://bugzilla.gnome.org/show_bug.cgi?id=697652
2013-04-12 17:06:17 +02:00
Shankar Prasad
e768a5cd70 Updated kn translations 2013-04-05 17:22:26 +05:30
Shankar Prasad
7caba4726d Updated kn translations 2013-04-05 16:20:05 +05:30
Shankar Prasad
94a5a5982a Updated kn translations 2013-04-05 16:19:01 +05:30
Shankar Prasad
a63d850760 Updated kn translations 2013-04-05 12:38:53 +05:30
Ryan Lortie
cf1285a4a4 gtype: interface-after-init exception for gtk#
gtk# also has a problem with the new interface-after-init restriction
that nobody noticed until now.  Add an exception for them as well so
that they have a cycle or so to sort things out.

https://bugzilla.gnome.org/show_bug.cgi?id=687659
2013-04-04 11:59:53 -04:00
Ryan Lortie
9982e18372 gtype: interface-after-init exception for glibmm
glibmm has a pretty difficult-to-solve problem caused by our recent
change to deny addition of interfaces to classes after initialisation.

They're looking for a long-term workaround for the problem, but in the
meantime we can allow the registration to succeed (with warning) if the
class looks like it's being defined by gtkmm.

https://bugzilla.gnome.org/show_bug.cgi?id=697229
2013-04-04 11:59:49 -04:00
Hib Eris
3b0b671f2b Fix compile error in gdbusmessage.c for win64
https://bugzilla.gnome.org/show_bug.cgi?id=696973
2013-04-01 08:28:29 +02:00
Andika Triwidada
599030ac05 Updated Indonesian translation 2013-03-29 13:02:18 +07:00