Commit Graph

16368 Commits

Author SHA1 Message Date
Ignacio Casal Quinteiro
a159bc939d registrybackend: more cleanups 2016-01-26 09:00:35 +01:00
Ignacio Casal Quinteiro
7256f2289a registrybackend: more cleanups 2016-01-25 16:12:59 +01:00
Ignacio Casal Quinteiro
a5e819c4c3 registrybackend: style fixes 2016-01-25 16:02:03 +01:00
Balázs Meskó
3a201128c2 Updated Hungarian translation 2016-01-25 11:58:07 +00:00
Sebastian Geiger
192781d4b5 gregex: improve documentation for g_regex_new 2016-01-24 22:04:33 +01:00
Philip Withnall
8c263008bb build: Calculate ABS_GLIB_RUNTIME_LIBDIR at build time
Rather than calculating it at configure time. This means it can expand
$libdir properly, and use the Make $(realpath) function rather than
invoking the non-portable `readlink -f`.

This fixes problems where `readlink` would be called on an invalid path
(due to a variable not being expanded) and would evaluate to "", which
would then cause things to be installed in the wrong place.

https://bugzilla.gnome.org/show_bug.cgi?id=744772
2016-01-24 14:44:44 +00:00
Chun-wei Fan
57f9c590f9 Visual Studio builds: Include pcre_version.c in build
... for builds using the PCRE bundled with the GLib sources, so that
pcre_version() will also be defined, and be exported so that the regex test program
will properly link when the bundled PCRE sources are used.

This is a follow-up commit to 476f30a.
2016-01-20 17:20:27 +08:00
Philip Withnall
3c0cddfe80 gdbusobjectmanagerserver: Clarify recommended ObjectManager paths
Otherwise people might try to export the object manager at ‘/’, which
doesn’t work. And I have no intention of making it work.

https://bugzilla.gnome.org/show_bug.cgi?id=760852
2016-01-19 17:10:40 +00:00
Philip Withnall
1725580f26 gdbusobjectmanagerserver: Convert a DocBook link to Markdown 2016-01-19 17:01:14 +00:00
Allison Ryan Lortie
6e752d3f8b GLib 2.47.5 2016-01-18 15:29:17 -05:00
Mario Blättermann
ceec96146e Updated German translation 2016-01-18 20:53:50 +01:00
Emmanuele Bassi
85a23529ab Revert "make *_get_instance_private const-compliant"
This reverts commit a3a9664ed2.

Constifying the autogenerated get_instance_private functio makes C++
compilers and GCC with -Wcast-qual warn during compilation of GLib and
projects depending on GLib.

Since using const with GObject instances is not a common coding
practice, it's better to revert than trying to make every sigle GType
function const-safe (and possibly add more compiler warnings in the
process).

https://bugzilla.gnome.org/show_bug.cgi?id=745068
2016-01-18 18:48:42 +00:00
Emmanuele Bassi
617189f28c Revert "G_DECLARE_*: be const-compliant"
This reverts commit 52f23db74a.

Constifying these macros make C++ compilers and GCC with -Wcast-qual
warn during compilation of GLib and projects depending on GLib.

Since using const with GObject instances is not a common coding
practice, it's better to revert than trying to make every sigle GType
function const-safe (and possibly add more compiler warnings in the
process).

https://bugzilla.gnome.org/show_bug.cgi?id=745068
2016-01-18 18:46:12 +00:00
Iain Lane
476f30a004 regex test: Fix with --with-pcre=internal
We were linking with the wrong path for the internal libpcre, and
furthermore the function pcre_version was declared but never defined.
2016-01-18 18:37:28 +00:00
Iain Lane
9b8a34b5b3 regex test: Assert /(?P<sub>foo)\\g<sub/ changed behaviour at 8.35, not 8.38
https://bugzilla.gnome.org/show_bug.cgi?id=760683
2016-01-18 12:19:12 -05:00
Iain Lane
db90987990 regex test: Check the expected PCRE version at runtime
We might be built against a newer version than we're run against.

