Commit Graph

21612 Commits

Author SHA1 Message Date
Nirbheek Chauhan
b462e2c80c meson: Use the b_vscrt option for selecting the CRT
This option has been available since 0.48, and we should use it
instead of only guessing based on buildtype.
2020-04-03 16:39:22 +05:30
Nirbheek Chauhan
e7cfe62e73 meson: Fix check for builtype arguments
`get_option('buildtype')` will return `'custom'` for most combinations
of `-Doptimization` and `-Ddebug`, but those two will always be set
correctly if only `-Dbuildtype` is set. So we should look at those
options directly.

For the two-way mapping between `buildtype` and `optimization`
+ `debug`, see this table:
https://mesonbuild.com/Builtin-options.html#build-type-options
2020-04-03 16:39:22 +05:30
Sebastian Dröge
b4d6849c83 Merge branch 'mingw-arch' into 'master'
Fix arch detection ifdefs in glib/valgrind.h

See merge request GNOME/glib!1429
2020-04-01 11:58:39 +00:00
Sebastian Dröge
f62ca931a7 Merge branch 'fno-common-extern' into 'master'
Add missing 'extern' to the dllexport version of GLIB_VAR/GOBJECT_VAR

See merge request GNOME/glib!1428
2020-04-01 11:27:39 +00:00
Sebastian Dröge
aa5cb26c6e Merge branch 'gdbusegdoc' into 'master'
docs: Fix configuration with gtk_doc=true and installed_tests=false

See merge request GNOME/glib!1424
2020-04-01 11:20:59 +00:00
Sebastian Dröge
be85e234b7 Merge branch 'fix-heap-corruption' into 'master'
glib-unix.c: fix heap corruption in g_unix_get_passwd_entry

See merge request GNOME/glib!1431
2020-04-01 11:10:12 +00:00
Alexander Kanavin
473b3b4ce4 glib-unix.c: fix heap corruption in g_unix_get_passwd_entry
malloc() was given too small value (size of pointer,
rather than struct it points to), and subsequent call
getpwnam_r() wrote past the end of allocated block - easily
seen with valgrind.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
2020-04-01 12:39:52 +02:00
Martin Storsjö
af0e0cb995 Fix arch detection ifdefs in glib/valgrind.h
Don't assume that __MINGW32__ implies x86; Windows runs on ARM/ARM64
as well, and there are mingw toolchains that target those architectures.

This mirrors how the MSVC part of the same expressions are written,
as (defined(_WIN32) && defined(_M_IX86)) and
(defined(_WIN64) && defined(_M_X64)) - not relying on _WIN32/_WIN64
or __MINGW32__/__MINGW64__ alone to indicate architecture.
2020-03-31 23:27:53 +03:00
Martin Storsjö
fdfadfc276 Add missing 'extern' to the dllexport version of GLIB_VAR/GOBJECT_VAR
The __declspec(dllexport) attribute in itself doesn't imply
'extern' - thus any intended variable declaration with
GLIB_VAR/GOBJECT_VAR would actually be a variable definition. With
C compilers defaulting to -fcommon, this isn't an issue, but
upcoming compilers (GCC 10 and Clang 11) will default to -fno-common,
ending up with duplicate definitions of these variables.
2020-03-31 23:22:26 +03:00
Sebastian Dröge
50355361e6 Merge branch 'icon-docs' into 'master'
gicon: Clarify GVariant refcounting in docs

See merge request GNOME/glib!1427
2020-03-31 14:49:53 +00:00
Sebastian Dröge
2b9f2b71db Merge branch 'unicode-version-docs' into 'master'
gunidecomp: Update and reformat Unicode version support history

See merge request GNOME/glib!1426
2020-03-31 14:15:06 +00:00
Philip Withnall
f6ed9503d0 gicon: Clarify GVariant refcounting in docs
Slightly unexpectedly, `g_icon_serialize()` doesn’t produce a floating
`GVariant`, it produces one with full ownership and returns that. That’s
not the convention for `GVariant` return values from functions which
build variants, but there’s nothing we can do to change this now as that
would be an API break.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-03-31 14:27:00 +01:00
Philip Withnall
0ce0701893 gunidecomp: Update and reformat Unicode version support history
To aid https://stackoverflow.com/q/60949426/2931197.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-03-31 14:18:32 +01:00
Yosef Or Boczko
eae7b0274c Update Hebrew translation
(cherry picked from commit 2443c6bb46)
2020-03-30 17:38:47 +00:00
Chris Mayo
84ad802c3a docs: Fix configuration with gtk_doc=true and installed_tests=false
Skip the gdbus-object-manager-example which is generated as part of
testing.

