Commit Graph

26113 Commits

Author SHA1 Message Date
Biswapriyo Nath
4f72d3bce7 gthread-win32: Fix conversion error from pointer to integer
glib/gthread-win32.c:359:16: error: incompatible integer to pointer conversion passing 'DWORD' (aka 'unsigned long') to parameter of type 'gpointer' (aka 'void *') [-Wint-conversion]
          if (!g_atomic_pointer_compare_and_exchange (&key->p, NULL, impl))
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
glib/gatomic.h:257:73: note: expanded from macro 'g_atomic_pointer_compare_and_exchange'
    __atomic_compare_exchange_n ((atomic), (void *) (&(gapcae_oldval)), (newval), FALSE, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) ? TRUE : FALSE; \
                                                                        ^~~~~~~~
2022-09-20 20:28:53 +05:30
Marco Trevisan (Treviño)
5fc8a476c8 gosxcontenttype: Do not mix declarations with code
Fixes: #2759
2022-09-20 15:41:08 +02:00
Marco Trevisan
7b53edbf26 Merge branch 'local-output-stream-prevent-double-fd-close' into 'main'
glocalfileoutputstream: Do not double-close an fd on unlink error

See merge request GNOME/glib!2901
2022-09-20 13:19:04 +00:00
Marco Trevisan
51cf76ebb0 Merge branch 'kjellahl/gio-launch-desktop-clang' into 'main'
gio-launch-desktop: Fix the G_STATIC_ASSERT expressions for clang

Closes #2740

See merge request GNOME/glib!2898
2022-09-19 15:04:21 +00:00
Marco Trevisan
65abaa76c5 Merge branch 'task_get_cancellable_nullable' into 'main'
gio: make g_task_get_cancellable return value (nullable)

See merge request GNOME/glib!2899
2022-09-19 15:02:39 +00:00
Marco Trevisan
871d4f9ccc Merge branch 'tests-error-musl' into 'main'
tests: Only run g_error_new_valist() programmer error test on glibc

See merge request GNOME/glib!2904
2022-09-19 14:38:25 +00:00
Marco Trevisan
7e9625a79b Merge branch 'handling_collision_over_standard_file_descriptors' into 'main'
Handling collision between standard i/o file descriptors and newly created ones

Closes #16

See merge request GNOME/glib!2846
2022-09-19 14:35:45 +00:00
Marco Trevisan
22f0522c10 Merge branch 'mcatanzaro/gtype-criticals' into 'main'
Replace most GObject warnings with criticals

See merge request GNOME/glib!2852
2022-09-19 14:35:12 +00:00
Marco Trevisan
d29e936a6c Merge branch 'mkenum-build-fix' into 'main'
glib-mkenums: Specify output encoding as UTF-8 explicitly for non-English locale

See merge request GNOME/glib!2857
2022-09-19 14:34:01 +00:00
Marco Trevisan
13776b4942 Merge branch 'wip/sadiq/fix-bt-lines-cut' into 'main'
gbacktrace: Don't truncate gdb output

See merge request GNOME/glib!2880
2022-09-19 14:33:14 +00:00
Michal Vasilek
902ba0bc0d tests: Only run g_error_new_valist() programmer error test on glibc
The musl implementation of vasprintf segfaults with NULL
2022-09-18 18:01:40 +02:00
Emmanuele Bassi
b38d5a991f Merge branch 'pr-docs-fix-markup-code-blocks' into 'main'
docs: Fix markup error in code blocks for "DEPRECATED" macros

See merge request GNOME/glib!2903
2022-09-18 14:02:39 +00:00
Tom Levy
bd3abd0bde docs: Fix markup error in code blocks for "DEPRECATED" macros 2022-09-18 13:09:09 +00:00
Sabri Ünal
74b9f4e3c0 Update Turkish translation 2022-09-18 08:10:26 +00:00
Baurzhan Muftakhidinov
02c14bb65c Update Kazakh translation 2022-09-18 06:20:51 +00:00
Emmanuele Bassi
115d8b48ac Post-release version bump to 2.74.1 2022-09-17 19:50:37 +01:00
Marco Trevisan (Treviño)
30bd57ecf8
2.74.0
Signed-off-by: Marco Trevisan (Treviño) <mail@3v1n0.net>
2022-09-17 20:38:17 +02:00
Bruce Cowan
6d56a75ab2 Update British English translation 2022-09-17 07:54:29 +00:00
Marco Trevisan (Treviño)
2401e1a090 glocalfileoutputstream: Do not double-close an fd on unlink error
In case we fail unlinking a file we could close again an FD that has
been already just closed. So avoid this by unsetting it when closing.

