19106 Commits

Author SHA1 Message Date
Kouhei Sutou
32bdd718b3 Suppress -Wint-in-bool-context warning with G_DEFINE_INTERFACE and g++
Note that it's not reported with gcc. It's only reported with g++.

C++ code to reproduce this warning:

    #include <glib-object.h>

    G_BEGIN_DECLS

    #define GARROW_TYPE_FILE (garrow_file_get_type())
    G_DECLARE_INTERFACE(GArrowFile,
                        garrow_file,
                        GARROW,
                        FILE,
                        GObject)

    struct _GArrowFileInterface {
      GTypeInterface g_iface;
    };

    G_DEFINE_INTERFACE(GArrowFile,
                       garrow_file,
                       G_TYPE_OBJECT)

    static void
    garrow_file_default_init(GArrowFileInterface *iface)
    {
    }

    G_END_DECLS

Build command line:

    % g++ -Wall -shared -o liba.so a.cpp $(pkg-config --cflags --libs gobject-2.0)

Message:

    In file included from /tmp/local.glib/include/glib-2.0/gobject/gobject.h:24,
                     from /tmp/local.glib/include/glib-2.0/gobject/gbinding.h:29,
                     from /tmp/local.glib/include/glib-2.0/glib-object.h:23,
                     from a.cpp:1:
    a.cpp: In function 'GType garrow_file_get_type()':
    /tmp/local.glib/include/glib-2.0/gobject/gtype.h:219:50: warning: '<<' in boolean context, did you mean '<' ? [-Wint-in-bool-context]
     #define G_TYPE_MAKE_FUNDAMENTAL(x) ((GType) ((x) << G_TYPE_FUNDAMENTAL_SHIFT))
                                                 ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /tmp/local.glib/include/glib-2.0/gobject/gtype.h:2026:11: note: in definition of macro '_G_DEFINE_INTERFACE_EXTENDED_BEGIN'
           if (TYPE_PREREQ) \
               ^~~~~~~~~~~
    /tmp/local.glib/include/glib-2.0/gobject/gtype.h:1758:47: note: in expansion of macro 'G_DEFINE_INTERFACE_WITH_CODE'
     #define G_DEFINE_INTERFACE(TN, t_n, T_P)      G_DEFINE_INTERFACE_WITH_CODE(TN, t_n, T_P, ;)
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    a.cpp:16:1: note: in expansion of macro 'G_DEFINE_INTERFACE'
     G_DEFINE_INTERFACE(GArrowFile,
     ^~~~~~~~~~~~~~~~~~
    /tmp/local.glib/include/glib-2.0/gobject/gtype.h:178:25: note: in expansion of macro 'G_TYPE_MAKE_FUNDAMENTAL'
     #define G_TYPE_OBJECT   G_TYPE_MAKE_FUNDAMENTAL (20)
                             ^~~~~~~~~~~~~~~~~~~~~~~
    a.cpp:18:20: note: in expansion of macro 'G_TYPE_OBJECT'
                        G_TYPE_OBJECT)
                        ^~~~~~~~~~~~~
2018-12-21 12:17:38 +00:00
Philip Withnall
c45f255c58 Merge branch 'glib-2-58-guarantee-gvariant-test-alignment' into 'glib-2-58'
glib-2-58: tests: Allocate gvariant data from the heap to guarantee alignment

See merge request GNOME/glib!552
2018-12-19 21:31:38 +00:00
Mart Raudsepp
9eed22b3b8 tests: Allocate gvariant data from the heap to guarantee alignment
On glib-2-58 branch we don't have !455, thus we need aligned data
for the gvariant tests to not fail on i686.

Fixes #1626
2018-12-19 17:53:38 +02:00
Philip Withnall
97bcbcb8c2 2.58.2
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2.58.2
2018-12-18 14:43:58 +00:00
Philip Withnall
190c925667 Revert "W32: new GFileInfo attributes"
This reverts commit a2375b8929c70eb9cdb98e828643955c823be52d.

It adds new API, and hence should not have been merged to the stable
branch. This commit will remain in place on master (which will become
GLib 2.60).
2018-12-18 14:43:58 +00:00
Philip Withnall
a6af1eceb1 Revert "W32: extend the g-file-info test with new DOS attributes"
This reverts commit 13c088df13d37d1887c148a31f4bc15ffeaaf5fb.