https://bugzilla.gnome.org/show_bug.cgi?id=760683
2016-01-18 12:19:12 -05:00
Philip Withnall
c3d6934f18 gio: Add DTLS interfaces
Add a new GDtlsConnection interface, plus derived GDtlsClientConnection
and GDtlsServerConnection interfaces, for implementing Datagram TLS
support in glib-networking.

A GDtlsConnection is a GDatagramBased, so may be used as a normal
datagram socket, wrapping all datagrams from a base GDatagramBased in
DTLS segments.

Test cases are included in the implementation in glib-networking.

https://bugzilla.gnome.org/show_bug.cgi?id=752240
2016-01-18 14:25:06 +00:00
Chun-wei Fan
e3ab6ab38a Visual Studio builds: Rearrange build configs
This is a follow-up commit for commit 82c2461, where the default build is
to use the PCRE that is installed in the system, if it is available and is
not overridden with --with-internal-pcre.

For Visual Studio builds, this means that the new 'Debug' and 'Release'
configs will now use PCRE that is found on the system, which were renamed
from the '*_ExtPCRE' configs; and that there are now 'Debug_BundledPCRE'
and 'Release_BundledPCRE' configs which make use of the PCRE that is
supplied with the GLib sources, which, replaces the former 'Debug' and
'Release' configs.
2016-01-18 16:04:45 +08:00
Chun-wei Fan
407a4e9e4e tests: Fix regex test conditions
Commit 855594c changed the expected error for the regex
/(?P<sub>foo)\g<sub/ for PCRE 8.38, but actually PCRE changed the error
raised by this invalid regex in 8.37, so we should check for the new error
from 8.37 and upwards.

Please see comments #21 and #22 of bug 740573 regarding this commit.
2016-01-18 14:08:40 +08:00
Руслан Ижбулатов
b7774b182d Make gnulib vfprintf return the number of bytes actually written
To be honest, i don't remember what problems were caused by it returning the
number of bytes it *wanted* to write instead of the number of bytes
it actually wrote. Probably related to the fact that fwrite could
independently fail, and ignoring its return value ignores that error.