Coverity CID: #1474462
2022-09-16 15:11:47 +02:00
Marco Trevisan
ee470da7c8 Merge branch 'pr-docs-improve-wording-glib-unix' into 'main'
docs: Improve wording in documentation of g_unix_signal_source_new()

See merge request GNOME/glib!2900
2022-09-16 12:30:43 +00:00
Tom Levy
eeaef8b950 docs: Improve wording in documentation of g_unix_signal_source_new()
- Insert missing word "from".

- Remove space between function name and "()" so syntax highlighting
  can recognise it as a function.

- Avoid "you"/"your" when discussing the reentrancy issues of regular
  UNIX signal handlers, because it gives the false impression that
  these issues are applicable to g_unix_signal_source_new().

Unrelated:

- Fix missing space in documentation of g_signal_new_class_handler().
2022-09-16 08:25:46 +00:00
Jason Francis
9cd9787c52
gio: make g_task_get_cancellable return value nullable 2022-09-16 01:27:12 -04:00
Kjell Ahlstedt
37dba1c425 gio-launch-desktop: Fix the G_STATIC_ASSERT expressions for clang
The clang compiler requires the static_assert expression to be an integral
constant expression. `"text"` is not, but `sizeof "text"` is.

Fixes #2740
2022-09-15 12:55:18 +02:00
Matthias Clasen
dcb459a0b0 Fix g_unichar_iswide for unassigned codepoints
There are a few blocks in Unicode (mainly ideographs)
which default to wide. These blocks are defined in the
header comment of EastAsianWidth.txt.

We have some tests which check that unassigned codepoints
in those blocks get reported as wide, so make sure we handle
this correctly.
2022-09-15 03:43:04 +02:00
Marco Trevisan (Treviño)
b3e32eda7c tests/unicode: Add more debugging messages 2022-09-15 03:43:04 +02:00
Marco Trevisan (Treviño)
0eb3a2440a unicode: Avoid adding trailing spaces to tables definitions 2022-09-15 03:43:04 +02:00
Marco Trevisan (Treviño)
65092de98f unicode: Update data to Unicode 15 2022-09-15 03:43:04 +02:00
Marco Trevisan (Treviño)
e8f31c43db tools/update-unicode-data.sh: Add a script to handle the unicode updates
We need to perform multiple actions on unicode updates, so let's handle
all the commands in a single script so that we don't have to remember
all the details each time.
2022-09-15 03:43:04 +02:00
Matthias Clasen
d37beda25e Merge branch 'expose-artifacts-in-pr' into 'main'
ci: Expose the coverage report and docs as links in the MR's

See merge request GNOME/glib!2820
2022-09-15 01:41:31 +00:00
Marco Trevisan (Treviño)
d6a378afa7 run-docker: Do not require sudo if the user is part of docker group 2022-09-15 03:16:52 +02:00
Marco Trevisan (Treviño)
3ddfb10b0b ci: Generate Cobertura XML and use it to feed gitlab for MR integration
gitlab has coverage integration in MRs, but we need a cobertura
formatted XML files (each must be less than 10 MB [1]) to show it, so
generate it using a python script and inform gitlab about it.

See https://docs.gitlab.com/ee/ci/testing/test_coverage_visualization.html

[1] https://gitlab.com/gitlab-org/gitlab/-/issues/328772#note_840831654
2022-09-15 03:16:52 +02:00
Marco Trevisan (Treviño)
29cf6b2b65 ci: Install lcov-cobertura and cobertura-split script in coverage images
These are needed to be able to get cobertura reports in gitlab.
2022-09-15 03:12:08 +02:00
Marco Trevisan (Treviño)
22f5016303 ci: Expose the coverage report as link in the MR's
It's making handier to check how changes are tested.
2022-09-15 01:44:29 +02:00
Marco Trevisan (Treviño)
9b6cc47bcb glib/glib-typeof: Ensure glib_typeof is defined in MSCV C++
When compiling with C++ in MSCV, it defines the __cplusplus macro, but
that's set to an old value and it doesn't represent the current c++
standard version (unless when explicitly requested via `/Zc:__cplusplus`).

So, to enable modern features we should rely on `_MSC_LANG` instead,
which represent the value we care about.
2022-09-15 01:18:42 +02:00
Marco Trevisan (Treviño)
c19904d6e8 glib/tests/cxx: Enable the c++ tests for all the C++ versions
We should support these macros everywhere, if not, we should fix them
again.
2022-09-15 01:18:42 +02:00
Damjan Jovanovic
a0f200593c gatomic: Support atomic compare_and_exchange macros on older C++ standard versions
The fix in ad23894c15 only works for
__cplusplus >= 201103L, but older C++ standards are not always less strict,
and still fail to compile the g_atomic_int_compare_and_exchange() and
g_atomic_pointer_compare_and_exchange() macros.