It depends on new API added in commit a2375b8929, which should not have
been merged to the stable branch. This commit will remain in place on
master (which will become GLib 2.60).
2018-12-18 14:43:58 +00:00
Philip Withnall
6df107874e Revert "test_internal_enhanced_stdio: don't use g_assert()"
This reverts commit 6e75d3cf17140956d78b41dff2e3dac81634239e.

It depends on new API added in commit a2375b8929, which should not have
been merged to the stable branch. This commit will remain in place on
master (which will become GLib 2.60).
2018-12-18 14:43:58 +00:00
Emmanuele Bassi
712764b931 Merge branch 'backport-514-codegen-interface-info-glib-2-58' into 'glib-2-58'
Backport !514 gdbus-codegen interface info fixes to glib-2-58

See merge request GNOME/glib!527
2018-12-17 19:02:15 +00:00
Emmanuele Bassi
02e9d86266 Merge branch 'backport-506-gdatetime-utf8-format-glib-2-58' into 'glib-2-58'
Backport !506 GDateTime UTF-8 format fixes to glib-2-58

See merge request GNOME/glib!523
2018-12-17 18:48:53 +00:00
Emmanuele Bassi
3bb58bc6f5 Merge branch 'backport-541-gentoo-timezones-glib-2-58' into 'glib-2-58'
Backport gtimezone: Fallback to /etc/timezone on Gentoo to glib-2-58

See merge request GNOME/glib!544
2018-12-17 17:33:00 +00:00
Emmanuele Bassi
01a309f3b6 Merge branch 'backport-490-492-gspawn-deadlock-and-value-annotations' into 'glib-2-58'
Backport !490 and !492 to glib-2-58

See merge request GNOME/glib!499
2018-12-17 17:32:07 +00:00
Michael Catanzaro
6c758a11ed Merge branch 'backport-534-pem-parser-glib-2-58' into 'glib-2-58'
Backport gtlscertificate: Fix bug in PEM private key parser to glib-2-58

See merge request GNOME/glib!542
2018-12-17 15:56:36 +00:00
Mart Raudsepp
062f185e3c gtimezone: Fallback to /etc/timezone on Gentoo
On non-systemd Gentoo systems the chosen timezone is expressed in
/etc/timezone and /etc/localtime may be a copy of the timezone
file instead of symlink. Add this path to the fallback test to
not regress dates into UTC.
2018-12-17 12:55:19 +00:00
Fredrik Ternerot
7e4c2f717b gtlscertificate: Fix bug in PEM private key parser
Make sure to not go outside of PEM data buffer when looking for private
key.

Also adding test case that triggers this bug.
2018-12-17 11:51:37 +00:00
Will Thompson
0569daeb57 gdbus-codegen: test --interface-info-{header,body}
This test is rudimentary but better than nothing.

(Backport to glib-2-58: Fix minor merge conflict.)
2018-12-11 12:35:50 +00:00
Will Thompson
fe7b608fc3 gdbus-codegen: sort input files
This means the output (including lists of filenames) does not depend on
the order of the input files, which may matter if this tool is invoked
with a glob or some other mechanism that doesn't guarantee an order.
2018-12-11 12:34:48 +00:00
Will Thompson
4c4acb6fbe gdbus-codegen: don't sort args in --interface-info-body
Previously, method and signal arguments were sorted by name, which
(assuming you don't happen to give your arguments
lexicographically-ordered names) means the generated signatures were
incorrect when there is more than 1 argument.

While sorting the methods and signals themselves (and properties, and
annotations on all these) is fine, it's easiest to not sort anything.
2018-12-11 12:34:47 +00:00
Will Thompson
06e1d72f54 gdbus-codegen: make --interface-info-{header,body} not crash
Since 1217b1bc4f242c14d6eabbee0c688c320eab2e4d, LICENSE_STR has taken two
parameters, not one. Without this change, running either mode fails
with a traceback like:

    Traceback (most recent call last):
      File "../gdbus-codegen", line 55, in <module>
        sys.exit(codegen_main.codegen_main())
      File ".../codegen_main.py", line 294, in codegen_main
        gen.generate()
      File ".../codegen.py", line 896, in generate
        self.generate_body_preamble()
      File ".../codegen.py", line 682, in generate_body_preamble
        self.outfile.write(LICENSE_STR.format(config.VERSION))
    IndexError: tuple index out of range