Program xsltproc found: YES (/usr/bin/xsltproc)
Run-time dependency gtk-doc found: YES 1.32

docs/reference/gio/gdbus-object-manager-example/meson.build:1:0: ERROR:
Unknown variable "libgdbus_example_objectmanager_dep".
2020-03-27 19:33:12 +00:00
Emmanuele Bassi
2b741aaf36 Merge branch 'unref-warning' into 'master'
gobject: Clarify assertion failure on ref-after-finalize

See merge request GNOME/glib!1423
2020-03-23 12:30:20 +00:00
Philip Withnall
641bbd0848 gobject: Clarify assertion failure on ref-after-finalize
Rename the variables involved so that people get a slightly more
obvious critical warning when they try to ref an object which has
already been finalised.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-03-23 11:48:22 +00:00
Daniel Șerbănescu
eb0f73a39c Update Romanian translation
(cherry picked from commit e62cd323c3)
2020-03-19 10:54:20 +00:00
Sebastian Dröge
697905d0bc Merge branch 'unicode13' into 'master'
glib: Update Unicode Character Database to version 13.0.0

See merge request GNOME/glib!1422
2020-03-19 08:08:22 +00:00
Philip Withnall
a19e554517 glib: Update Unicode Character Database to version 13.0.0
Using commands:
```
glib/gen-unicode-tables.pl -both 13.0.0 path/to/UCD
tests/gen-casefold-txt.py 13.0.0 path/to/UCD/CaseFolding.txt \
   > tests/casefold.txt
tests/gen-casemap-txt.py 13.0.0 path/to/UCD/UnicodeData.txt \
   path/to/UCD/SpecialCasing.txt > tests/casemap.txt
```

Using UCD release https://www.unicode.org/Public/zipped/13.0.0/UCD.zip

With some manual additions to `GUnicodeScript` for the 4 new scripts
added in 13.0, using the first assigned character in each block in
`glib/tests/unicode.c`.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-03-18 14:50:36 +00:00
Simon McVittie
bba5576fb2 Merge branch '480-gdbus-connection-test' into 'master'
Race fixes for gdbus-connection unit tests

Closes #480

See merge request GNOME/glib!1419
2020-03-18 10:27:02 +00:00
Philip Withnall
944bcd9746 Merge branch 'tests_search-utils_locale_fix' into 'master'
gstrutils: Set locale explicitly for search-utils test

See merge request GNOME/glib!1414
2020-03-18 08:58:03 +00:00
nightuser
5466a64e28 gstrutils: Set locale explicitly for search-utils test
The test checks `g_str_match_string()` function, which performs matches
based on user's locale. For this reason, some tests may fail, e.g., see
issue #868.

Now we explicitly set locale for each test, with C locale as a fallback
when the locale is not available.
2020-03-18 08:58:02 +00:00
Philip Withnall
417eb64852 Merge branch '2067' into 'master'
gmacros.h: avoid using _Static_assert in C++17 mode

Closes #2067

See merge request GNOME/glib!1420
2020-03-17 19:51:51 +00:00
Alexander Pyhalov
0f17659e5a gmacros.h: avoid using _Static_assert in C++17 mode
Closes #2067
2020-03-17 22:00:54 +03:00
Philip Withnall
721e385593 tests: Use atomics for shared data in gdbus-connection test
D-Bus filter functions run in a worker thread. The `gdbus-connection`
test was sharing a `FilterData` struct between the main thread and the
filter function, which was occasionally (on the order of 0.01% of test
runs) causing spurious test failures due to racing on reads/writes of
`num_handled`.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #480
2020-03-17 15:22:04 +00:00
Philip Withnall
0d567c784d tests: Port gdbus-connection to use g_assert_*() rather than g_assert()
g_assert() can be compiled out with G_DISABLE_ASSERT, which renders the
test rather useless.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #480
2020-03-17 15:21:51 +00:00
Yuri Chornoivan
9aa3361a57 Update Ukrainian translation 2020-03-17 15:10:45 +00:00
Sebastian Dröge
21a6f044b3 Merge branch '1154-array-docs' into 'master'
garray: Clarify documentation in a few places

Closes #1154

See merge request GNOME/glib!1404
2020-03-17 13:50:06 +00:00
Philip Withnall
2e23b9edbd Merge branch 'optional_inet_address' into 'master'
ginetaddress, ginetsocketaddress: Add missing (nullable) annotations

