Commit Graph

16562 Commits

Author SHA1 Message Date
Matthias Clasen
b990acf7ae 2.49.2 2016-06-20 08:03:17 -04:00
Matthias Clasen
26e07869af Updates 2016-06-20 07:58:01 -04:00
Chun-wei Fan
bbf07fb15e Visual Studio builds: Fix .pc generation
The previous update did not account for when no exec_prefix is spcified,
so update that, and use ${prefix} by default.  Clean up a bit as well.
2016-06-20 10:52:06 +08:00
John Ralls
35b401c8bb Bug 767824 - Some UTC timezones incorrectly recognized on Windows 7
The condition removed erroneously excluded UTC-based and DST-less
timezones and so left the GArray with no contents, so GTimeZone functions
returned whatever random garbage was in memory.
2016-06-19 15:03:20 -07:00
Philip Withnall
fadd00c708 glocalfileoutputstream: Drop unnecessary (void) return value casts
g_close() does not have G_GNUC_WARN_UNUSED_RESULT, so these casts are
unnecessary.
2016-06-16 14:45:21 -04:00
Philip Withnall
16d674411f glocalfileoutputstream: Fix an FD leak in an error path
If a backup file is created, opened successfully, then fstat() on it
fails (perhaps due to another process deleting it in the mean time?),
the FD will be leaked.

Coverity issue: #1159485

https://bugzilla.gnome.org/show_bug.cgi?id=730187
2016-06-16 14:39:05 -04:00
Philip Withnall
195a0cb6bb gio: Add SystemTap and DTrace probes for GTask
This adds a basic tapset for GIO, covering various interesting parts of
GTask.

https://bugzilla.gnome.org/show_bug.cgi?id=759813
2016-06-15 16:15:12 -04:00
Philip Withnall
cfb692825a glib: Add more GLib main context SystemTap and DTrace probes
Expand the set of available probes, and add a few more output parameters
to some of the existing ones to make them more useful. I do not know if
this breaks any existing stability guarantees for GLib’s SystemTap
tapset, as it is effectively just adding some more local variables in
the user’s probe.

https://bugzilla.gnome.org/show_bug.cgi?id=759813
2016-06-15 16:15:12 -04:00
Philip Withnall
b26b083aa2 gio: Support using GDBusObjectManagerServer at path ‘/’
Previously this would cause an assertion failure when checking the paths
of exported objects, as it would try to check that their paths started
with ‘//’ due to mishandling the root object case.

Includes a unit test.

https://bugzilla.gnome.org/show_bug.cgi?id=761810
2016-06-15 13:27:19 -04:00
Nikita Churaev
ec40e9d921 gfileutils: Add missing (type filename) annotations
These differentiate between strings in the GLib filename encoding, and
strings in UTF-8.

https://bugzilla.gnome.org/show_bug.cgi?id=700756
2016-06-15 11:04:18 -04:00
Philip Withnall
ac1166626c gio: Add missing (type filename) annotations
These differentiate between strings in the GLib filename encoding, and
strings in UTF-8.

https://bugzilla.gnome.org/show_bug.cgi?id=700756
2016-06-15 11:04:18 -04:00
Philip Withnall
f8ff1049d3 gio: Add missing (nullable) annotation
Add it to g_application_command_line_get_cwd(). Also add a clarifying
internal comment about the cwd private member.

https://bugzilla.gnome.org/show_bug.cgi?id=700756
2016-06-15 11:03:55 -04:00
Philip Withnall
c91411464e gfileutils: Fix a signed/unsigned integer comparison
Also use size_t rather than int, allowing for larger files to be
handled.

https://bugzilla.gnome.org/show_bug.cgi?id=700756
2016-06-15 10:59:56 -04:00
Hans Petter Jansson
ae048625fe GDbusProxy: Plug memory leak.
proxy->priv->name_owner gets overwritten in async_init_data_set_name_owner() on the
assumption that it will always be NULL when we get there. However,
on_name_owner_changed() can run first, and it does set name_owner.