8916874ee6f3ff0f887dbe1eda55c23c2c0097ee, which introduced these flags,
was actually merged after that commit, but I assume it was written
beforehand.
2018-12-11 12:34:47 +00:00
Tomasz Miąsko
dcba77e050 gdatetime: Avoid unnecessary conversions from ASCII to UTF-8 2018-12-10 12:05:53 +00:00
Tomasz Miąsko
74c1468c98 gdatetime: Store intermediate result of g_date_time_format in UTF-8
In date time formatting routine, instead of converting from UTF-8 to
locale charset and then from locale charset to UTF-8, store all
intermediate result in UTF-8.

This solves the issue where user provided UTF-8 format string might be
unrepresentable in the current locale charset.

Fixes issue #1605.
2018-12-10 12:05:53 +00:00
Iñaki Larrañaga Murgoitio
219bed2304 Update Basque translation 2018-12-07 12:40:17 +00:00
Matej Urbančič
d1ca6661bc Updated Slovenian translation 2018-12-02 18:03:08 +01:00
Daniel Mustieles
4b6fadf870 Updated Spanish translation 2018-11-28 12:18:08 +01:00
Philip Withnall
40b5853d33 Merge branch 'backport-433-date-matching-glib-2-58' into 'glib-2-58'
gdate: Use longest matching month name in g_date_set_parse (backport to glib-2-58)

See merge request GNOME/glib!471
2018-11-27 10:25:38 +00:00
Christoph Reiter
852fb0214a g_value_get_variant: return value is transfer-none not transfer-full
It defaulted to transfer-full.
2018-11-27 10:12:49 +00:00
Peter Wu
07bd8eb568 gspawn: Fix g_spawn deadlock in a multi-threaded program on Linux
opendir and closedir are not async-signal-safe, these may call malloc
under the hood and cause a deadlock in a multi-threaded program.
This only affected Linux when /proc is mounted, other systems use a
slower path that iterates through all potential file descriptors.
Fixes a long-standing problem (since GLib 2.14.2).

Closes #945 and #1014
2018-11-27 10:12:22 +00:00
Tomasz Miąsko
7fd130b32a gdate: Use longest matching month name in g_date_set_parse
There are languages where a name of one month is a substring of another.
Instead of stopping search on the first match use the month that
constitutes the longest match.

(Backport to glib-2-58: Fix minor merge conflict.)

Fixes #1343.
2018-11-27 10:07:22 +00:00
Philip Withnall
5bd159d46d Merge branch 'meson-pin-libffi-subproject' into 'glib-2-58'
meson: pin the libffi wrap file to the last release supporting meson 0.47

See merge request GNOME/glib!498
2018-11-27 10:04:31 +00:00
Christoph Reiter
04cde53ac7 meson: pin the libffi wrap file to the last release supporting meson 0.47
So we don't require a newer meson than for glib itself. See !471
2018-11-27 08:01:17 +01:00
Marek Cernocky
d32bac3701 Updated Czech translation 2018-11-24 10:11:52 +01:00
Emmanuele Bassi
6408555f32 Merge branch '425-date-init-glib-2-58' into 'glib-2-58'
gdate: Reinitialize locale information in g_date_prepare_to_parse. (backport to glib-2-58)

See merge request GNOME/glib!430
2018-11-23 16:40:29 +00:00
Emmanuele Bassi
a7a0decdb6 Merge branch '417-variant-ay-glib-2-58' into 'glib-2-58'
Fix ^*ay handling in g_variant_iter_loop() (backport to glib-2-58)

See merge request GNOME/glib!437
2018-11-23 16:39:20 +00:00
Emmanuele Bassi
c91f464fa8 Merge branch '435-short-negative-timezones-glib-2-58' into 'glib-2-58'
gdatetime: Fix formatting of time zones offsets in range -01:00 to +00:00 (backport to glib-2-58)

