Commit Graph

18308 Commits

Author SHA1 Message Date
Xavier Claessens
f929d14826 Fix failing gdbus-unix-addresses test when G_MESSAGES_DEBUG is set
This test assumes the subprocess does not print anything else on stdout
other than the dbus address, otherwise g_test_trap_assert_stdout()
fails to match. But if the env running tests has G_MESSAGES_DEBUG=all
then it will also print "PATH=%s".
2018-06-01 10:23:12 -04:00
Xavier Claessens
a3c061a814 Merge branch 'remove-gc-friendly-default' into 'master'
Remove unused ENABLE_GC_FRIENDLY_DEFAULT and its build option

See merge request GNOME/glib!43
2018-05-31 17:36:25 +00:00
Xavier Claessens
09b8c6d24b Merge branch 'remove-secure-libc' into 'master'
Remove unused HAVE_LIBC_ENABLE_SECURE  and add a glibc implementation for g_check_setuid

See merge request GNOME/glib!45
2018-05-31 16:20:12 +00:00
Emmanuele Bassi
54db9d3fc3 Merge branch 'remove-posix-memalign-compl-check' into 'master'
Remove posix_memalign() checks for an old glibc bug

See merge request GNOME/glib!47
2018-05-31 13:03:41 +00:00
Emmanuele Bassi
dd4f44fd04 Merge branch 'remove-no-fd-set' into 'master'
Remove NO_FD_SET and assume fd_set exists

See merge request GNOME/glib!46
2018-05-31 12:42:38 +00:00
Christoph Reiter
fe59a18f89 Remove posix_memalign() checks for an old glibc bug
POSIX_MEMALIGN_WITH_COMPLIANT_ALLOCS was added in
https://bugzilla.gnome.org/show_bug.cgi?id=328254
to work around a glibc bug where it wrongly checked the size argument
to be a power of two instead of the alignment.

This was fixed in glibc in
https://sourceware.org/git/?p=glibc.git;a=commit;h=b2bffca2e3b59dd882039e3b0ab835d127bdaf7a
about 16 years ago.
2018-05-31 14:29:33 +02:00
Christoph Reiter
b6c81d139c Remove NO_FD_SET and assume fd_set exists
gspawn.c is using fd_set without checks for 17 years now and the NO_FD_SET check was added
19 years ago.
2018-05-31 13:31:55 +02:00
Christoph Reiter
a7fefb0e4e g_check_setuid: implement using getauxval(AT_SECURE) with glibc
See commit 4c2928a544 for why checking AT_SECURE is preferable compared
to UID checks as currently done in the fallback case.

getauxval() was added with glibc 2.16

While glibc <2.19 didn't provide a way to differentiate a 0 return value from an error,
passing AT_SECURE should always succeed according to
https://sourceware.org/ml/libc-alpha/2014-07/msg00407.html
I've added an errno check anyway, to be on the safe side.
2018-05-31 12:02:36 +02:00
Christoph Reiter
41165b2a7e Remove unused HAVE_LIBC_ENABLE_SECURE
It was added in 4c2928a544 to potentially enable accessing
AT_SECURE through __libc_enable_secure, but was never enabled.

Newer glibc provides getauxval(AT_SECURE) which should be used instead.
Add a TODO note for that.
2018-05-31 10:58:27 +02:00
Christoph Reiter
118332dd5c Remove unused ENABLE_GC_FRIENDLY_DEFAULT and its build option
ENABLE_GC_FRIENDLY_DEFAULT was supposed to set the default for the gc friendliness
while still allowing to force enable it at runtime with G_DEBUG=gc-friendly.

With commit 943a18b564 (6 years ago) things were changed to always set it
according to the content of G_DEBUG in glib_init(), making the default unused.