Apply that fix to all C++ standard versions.

Even if this implies using functions that have been added as part of
C++11 specification, this is safe because we wouldn't ever try to use the
`__atomic_...()` APIs if `__ATOMIC_SEQ_CST` is not defined, and that's part
of the very same API.
2022-09-15 01:18:42 +02:00
Marco Trevisan (Treviño)
0abb82498e glib/tests/cxx: Add clear and steal pointer functions tests
These functions may be defined as macros with different behaviors in
different c++ versions (as they rely on glib_typeof), so let's ensure
they work and compile everywhere.
2022-09-15 01:18:42 +02:00
Damjan Jovanovic
d050ad8a3c glib-typeof: Define glib_typeof on on older C++ standard versions
When using an older C++ versions, the glib_typeof() macro is never
defined, as the C++ definition depends on __cplusplus >= 201103L, while the C
definition, which would work, depends on !defined(__cplusplus).
Allow old C++ versions to use the C macro definition for glib_typeof().
2022-09-15 01:18:42 +02:00
Marco Trevisan (Treviño)
1cbe7a6734 meson: Build C++ tests for the currently supported C++ standard versions
We've various macros definitions that are depending using C++ features
that may not work in all the standard versions, so recompile the cxx
tests that we have in all the ones we want to support.
2022-09-15 01:18:40 +02:00
Marco Trevisan (Treviño)
4432f78407 CI: Do not allow failures in the valgrind job
We're no more leaks, so we can just be more restrictive at it, in order
to find new problems easier.
2022-09-14 22:03:00 +02:00
Marco Trevisan (Treviño)
505755e4d2 glib.supp: Ignore gutils leaks for user and system dirs
These leaks happens "by design" in case that the private API
g_set_user_dirs() is used to replace directories during some tests.
And we've to leak the previously set values (if any) not to free strings
that may be used by other user code before.

In fact we're already ignoring LSAN reports for the very same reason
here.

We could create a private suppression file too, but I don't think we've to
bother with that, given that user code should never hit this path
anyways.

It's the only leak we have, sooo:

Fixes: https://gitlab.gnome.org/GNOME/glib/-/issues/333
2022-09-14 22:03:00 +02:00
Emmanuele Bassi
32edf9c01a Build API docs only with shared libraries
Building the references requires libraries with all their symbols
available. Passing `-Dgtk_doc=true` and `-Ddefault_library=static`
should be considered a configuration error.
2022-09-14 15:03:43 +01:00
Alyssa Ross
7c74fe4c1d
tests: skip based on g_file_info_has_attribute
Per review request.  Matches the style for the newly introduced skip
check in test_g_file_info_access_time.
2022-09-14 13:21:53 +00:00
Alyssa Ross
7162b3c496
tests: skip g-file-info test if atime unsupported
For example, g_file_query_info will not be able to determine access
time for files on ZFS with atime=off.
2022-09-14 13:21:39 +00:00
Emmanuel Fleury
d9ba615090 Handling collision between standard i/o file descriptors and newly created ones
Though unlikely to happen, it may happen that newly created file
descriptor take the value 0 (stdin), 1 (stdout) or 2 (stderr) if one
of the standard ones have been dismissed in between. So, it may
confuse the program if it is unaware of this change.

The point of this patch is to avoid a reasign of standard file
descriptors on newly created ones.

Closes issue #16
2022-09-14 08:50:40 +02:00
Jiri Grönroos
4f4ac4ac1a Update Finnish translation 2022-09-13 20:06:48 +00:00
Marco Trevisan (Treviño)
c8e2d4a38d unix-streams: Ensure we get cancelled errors if the cancellable is cancelled 2022-09-13 16:30:12 +02:00
Marco Trevisan (Treviño)
d40ef833e3 tests/unix-streams: Free the cancelled error on cancelled cancellable
Helps with: https://gitlab.gnome.org/GNOME/glib/-/issues/333
2022-09-13 16:29:20 +02:00
Sebastian Dröge
a20a36b26f Merge branch 'revert-de57914b' into 'main'
Revert "Merge branch 'wip/smcv/deprecated-construct-prop' into 'main'"

See merge request GNOME/glib!2890
2022-09-13 11:32:48 +00:00
Sebastian Dröge
d41b5bf999 Revert "Merge branch 'wip/smcv/deprecated-construct-prop' into 'main'"
This reverts merge request !2888
2022-09-13 11:20:03 +00:00