See merge request GNOME/glib!1418
2020-03-17 13:06:41 +00:00
Phil Clayton
1dfdb75073 ginetaddress, ginetsocketaddress: Add missing (nullable) annotations
In both modules, new_from_string() may return NULL.
2020-03-17 11:14:51 +00:00
Sebastian Dröge
5d6e3d52b3 Merge branch 'fix-win-assert' into 'master'
meson: Don't use assert in test code

See merge request GNOME/glib!1415
2020-03-13 12:22:52 +00:00
Seungha Yang
2744d7921d meson: Don't use assert in test code
The test code can be built on Windows using Cygwin or MSYS2.
Even though it's test code, it might bring assertion dialog box
for native Windows while meson configure.
2020-03-13 20:32:43 +09:00
Emmanuele Bassi
8be96d51fc Merge branch 'gapplication-minor-typo' into 'master'
gapplication: Fix a minor typo in the documentation

See merge request GNOME/glib!1413
2020-03-11 00:31:37 +00:00
Matthew Leeds
c1f8f06432 gapplication: Fix a minor typo in the documentation 2020-03-10 15:40:02 -07:00
Sebastian Dröge
711de654e2 Merge branch '1986-socks-version' into 'master'
gsocks5proxy: Fix SOCKS5 username/password authentication

Closes #1986

See merge request GNOME/glib!1391
2020-03-10 15:11:09 +00:00
Sebastian Dröge
047957e663 Merge branch '1988-socks5-error' into 'master'
gsocks5proxy: Always advertise username/password authentication support

Closes #1988

See merge request GNOME/glib!1392
2020-03-10 14:58:25 +00:00
Philip Withnall
267a245eec gsocks5proxy: Return G_IO_ERROR_PROXY_NEED_AUTH if anonymous auth fails
If a username and password are specified by the caller, `GSocks5Proxy`
tells the server that it supports anonymous *and* username/password
authentication, and the server can choose which it prefers.

Otherwise, `GSocks5Proxy` only says that it supports anonymous
authentication. If that’s not acceptable to the server, the code was
previously returning `G_IO_ERROR_PROXY_AUTH_FAILED`. That error code
doesn’t indicate to the caller that authentication might succeed were
they to provide a username and password.

Change the error handling to make that clearer. A fuller solution would
be to expose more of the method negotiation in the `GSocks5Proxy` API,
so that the caller can specify ahead of time which authentication
methods they want to use. That can follow in issue #2059 though.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #1988
2020-03-10 11:38:43 +00:00
Tim Sabsch
24a0bbac6d Update German translation 2020-03-09 22:53:24 +00:00
Sebastian Dröge
879f3cd0d2 Merge branch '2057-malloc-trim' into 'master'
gmemorymonitor: Mention malloc_trim() in the documentation

Closes #2057

See merge request GNOME/glib!1410
2020-03-09 20:37:20 +00:00
Philip Withnall
f818f50cbc Merge branch 'wip/tingping/gdummytlsconnection-properties' into 'master'
gdummytlsconnection: Add missing overrides for ALPN properties

See merge request GNOME/glib!1409
2020-03-09 20:21:43 +00:00
Philip Withnall
16c60289a4 gmemorymonitor: Mention malloc_trim() in the documentation
Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #2057
2020-03-09 20:07:43 +00:00
Марко Костић
13d4433517 Update Serbian translation
(cherry picked from commit 255a5be57b)
2020-03-08 20:49:49 +00:00
Patrick Griffis
455e6211cb gdummytlsconnection: Add missing overrides for ALPN properties 2020-03-06 19:26:13 -08:00
Nathan Follens
4586bd3c00 Update Dutch translation
(cherry picked from commit 7015b4f921)
2020-03-06 15:33:54 +00:00
Milo Casagrande
93ece66281 Update Italian translation 2020-03-06 14:35:01 +00:00
Philip Withnall
42c7e89228 Merge branch 'w32-fileinfo-mtime-usec' into 'master'
Support nanoseconds in stat timestamps on Windows

See merge request GNOME/glib!1329
2020-03-06 12:58:00 +00:00
Philip Withnall
c8ad0aad08 Merge branch 'wip/tbaederr/clang-warnings' into 'master'
tests: Don't compare strings by pointer

See merge request GNOME/glib!1408
2020-03-05 11:32:38 +00:00
Timm Bäder
662059d18a tests: Don't compare strings by pointer
clang complains about this in the form of

<source>:6:9: warning: result of comparison against a string literal is
  unspecified (use an explicit string comparison function instead)

  if (f == (void *)"a") {
        ^  ~~~~~~~~~~~

Use variables for the strings instead, which should have the same
address.
2020-03-05 09:39:33 +01:00
Andre Klapper
5892c980bf Fix broken markup in Slovak UI translation 2020-03-04 20:18:49 +01:00