Since nobody complained since then just remove the macro and the build option.
2018-05-31 07:19:12 +02:00
Philip Withnall
e03f83212d Merge branch '796385-indentation' into 'master'
Fix misleading indentation (bug #796385)

See merge request GNOME/glib!42
2018-05-30 09:33:56 +00:00
Philip Withnall
61b2f5c8e1 build: Always enable -Wmisleading-indentation
Try and ensure that people don’t push code with misleading indentation
in future. This should give fairly few false positives.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-05-30 10:12:01 +01:00
Iain Lane
51d566ba6e test_paths: Reindent to avoid tripping -Wmisleading-indentation
This fixes:

glib/tests/testglib.c: In function ‘test_paths’:
glib/tests/testglib.c:955:3: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
   if (g_test_verbose ())
   ^~
glib/tests/testglib.c:958:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
     {
     ^

https://bugzilla.gnome.org/show_bug.cgi?id=796385
2018-05-30 10:07:35 +01:00
Philip Withnall
2dce3ce125 Merge branch 'win-date-fixes' into 'master'
gdate: Use a more recent year when fetching the month names. Fixes #1386

Closes #1386

See merge request GNOME/glib!40
2018-05-29 16:35:12 +00:00
Philip Withnall
42a9e80ab1 Merge branch 'remove-winxp-comapt-code' into 'master'
Remove winxp compat code

See merge request GNOME/glib!41
2018-05-29 16:07:48 +00:00
Christoph Reiter
a2aa91ae5d win32: Remove all remaining WinXP compat code
Remove all code which is no longer built with Windows 7+
2018-05-29 17:16:38 +02:00
Christoph Reiter
cce2957938 gthread-win32: Remove WinXP compat code 2018-05-29 17:11:32 +02:00
Christoph Reiter
0458f4728f gdate: Use a more recent year when fetching the month names. Fixes #1386
g_date_strftime() on Windows uses the SYSTEMTIME structure which requires the
year to be >=1601. Passing 1 results in a negative SYSTEMTIME.wYear
which makes GetDateFormatW() fail and crashes due to missing error handling.

Just use 1976 as that's already used a few lines down.
2018-05-29 15:42:19 +02:00
Philip Withnall
6054d11001 Merge branch 'nirbheek/windows-7-not-vista' into 'master'
meson: We actually support 7+, not Vista+

See merge request GNOME/glib!39
2018-05-29 12:25:08 +00:00
Nirbheek Chauhan
2e5454f892 meson: We actually support 7+, not Vista+
https://gitlab.gnome.org/GNOME/glib/issues/504#note_225707
2018-05-29 17:41:29 +05:30
Philip Withnall
4100c84c06 Merge branch 'msys2-export-meson-logs-artifacts' into 'master'
ci: Export meson-logs from msys2-mingw32 build as artifacts

See merge request GNOME/glib!33
2018-05-29 10:45:28 +00:00
Philip Withnall
91208e8d3f ci: Clarify artifact naming
Put the job name and commit identifier in the artifact names.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-05-29 10:54:29 +01:00
Philip Withnall
a53d74e078 ci: Always export artifacts from Fedora build
The default `when: on_success` means no artifacts are exported when the
tests fail, which is precisely when we want to see the artifacts.

Always export them, and rely on GitLab to garbage collect them as
appropriate (typically after 30 days, I think).

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-05-29 10:53:41 +01:00
Philip Withnall
1041504099 ci: Export meson-logs from msys2-mingw32 build as artifacts
This means that compilation and test failures will leave logs on the CI
machines which we can use to debug the failures.

Always export the artifacts. The default `when: on_success` is
appropriate for now, but won’t be in future when the tests actual report
their success value correctly.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-05-29 10:52:01 +01:00
Philip Withnall
a077746e4e Merge branch 'wip/rishi/issue-914' into 'master'
Add fuzzy comparison macros

See merge request GNOME/glib!35
2018-05-29 09:31:59 +00:00
Emmanuele Bassi
0b4c2eefce Add fuzzy floating point comparison macro
Add a test macro that allows comparing two floating point values for
equality within a certain tolerance.

This macro has been independently reimplemented by various projects:

 * Clutter
 * Graphene
 * colord

https://gitlab.gnome.org/GNOME/glib/issues/914
2018-05-29 10:02:47 +01:00
Emmanuele Bassi
24e98e38d6 Add a macro for checking approximate values
A macro like this is useful to avoid direct comparisons between floating
point values.

https://gitlab.gnome.org/GNOME/glib/issues/914
2018-05-29 09:55:47 +01:00
Emmanuele Bassi
61ccf733cc Merge branch 'wip/rishi/issue-1073' into 'master'
Revert "Return folder as icon for directories"

See merge request GNOME/glib!36
2018-05-29 07:43:56 +00:00
Xavier Claessens
cd47f8d8de Revert "Add macosx CI"
Disable macosx CI until we get proper hosting, the test machine we had
is too old and slow.

This reverts commit 042b057e4d.
2018-05-28 13:58:06 -04:00
Philip Withnall
c3846b33d7 Merge branch 'identifier-typo-fix' into 'master'
gio: Fix some typos in the documentation

See merge request GNOME/glib!31
2018-05-28 16:58:13 +00:00
Philip Withnall
6730309826 Merge branch 'wip/hadess/g-drive-identifier' into 'master'
gio: Add G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE

See merge request GNOME/glib!10
2018-05-28 16:31:42 +00:00
Daniel Mustieles
0b98fa5f3b Updated Spanish translation 2018-05-28 17:55:16 +02:00
Philip Withnall
fbcf7f7088 Merge branch 'macosx-ci' into 'master'
Add macosx CI

Closes #1389

See merge request GNOME/glib!19
2018-05-28 15:37:30 +00:00
Bastien Nocera
75950d70c9 gio: Deprecate G_VOLUME_IDENTIFIER_KIND_HAL_UDI
HAL itself has long been deprecated.
2018-05-28 17:20:21 +02:00
Debarshi Ray
25af5ad1da Revert "Return folder as icon for directories"
This workaround is no longer necessary because it was fixed in
shared-mime-info three years ago:
https://bugs.freedesktop.org/show_bug.cgi?id=89150

This reverts commit 90025254fd.

https://gitlab.gnome.org/GNOME/glib/issues/1073
2018-05-28 17:19:59 +02:00
Xavier Claessens
042b057e4d Add macosx CI
Fixes #265.
2018-05-28 11:15:01 -04:00
Bastien Nocera
4c84eac38e gio: Add G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE
It's a synonym of G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE.
It doesn't change anything except not feeling dirty from using a wrongly
prefixed constant for the object type.

See: #182
2018-05-28 17:13:30 +02:00
Xavier Claessens
d16d37bc10 Merge branch 'mingw-ci' into 'master'
Add mingw64 ci

Closes #1387

See merge request GNOME/glib!16
2018-05-28 14:39:34 +00:00
Xavier Claessens
e0a3b0edd5 Merge branch 'android-ci' into 'master'
Add android CI

Closes #1385

See merge request GNOME/glib!15
2018-05-28 14:24:08 +00:00
Philip Withnall
137ae066fe Merge branch 'wip/oholy/gio-mount-stop' into 'master'
gio-tool: Add support for stopping drives

See merge request GNOME/glib!17
2018-05-28 14:03:37 +00:00
Philip Withnall
2b4c962541 Merge branch 'wip/oholy/gio-tool-arguments' into 'master'
Fix some inconsistencies regarding arguments in gio-tool

See merge request GNOME/glib!18
2018-05-28 13:40:29 +00:00
Xavier Claessens
3145d88f4b Add mingw64 cross build CI
Fixes #1387.
2018-05-28 09:22:55 -04:00
Xavier Claessens
707106c7a5 Fix Windows build errors in valgrind.h
valgrind.h is a verbatim copy taken from Valgrind project. Previously
that file had local changes that got dropped by last update. To avoid
regressing again, do not edit valgrind.h anymore and instead add a
gvalgrind.h wrapper that gets included instead.

This fix 2 errors:
- uintptr_t is not defined when including valgrind.h on mingw.
- MSVC compiler is not supported on amd64-Win64 platform.
2018-05-28 09:22:55 -04:00
Xavier Claessens
f9dc091e37 Revert "glib/valgrind.h: Disable inline ASM on MSVC x64 builds"
Better not modify copy/paster files otherwise this will regress again
later. It's better to not include valgrind.h at all when using MSVC.

This reverts commit bbcce75d4e.
2018-05-28 09:22:55 -04:00
Xavier Claessens
2d4b05bbf8 Revert "Fix build error when compiling with mingw"
This reverts commit 00178f8c8e.
2018-05-28 09:22:55 -04:00
Xavier Claessens
f83493f83d Add Android CI
This adds to the CI a cross build for Android NDK r16 API 21 (because
thats what GStreamer currently use) for arm64.

GNU iconv must be built manually into our docker image because Android
NDK doesn't seems to ship it. The latest NDK r17 API 28 has iconv.h but
iconv_open() symbol isn't found by the linker. Looks like broken NDK.

libffi also needs to be built manually because the meson subproject
doesn't support building for Android platform. It needs a recent RC
release because latest stable release is 4 years old and fails to
build.

Fixes #1385.
2018-05-28 09:17:41 -04:00
Xavier Claessens
5d0a99105d Meson: Always fallback to proxy-libintl subproject
An implementation of gettext is required, but it's not always needed
e.g. for CI builds.

https://bugzilla.gnome.org/show_bug.cgi?id=796264
2018-05-28 09:15:45 -04:00
Philip Withnall
ed4ff31567 Merge branch '1305-gtester-sense' into 'master'
gtester: fix test result in gtester XML report

Closes #1305

See merge request GNOME/glib!34
2018-05-28 13:11:19 +00:00
Sven Neumann
ac0999a1cf gtester: fix test result in gtester XML report
This was accidentally broken with the changes done for
https://bugzilla.gnome.org/show_bug.cgi?id=790934
2018-05-28 13:45:50 +01:00
Ondrej Holy
9ac1ba56a3 gio-tool: Fix GMountOperation leaks
GMountOperation is used on various places, but it is not properly unrefed.
Let's fix the leaks.
2018-05-28 14:44:07 +02:00