==20126== 42 bytes in 6 blocks are definitely lost in loss record 15,174 of 48,256
==20126==    at 0x4C280F3: malloc (vg_replace_malloc.c:299)
==20126==    by 0x7541D00: g_malloc (gmem.c:104)
==20126==    by 0x7558FEE: g_strdup (gstrfuncs.c:364)
==20126==    by 0x6DF8E4F: on_name_owner_changed (gdbusproxy.c:1399)
==20126==    by 0x6DE94C4: emit_signal_instance_in_idle_cb (gdbusconnection.c:3743)
==20126==    by 0x753C315: g_main_dispatch (gmain.c:3066)
==20126==    by 0x753C315: g_main_context_dispatch (gmain.c:3642)
==20126==    by 0x753C667: g_main_context_iterate.isra.24 (gmain.c:3713)
==20126==    by 0x753CA69: g_main_loop_run (gmain.c:3907)
==20126==    by 0x5E38000: meta_run (main.c:556)
==20126==    by 0x401EC0: main (main.c:441)

https://bugzilla.gnome.org/show_bug.cgi?id=755439
2016-06-15 16:39:00 +02:00
Chun-wei Fan
39a22880b6 Visual Studio builds: Improve flexibility of .pc generation
Allow the use of shorthands using ${prefix} for exec_prefix, and
${exec_prefix} for includedir and libdir, which makes the generated .pc
files a bit cleaner and more flexible.
2016-06-15 17:30:24 +08:00
Chun-wei Fan
be16115e67 Visual Studio projects: Clean up a little bit
For the Visual Studio 201x projects, we can force the "install" projects
to always run in a simpler way, by specifying an output file that will
never exist.  Makes things look a bit cleaner.
2016-06-15 16:31:40 +08:00
Chun-wei Fan
33549086bc Visual Studio builds: Refine .pc creation
We may not have $(CopyDir) created, which the script that generates the
.pc files check for, so create it if it is not there.  This makes things a
bit more convenient for people.
2016-06-15 16:23:27 +08:00
Christoph Reiter
9ec74d20a7 Partly revert "gio: Add filename type annotations"
Revert all annotation changes for environment variables and command line
arguments.

See commit f8189ddf98.
2016-06-07 19:50:03 +02:00
Christoph Reiter
c9dd204909 Partly revert "glib: Add filename type annotations"
Revert all annotation changes for environment variables and command line
arguments.

See commit 41013a01f4.
2016-06-07 19:48:11 +02:00
Chun-wei Fan
9198f19d97 config.h.win32.in: Always define HAVE_LONG_LONG
Visual Studio actually supports long long types, but HAVE_LONG_LONG is
undefined for Visual Studio builds, likely due to issues in previous
gnulib code for printf functionality, that was bundled with GLib.

Since gnulib has much better support with Visual Studio nowadays (which we
updated the related code to last October), and HAVE_LONG_LONG being undefined
actually causes issues in Visual Studio builds, which was demonstrated with
the type-test test program in tests/, we should always define HAVE_LONG_LONG
in config.h.win32.in.

Thanks to Paolo Borelli for the heads up on the issue.
2016-06-07 15:51:31 +08:00
Christoph Reiter
f8189ddf98 gio: Add filename type annotations
https://bugzilla.gnome.org/show_bug.cgi?id=767245
2016-06-04 20:38:42 +02:00
Christoph Reiter
41013a01f4 glib: Add filename type annotations
Adds the filename annotation for all file names
and things which can contain file names like
environment variables, argv-

On Unix they can contain anything while on Windows
they are always utf-8.

https://bugzilla.gnome.org/show_bug.cgi?id=767245
2016-06-04 20:38:33 +02:00
Emmanuele Bassi
7d8e98ee09 Fix paths for non-srcdir builds
This fixes a build failure in Continuous that resulted in the error:

../../../gio/tests/test.gresource.xml: Failed to locate
'test-generated.txt' in any source directory.
Makefile:4676: recipe for target 'test.gresource' failed
make[6]: *** [test.gresource] Error 1
2016-06-04 13:49:46 +01:00
Georges Basile Stavracas Neto
5411a187a3 glib-compile-resources: correct resource compiler dependency for generated files
Don't require that files can be resolved when generating dependencies.

Original patch by Garret Regier.

https://bugzilla.gnome.org/show_bug.cgi?id=673101
2016-06-04 08:24:22 -04:00
Gerald Combs
05d429af9d gsignal: Remove a UTF-8 ellipsis from docs
Some compilers have trouble with such sequences. Visual C++ may or may
not generate a warning in this particular case depending on if the
local code page supports an ellipsis.

https://bugzilla.gnome.org/show_bug.cgi?id=767218
2016-06-03 16:09:43 -04:00
Krzesimir Nowak
f5e875b2f8 gio: Add a missing autocleanup for GFileAttributeInfoList 2016-06-03 12:36:39 +02:00
Colin Walters
424b3b9c6c docs: Move GIO_USE_VFS to "okay for production" section
Lots of projects like NetworkManager, ostree, udisks, soon polkit,
etc.  do this or *should* do this.  And we need to support that
forever.

https://bugzilla.gnome.org/show_bug.cgi?id=767172
2016-06-02 14:11:17 -04:00
Matthias Clasen
15a85f2095 GCredentialsType: Remove XML markup from docs
We now use markdown.
2016-06-02 13:26:07 -04:00
Krzesimir Nowak
504f189e59 gfileenumerator: Fix typo in docs
This probably used to be a part of libgsystem.
2016-06-02 11:29:55 +02:00
Cédric Valmary
d06d078959 Updated Occitan translation 2016-05-30 18:54:01 +00:00
Matthias Clasen
1341598c80 2.49.1 2016-05-26 16:30:25 -04:00
Chun-wei Fan
6bd94863d0 glib/gnulib/printf-parse.c: Fix build on Visual Studio 2008
Visual Studio 2008 does not come with stdint.h, so define intmax_t instead
on Visual Studio 2008 so that the code will continue to build.  This was
previously unnoticed as building GTK+ since 3.16 requires an
implementation of stdint.h (such as msinttypes), and it took care of the
need of including the stdint.h header here, but people could be very well
using GLib without using GTK+ 3.x.
2016-05-25 14:13:33 +08:00
Piotr Drąg
f3c029978c Updated POTFILES.in 2016-05-23 18:19:51 +02:00
Tom Tromey
b7145a1d72 Rename gdb macros with _gdb suffix to avoid ns clashes
glib installs a gdb helper file named `glib.py`.
Then the "hook" file updates `sys.path` and does `import glib`.

This will fail if glib has already been imported into gdb, say
using `from gi.repository import GLib`.  This is due to a namespace clash.

One fix would be to rename the gdb helper files to not clash with
other Python modules.  This should be done for all such helper files.

https://bugzilla.gnome.org/show_bug.cgi?id=760186
2016-05-23 10:52:10 -04:00
Muhammet Kara
0ffb21d355 Updated Turkish translation
(cherry picked from commit 67ce4d8c7b)
2016-05-20 19:32:39 +00:00
Ondrej Holy
17e5281ca9 Fix ABI compatibility
Commit 7b3f6da broke ABI compatibility, because of newly added vfunc.
Move the vfunc to the end to ensure ABI compatibility.

https://bugzilla.gnome.org/show_bug.cgi?id=765924
2016-05-20 12:35:06 +02:00
Ondrej Holy
931483aa25 build: Bump version to 2.49.1
So that early adopters of new API have a version number to target.