https://bugzilla.gnome.org/show_bug.cgi?id=748064
2016-01-14 15:11:08 +00:00
Simon McVittie
82c2461e3d Use system PCRE unless --with-pcre=internal is given
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=740573
Reviewed-by: Emmanuele Bassi <ebassi@gnome.org>
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2016-01-14 13:09:06 +00:00
Simon McVittie
855594c4de regex test: expect ASSERTION_EXPECTED for /(?(?<ab))/ with PCRE 8.38
PCRE 8.38 changed the parsing of this invalid regex. It still fails,
but with a different error (since PCRE r1539,
<http://vcs.pcre.org/pcre?view=revision&revision=1539>).

The regex /(?P<sub>foo)\g<sub/ used to raise MISSING_BACK_REFERENCE but
now raises MISSING_SUBPATTERN_NAME_TERMINATOR, so we can still have a
test for the latter.

Signed-off-by: Simon McVittie <smcv@debian.org>
Reviewed-by: Emmanuele Bassi <ebassi@gnome.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=759808
2016-01-14 12:54:25 +00:00
Allison Ryan Lortie
86c5d8978d GDBusMethodInvocation: document behaviour change
We changed the behaviour of this API to adapt to a change in the D-Bus
specification.  Document the new behaviour, along with the time of the
change.

https://bugzilla.gnome.org/show_bug.cgi?id=755421
2016-01-13 10:51:44 -05:00
Lars Uebernickel
dbea81b02d gdbus: don't send unexpected replies
gdbus sets NO_REPLY_EXPECTED when no callback is given to
g_dbus_connection_call(). It makes sense that it also handles the server
side correctly by discarding replies to clients that don't want one.

https://bugzilla.gnome.org/show_bug.cgi?id=755421
2016-01-13 10:44:49 -05:00
Aurimas Černius
5dbb3453d7 Updated Lithuanian translation 2016-01-12 22:30:05 +02:00
Javier Jardón
6b577196ee Deprecate GLIB_GNU_GETTEXT macro, use upstream gettext instead
https://bugzilla.gnome.org/show_bug.cgi?id=624186
2016-01-11 16:07:06 +00:00
Philip Withnall
3add5e2837 gio: Document thread safety of the streams API
Specifically, GIOStream and the TLS connection streams.

Includes wording adapted from suggestions by Dan Winship
<danw@gnome.org>.

https://bugzilla.gnome.org/show_bug.cgi?id=735754
2016-01-11 15:58:42 +00:00
David King
18fe6d8312 docs: add Since for g_str_to_ascii 2016-01-11 09:33:32 +00:00
Javier Jardón
4e78a0a9df Revert "Use upstream gettext instead the glib one"
This causes several problems:
- Compilation in FreeBSD with --enable-gtk-doc broke
- Modules that still use the AM_GLIB_GNU_GETTEXT macro
  doesnt compile anymore because /usr/share/glib-2.0/gettext
  is not filled with the correct files, as this was done in
  the glib custom po/Makefile.in.in

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

This reverts commit e5c752371c.
2016-01-10 22:44:24 +00:00
Anders Jonsson
edfb3ead77 Updated Swedish translation 2016-01-10 22:07:26 +00:00
Javier Jardón
e5c752371c Use upstream gettext instead the glib one
https://bugzilla.gnome.org/show_bug.cgi?id=622991
2016-01-09 18:49:22 +00:00
Matt Watson
c1e2a8d727 resource file: add cancel to dummy monitor
gfilemonitor has a cancel vfunc and will call into the in dispose.
If we don't stub it out we get a segfault.
2016-01-08 18:08:20 -08:00
Daiki Ueno
50645b724a gsettings: Install gettext ITS rules
Recent gettext has a feature to allow consumer projects to supply their
own string extraction rules for XML files, in ITS format.

Gettext still ships the rule for *.gschema.xml, but it would be better
maintained in the upstream project.

See the gettext documentation for details:
http://www.gnu.org/software/gettext/manual/html_node/Preparing-ITS-Rules.html

https://bugzilla.gnome.org/show_bug.cgi?id=760199
2016-01-08 12:31:18 +09:00
Christophe Fergeau
ea5ca11761 gio: Document that g_inet_address_new_* return value must be g_object_unref'ed 2016-01-07 15:21:08 +01:00
Christophe Fergeau
b6edac5aca glib: Clarify g_warn_if_reached API doc
Its documentation mentions that it logs a 'critical warning', but since
the macro implementation calls g_warn_message(), it does not log a
critical message, but a regular warning.
2016-01-07 15:21:04 +01:00
Stephan Bergmann
b44fba25fb G_LIKELY/_UNLIKELY macros need more parentheses
...for cases like

  #include "glib.h"
  #define COMMA ,
  void f(void) { if (G_LIKELY(0 COMMA 1)); }

https://bugzilla.gnome.org/show_bug.cgi?id=760215
2016-01-06 10:33:04 -05:00
Rafael Fontenelle
e91e811f02 Updated Brazilian Portuguese translation 2016-01-05 20:08:06 +00:00
Chun-wei Fan
786b4c8b87 gwin32.c: Fix build on MinGW
Apparently unlike mingw-w64 and Visual Studio, MinGW does not come with
winternl.h, which defines NTSTATUS, so we need to include ntdef.h instead
on MinGW for NTSTATUS.

Based on patch by Cédric Krier.

https://bugzilla.gnome.org/show_bug.cgi?id=756875
2016-01-05 15:15:38 +08:00
Mario Blättermann
0309d645ad Updated German translation 2016-01-02 12:10:13 +00:00
Marek Černocký
2e918501db Updated Czech translation 2015-12-24 14:40:22 +01:00
Philip Withnall
30788dff5b gutf8: Fix typo in GIR annotation for g_utf8_to_ucs4() 2015-12-23 16:48:10 +00:00
Steven Chamberlain
42b160b19f gio: drop obsoleted lock causing deadlocks on FreeBSD
I think it is a recursion from the GUnixMountMonitor constructor, to a
GLocalFileMonitor on /etc/fstab, and into GUnixMountMonitor again, now
with a mutex already held, so it deadlocks.
https://bugzilla.gnome.org/page.cgi?id=traceparser/trace.html&trace_id=235354

That mutex in glocalfile.c:g_local_file_find_enclosing_mount() doesn't
seem necessary any more IMHO.  Inside it, only 'mount' is modified, but
that's just a stack variable local to this function.  When
klass->get_mount_for_mount_path is called, it's given one const
parameter and the other is unused, so they're unchanged. 'klass'
doesn't seem it could be modified either inside that function.

It doesn't recurse infinitely, but seems to work correctly and pass the
testsuite after this change.

The FreeBSD project already applied my patch in their ports tree, and
their users seem happy with it.

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=712848#64
and https://bugzilla.gnome.org/show_bug.cgi?id=753378
2015-12-23 09:40:54 -05:00
Chun-wei Fan
bec6a9a300 g_application_run(): Fix on Windows When Using Bindings
As g_win32_get_command_line() calls CommandLineToArgvW() to acquire the
arguments passed into a GApplication program, it actually returns the
whole command line which is used to invoke the program, including the
script interpreter and its flags when a script using GNOME bindings
(e.g. PyGObject and so on) is being invoked.

The issue here is that g_application_run() would most probably have
trouble in the scripts scenario on Windows as it is likely unable to
"recognize" the script interpreter, causing such scripts to fail to run.

Largely based on the patch by Ray Donnelly <mingw.android@gmail.com>.

https://bugzilla.gnome.org/show_bug.cgi?id=734095
2015-12-22 17:33:33 +08:00
Ignacio Casal Quinteiro
5f4b92202b win32: fix warnings avoid discarding const qualifier 2015-12-21 12:22:10 +01:00
Aurimas Černius
07e55c049d Updated Lithuanian translation 2015-12-20 15:02:49 +02:00
Xavier Claessens
aa9a33b0da GApplication: Avoid getting the default context repeatidly
This avoids getting a global lock on every main loop iteration.

https://bugzilla.gnome.org/show_bug.cgi?id=759554
2015-12-16 11:44:43 -05:00
Matthias Clasen
1f341afa9a More updates 2015-12-16 09:16:35 -05:00
Jasper St. Pierre
a379a0ad59 gapplication: Acquire the main context before running
Otherwise, we'll acquire it on every loop iteration, which can leave us
vulnerable to racing another thread for the acquisition of the main
context.

This can break methods like g_main_context_invoke, which try to acquire
a context to figure out if it can invoke the method synchronously or
need to defer to an idle. In these cases, it isn't guaranteed that the
invocation function will be invoked in the default main context,
e.g. the one that GApplication is holding.

This also matches what GMainLoop is doing.

https://bugzilla.gnome.org/show_bug.cgi?id=752983
2015-12-16 09:15:43 -05:00
Matthias Clasen
5e73ca974d 2.47.4 2015-12-16 07:52:05 -05:00
Руслан Ижбулатов
ce985f13f4 Enable contenttype test on W32, tweak it to pass (mostly)
* On W32 use a real directory (SYSTEMROOT) instead of '/etc/'
* Disable test_symbolic_icon() as it can't be passed (symbolic icons are not
  really supported)

* PowerPoint/Gettext test still fails, presumably because msvcrt qsort() moves
  the entires (both have the same priority)

https://bugzilla.gnome.org/show_bug.cgi?id=735696
2015-12-16 07:47:54 -05:00