See merge request GNOME/glib!438
2018-11-23 16:39:00 +00:00
Emmanuele Bassi
6f5df32e72 Merge branch 'backport-456-bookmarkfile-crash-glib-2-58' into 'glib-2-58'
bookmarkfile: Don't move an item if the uri has not changed (backport to glib-2-58)

See merge request GNOME/glib!457
2018-11-23 16:38:41 +00:00
Xavier Claessens
67a7a2fabd Check for 'z' library before fallbacking to subproject 2018-11-20 10:40:39 -05:00
Xavier Claessens
0a94fcfb25 Meson: Rename test_c_args to avoid confusion with gio tests c_args 2018-11-14 10:40:24 -05:00
Xavier Claessens
c9c7509e02 Meson: Fix build error in gdbus-example-objectmanager
test_c_args is defined in the root meson.build with unfiltered list of
compiler flags, then redefined in gio/tests/meson.build after the
subdir() call. Move it before.
2018-11-14 10:40:24 -05:00
Xavier Claessens
68203b1665 Merge branch 'master' into 'master'
meson: add aarch64 memory barrier handling

See merge request GNOME/glib!462

(cherry picked from commit a72766bb9c947ad53c904bd57a69ae3f495c459e)

704522c5 meson: add aarch64 memory barrier handling
2018-11-13 18:49:01 +00:00
Michael Catanzaro
8616425bc0 Update documentation of g_tls_connection_handshake() again
I made a mistake when last updating the documentation in 94a99ae9. I
wrote that, with TLS 1.3, this would perform a rekey instead of a
rehandshake. In fact, that's only true for client connections. For
server connections, it's a no-op.

I was a bit nervous about how to document the behavior anyway, because
we really don't know what behavior will be reasonable with non-GnuTLS
crypto backends. This behavior is reasonable for the GnuTLS backend, but
might not necessarily make sense for OpenSSL. Ideally, we would
discourage API users from doing things which could have unexpected
effects, so instead of documenting what the GnuTLS backend does, I think
it'd be better to document that this is "undefined but not dangerous,"
since of course we want to make sure that existing code that doesn't
know about TLS 1.3 is not broken.


(cherry picked from commit 68878ab50b2a25f2ec9b3caf0d49a83bc489914a)
2018-11-13 01:57:24 +00:00
Aurimas Černius
e8aa448e39 Updated Lithuanian translation 2018-11-10 17:50:43 +02:00
Rafael Fontenelle
94b38e07ff Update Brazilian Portuguese translation 2018-11-08 05:59:47 +00:00
Anders Jonsson
319947dc5c Update Swedish translation 2018-11-07 18:33:19 +00:00
Florian Heiser
d273537803 Update German translation 2018-11-07 17:20:20 +00:00
Milo Casagrande
492c8f73a2 Update Italian translation 2018-11-07 08:42:40 +00:00
Emin Tufan Çetin
0abeb97826 Update Turkish translation 2018-11-06 19:47:53 +00:00
Piotr Drąg
eb181fe2c5 Update Polish translation 2018-11-06 17:23:01 +01:00
Kukuh Syafaat
976619632a Update Indonesian translation 2018-11-06 15:56:16 +00:00
Philip Withnall
5cc59cc632 Merge branch '1582-backport-411-422-ossfuzz-fixes-glib-2-58' into 'glib-2-58'
Resolve "Backport GMarkup/GVariant/GDBus fixes to glib-2-58 and glib-2-56" (glib-2-58)

See merge request GNOME/glib!447
2018-11-06 13:09:30 +00:00
Marco Trevisan (Treviño)
338614bf80 bookmarkfile: Don't move an item if the uri has not changed
This was causing a crash, because we were first removing an item, freeing
both the instance itself and the key, and then trying to reuse those.

So, in this case, instead of reassigning an item, we can just return TRUE
as we have already the item at the right place, while it's not needed to
update the modified timestamp, since no modification happened in reality.

Fixes #1588
2018-11-06 12:23:14 +00:00
Marco Trevisan (Treviño)
a02e111c69 bookmarkfile: test that moving to the same name works
Verify that we can move a bookmark item to the same name, but actually this
causes a crash right now.
2018-11-06 12:23:14 +00:00