https://bugzilla.gnome.org/show_bug.cgi?id=765900
2016-05-20 10:34:15 +02:00
Ondrej Holy
7b3f6da307 gio: Add g_drive_is_removable() support
Nautilus wants to show entries in the sidebar only for removable devices.
It uses currently sort of conditions to determine which devices should be
shown. Those condition fails in some cases unfortunatelly. Lets provide
g_drive_is_removable() which uses udisks Removable property to determine
which devices should be shown. It should return true for all drives with
removable media, or flash media, or drives on usb and firewire buses.

https://bugzilla.gnome.org/show_bug.cgi?id=765900
2016-05-20 10:31:22 +02:00
Philip Withnall
098f19bced docs: Replace references to GVFS hal modules with udisks2
Since hal is dead and buried, and has been superseded by the udisks2
modules in GVFS.
2016-05-19 10:06:36 +01:00
Rico Tzschichholz
19689af091 docs: Add index for 2.50 api 2016-05-18 13:30:32 +02:00
Philip Withnall
8f2d181858 build: Fix a misnamed variable in glib-tap.mk
This was causing anything listed in $(installed_test_extra_scripts) to
not be installed.

https://bugzilla.gnome.org/show_bug.cgi?id=766570
2016-05-17 18:09:58 +01:00
Руслан Ижбулатов
6a1e8e8fa7 g_date_time_format_locale: ensure locale encoding is used
Fallback code for g_date_time_format_locale() fetches translated
strings (such as day and month names) from .mo catalogues via
gettext. These strings always come in UTF-8 encoding, because
that is the encoding that glib sets when it initializes gettext
for itself.
However, the non-fallback code uses nl_langinfo() and expects
its results to be in locale-dependent encoding.

This mismatch can result in UTF-8 strings being converted to UTF-8,
producing gibberish.

Fix this by converting UTF-8 strings to locale-dependent encoding
before using them. Also fix the code that was already doing the locale->UTF-8
conversion to not convert the strings when they are already UTF-8-encoded.

https://bugzilla.gnome.org/show_bug.cgi?id=766092
2016-05-16 05:19:10 +00:00
Tiago Santos
6055954a09 Updated Portuguese translation 2016-05-15 19:45:51 +00:00
Руслан Ижбулатов
2aa7338875 testsuite: override check-TESTS target in gio tests subdir
This prevents testsuite from trying to build any TESTS in that
subdirectory, which will fail, because there are no TESTS defined
in that Makefile.am.

This happens when user runs make check TESTS=...

https://bugzilla.gnome.org/show_bug.cgi?id=766407
2016-05-14 04:59:40 +00:00
Руслан Ижбулатов
e88796cad0 testsuite: don't forget -DPCRE_STATIC when PCRE is static
https://bugzilla.gnome.org/show_bug.cgi?id=766407
2016-05-14 04:59:39 +00:00
Руслан Ижбулатов
36c47f2a55 testsuite: include pthread.h in thread testfile
https://bugzilla.gnome.org/show_bug.cgi?id=766407
2016-05-14 04:59:39 +00:00
Krzesimir Nowak
89d8dc979b docs: Clarify clearing the builder after ending the build process
There is no need to call g_variant_builder_clear() after the
g_variant_builder_end(). This is mentioned in docs of the former
function, but not in the docs of the latter one. Add them there too.
2016-05-11 10:18:05 -04:00
Iain Lane
bcbd8d73ce Fix the upper bound in g_unichar_iswide_bsearch
asan noticed an array out of bound access in this function, which was
because we were accessing G_N_ELEMENTS + 1.

https://bugzilla.gnome.org/show_bug.cgi?id=766211
2016-05-10 22:43:23 -04:00
Matthias Clasen
9a865020ca Add a few more test cases for g_unichar_iswide 2016-05-10 22:43:15 -04:00
Garrett Regier
c494ae06b7 gsequence: Improve is_end()
Instead of finding the GSequence, just walk up
the tree and determine if the iter is the end node.

https://bugzilla.gnome.org/show_bug.cgi?id=749583
Signed-off-by: Garrett Regier <garrettregier@gmail.com>
2016-05-09 15:55:53 +03:00