18987 Commits

Author SHA1 Message Date
Xavier Claessens
067d4b47c4 Meson: appinfo tests are racy if run in parallel 2018-10-10 13:51:07 -04:00
Simon McVittie
41bd74dfa4 Generate gtester-report from .in file
Previously, it was installed unmodified by the Meson build system.

We don't need to define @bindir@, because gtester-report never
actually referred to it. We also don't need a definition of
GTESTER_REPORT for use by GLib itself, because its last use was removed
in 2013 (https://bugzilla.gnome.org/show_bug.cgi?id=709995).

Fixes: https://gitlab.gnome.org/GNOME/glib/issues/1544
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 13:51:07 -04:00
Simon McVittie
e704c23c21 Spelling: Fix spelling of "interpreted"
Detected by Debian's Lintian tool.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 13:51:07 -04:00
Simon McVittie
6c806c2a60 Spelling: avoid the "allows to" pattern
This is detected by Debian's Lintian tool, which suggests
"allows one to" as a replacement. I've rephrased the documentation
in question to avoid both of those.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 13:51:07 -04:00
Simon McVittie
31d2273163 Spelling: Fix spelling of "unknown"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 13:51:07 -04:00
Simon McVittie
cc3d955536 Spelling: Fix spelling of "constructed"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 13:51:07 -04:00
Simon McVittie
ff2b5d3383 Spelling: Fix spelling of "similarly"
Detected by Debian's Lintian tool.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 13:51:07 -04:00
Simon McVittie
a915c7b3dd Spelling: Fix a common en_FR spelling of "information"
Detected by Debian's Lintian tool.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 13:51:07 -04:00
Simon McVittie
8e62a5d4ad Spelling: fix spelling of specify
Detected by Debian's Lintian tool.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 13:51:06 -04:00
Simon McVittie
419d823977 Spelling: fix "every time"
Detected by Debian's Lintian tool.

Also fix the spelling of "linking" in one error message.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 13:51:06 -04:00
Xavier Claessens
ae5bca2394 Meson: Do not run tests/refcount with --tap
This is a partial revert of a change introduced in cbc7fbbf7.
2018-10-10 13:51:06 -04:00
Simon McVittie
59f8519ba9 meson: Run build-time tests with --tap where supported
This makes it easier to debug test failures, by ensuring that g_debug()
and g_test_message() are printed as TAP diagnostics.

Fixes: https://gitlab.gnome.org/GNOME/glib/issues/1528
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 13:51:06 -04:00
Xavier Claessens
7723eba45e Meson: Install timeloop-closure test 2018-10-10 13:51:06 -04:00
Xavier Claessens
2c5bc252dd Meson: doc: fix cross references 2018-10-10 13:51:06 -04:00
Xavier Claessens
ac7534fe10 Meson: Run in TAP mode installed tests that support it 2018-10-10 13:51:06 -04:00
Xavier Claessens
aa02dac84f Meson: define G_HAVE_GROWING_STACK to 0 or 1 2018-10-10 13:51:06 -04:00
Simon McVittie
9cde3b2709 Remove unnecessary +x permissions
None of these files starts with a #! line, and they are not native
binary executables, so if a user attempts to execute them as a program,
Unix shells will run them as /bin/sh scripts. This is not going to end
well, since none of them are shell scripts (the gio bash completion
is for bash, which is not a lowest-common-denominator POSIX shell, and
in any case is designed to be sourced rather than executed).

Fixes: #1539
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-10 13:51:06 -04:00
Xavier Claessens
5038346035 Tests: Fix -Wformat-nonliteral causing build failure with clang 2018-10-10 13:51:06 -04:00
Руслан Ижбулатов
e459e7bdf7 tests W32: ifdef a variable not used on Windows 2018-10-10 13:51:06 -04:00
Руслан Ижбулатов
063148e098 tests W32: Move timeloop test to the non-Windows section
It just doesn't work on Windows, and that can't be fixed with a quick patch.
2018-10-10 13:51:06 -04:00
Руслан Ижбулатов
c6d1f68fe8 tests W32: ugly fix for sscanf() format
As we recently established, G_G*_FORMAT macros are for glib
functions *only*. It's not guaranteed that they will work for
C runtime printf() or scanf() variants, and indeed - in this case
they do not (GCC thinks that MSVCRT sscanf() requires %I64 prefix
for 64-bit values; whether that is true or not is irrelevant at this
point - we need to make the werror go away).
2018-10-10 13:51:06 -04:00
Руслан Ижбулатов
c5ad1caa8d tests W32: include process.h for getpid()
At least, MinGW has POSIX names. No idea if this works in MSVC.
2018-10-10 13:51:06 -04:00
Руслан Ижбулатов
b22f3bfa23 tests W32: Fix Windows values casting
LPARAM is LONG_PTR which is the same as INT_PTR on Windows.
WPARAM is UINT_PTR.
HWND is a pointer.
(%p prints pointers without 0x prefix, hence the extra 0x).
2018-10-10 13:51:06 -04:00
Руслан Ижбулатов
12fe2cb7ea tests W32: Cast the MSG struct as (gchar *) for g_io_channel_read 2018-10-10 13:51:06 -04:00
Xavier Claessens
ba62f9acd6 Rename cxx-test.C to cxx-test.cpp
Meson checks file extension case-insentively, and compiles ".C" as C
source instead of C++.
2018-10-10 13:51:06 -04:00
Xavier Claessens
8d7f506169 Meson: build and install remaining tests 2018-10-10 13:51:06 -04:00
Xavier Claessens
100a85300f Meson: Fix missing files when installing tests
Closes #1527
2018-10-10 13:51:06 -04:00
Philip Withnall
faaf0fb83c tests: Mark two more tests as slow
These keep on taking just longer than 30s on my local machine when run
in parallel with the rest of the tests (i.e. with `ninja test`). Testing
them individually, they do terminate correctly.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-10-10 13:51:06 -04:00
Bernhard Walle
6e1311c977 gio: automake: Add libgmodule dependency
Otherwise I get following compile error:

 libtool: link: /home/builduser/toolchains/linux/tc/2017-12/x86-ncp-linux-gnu/bin/i686-ncp-linux-gnu-gcc -Wall -Wstrict-prototypes -Wmisleading-indentation -Wno-bad-function-cast -Werror=declaration-after-statement -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format=2 -O2 -Wall -pipe -Wformat -g -fstack-protector-strong -fPIC -fno-strict-aliasing -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-rpath-link=/home/builduser/workspaces/rws_trunk_linux_x86_build_shared-fips/build/3p/linux/x86/install/zlib/lib -Wl,-rpath-link=/home/builduser/workspaces/rws_trunk_linux_x86_build_shared-fips/build/3p/linux/x86/install/libffi/lib -o .libs/gio gio-tool.o gio-tool-cat.o gio-tool-copy.o gio-tool-info.o gio-tool-list.o gio-tool-mime.o gio-tool-mkdir.o gio-tool-monitor.o gio-tool-mount.o gio-tool-move.o gio-tool-open.o gio-tool-rename.o gio-tool-remove.o gio-tool-save.o gio-tool-set.o gio-tool-trash.o gio-tool-tree.o  -L/home/builduser/workspaces/rws_trunk_linux_x86_build_shared-fips/build/3p/linux/x86/install/zlib/lib -L/home/builduser/workspaces/rws_trunk_linux_x86_build_shared-fips/build/3p/linux/x86/install/libffi/lib ./.libs/libgio-2.0.so ../gobject/.libs/libgobject-2.0.so ../glib/.libs/libglib-2.0.so -Wl,-rpath -Wl,/home/builduser/workspaces/rws_trunk_linux_x86_build_shared-fips/build/3p/linux/x86/install/glib/lib
 /home/builduser/toolchains/linux/tc/2017-12/x86-ncp-linux-gnu/bin/../lib/gcc/i686-ncp-linux-gnu/6.3.0/../../../../i686-ncp-linux-gnu/bin/ld: warning: libgmodule-2.0.so.0, needed by ./.libs/libgio-2.0.so, not found (try using -rpath or -rpath-link)
 ./.libs/libgio-2.0.so: undefined reference to `g_module_error'
 ./.libs/libgio-2.0.so: undefined reference to `g_module_close'
 ./.libs/libgio-2.0.so: undefined reference to `g_module_open'
 ./.libs/libgio-2.0.so: undefined reference to `g_module_supported'
 ./.libs/libgio-2.0.so: undefined reference to `g_module_symbol'
 collect2: error: ld returned 1 exit status
 Makefile:2300: recipe for target 'gio' failed

Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
2018-10-10 13:51:06 -04:00
Руслан Ижбулатов
6e75d3cf17 test_internal_enhanced_stdio: don't use g_assert()
g_assert() can be disabled, use more specific assertion macros.
2018-10-10 13:51:06 -04:00
Руслан Ижбулатов
13c088df13 W32: extend the g-file-info test with new DOS attributes 2018-10-10 13:51:06 -04:00
Руслан Ижбулатов
a2375b8929 W32: new GFileInfo attributes
G_FILE_ATTRIBUTE_DOS_IS_MOUNTPOINT allows mountpoints
(NTFS reparse points with IO_REPARSE_TAG_MOUNT_POINT tag) to
be told apart from symlinks (NTFS reparse points with
IO_REPARSE_TAG_SYMLINK tag), even though both are reported
by glib as "symlinks".

G_FILE_ATTRIBUTE_DOS_REPARSE_POINT_TAG allows the exact
reparse tag value to be obtained by the user. This way
even more exotic reparse points can be identified and
handled by the user (glib itself currently has no code
to work with any reparse points that are not symlinks
or mountpoints).
2018-10-10 13:51:06 -04:00
Руслан Ижбулатов
01855d2991 W32: tighten access rights requested to read symlink
According to
http://blog.kalmbach-software.de/2008/02/28/howto-correctly-read-reparse-data-in-vista/
we only need FILE_READ_EA, and should also use wider share flags.
2018-10-10 13:51:06 -04:00
Руслан Ижбулатов
cb1a4e0e6c W32: test the private path-stripping function 2018-10-10 13:51:06 -04:00
Руслан Ижбулатов
2a80628fce W32: Don't always strip path prefixes
Extended path prefix looks like "\\?\",
and NT object path prefix looks like "\??\".
Strip them only if they are followed by a character
(any character) and a colon (:), indicating that
it's a DOS path with a drive.
Otherwise stripping such prefix might result in a patch
that looks like a relative path.

For example, "\\?\Volume{GUID}\" becomes "Volume{GUID}\",
which is a valid directory name.

Currently it's up to the user to make sense of such paths.
2018-10-10 13:51:06 -04:00
Руслан Ижбулатов
d72d141c1e Enable GIO tests on Windows
1) Remove the non-Windows-only condition for subdir('tests').
2) Add libiphlpapi, libws2_32 and libsecur32 deps, needed for W32 tests.
3) Remove the -no-undefined argument (gcc doesn't understand it,
   it *does* understand -Wl,-no-undefined; either way, the test
   compiles without this argument just fine; maybe meson adds it
   by itself - you can hardly build shared modules without it).
4) Add or fix a number of includes
5) Disable gdbus-objectmanager tests when building with MSVC
   (right now these tests don't work on Windows anyway, so the fact
    that MSVC can't even build them properly is irrelevant;
    most likely gdbus-codegen needs changes to put _GLIB_EXTERN
    before each function)
2018-10-10 13:51:06 -04:00
Emmanuele Bassi
400cec2796 Install m4 macros unconditionally
Partial revert of commit a7a6449f4d63357bf3a66140e9fb3ccb18611c0b.

Checking for the availability of m4 for installing m4 macro files
creates an implicit dependency on m4 even if GLib does not need it; this
prevents building GLib and then installing Autotools in order to build a
project that depends on GLib.

Closes #1520
2018-10-10 13:51:06 -04:00
Philip Withnall
c1f78a5997 build: Drop pointless -Wformat-security warning flag
We already set -Wformat=2, which implies -Wformat-security, so there’s
no need to test for and set -Wformat-security separately.

The test for -Wformat-security never worked anyway, since gcc complains
if it’s specified without also setting -Wformat to some value. The
complaint causes configure.ac/meson.build to assume the option doesn’t
work.

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

https://gitlab.gnome.org/GNOME/glib/issues/656
2018-10-10 13:51:06 -04:00
Philip Withnall
60adc1efbb build: Drop AC_C_CONST from configure.ac
Any compiler we care about now supports the `const` keyword, so we no
longer need to check for it. autoconf has recommended this macro is
obsolete:

https://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node/C-Compiler.html#index-AC_005fC_005fCONST-755

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

https://gitlab.gnome.org/GNOME/glib/issues/1313
2018-10-10 13:51:06 -04:00
Philip Withnall
540fd15e4c glib: Remove remaining references to __int64
This is a follow-up to 7e821441c482917e54435a07893272d87d3ad9e5 and
e154e3325eb7274b8164f8d7a5e0f335646c2bb7 removing some remaining
references to __int64 which are no longer necessary.

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

https://gitlab.gnome.org/GNOME/glib/issues/1313
2018-10-10 13:51:06 -04:00
Philip Withnall
7df0977de4 build: Remove SIZEOF___INT64 definition from meson.build
This was a leftover from use of the __int64 type, which was removed
recently in commit 7e821441c482917e54435a07893272d87d3ad9e5.

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

https://gitlab.gnome.org/GNOME/glib/issues/1313
2018-10-10 13:51:06 -04:00
Philip Withnall
e42d5dafb7 build: Stop defining STDC_HEADERS
This was previously defined by the AC_HEADER_STDC macro in configure.ac,
but we don’t use that any more. Nothing in GLib depends on this macro,
and neither does anything in my /usr/include which we might care about.

The autoconf documentation for AC_HEADER_STDC says it’s deprecated:
https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Particular-Headers.html#index-AC_005fHEADER_005fSTDC-621

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

https://gitlab.gnome.org/GNOME/glib/issues/1313
2018-10-10 13:51:06 -04:00
Philip Withnall
e17be33a0e build: Drop unused HAVE_DLFCN_H definition
I can’t see this being used anywhere in GLib, or in my /usr/include
directory. I’m also not sure how configure.ac ends up defining it — it’s
certainly as a side-effect of something, and not deliberate.

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

https://gitlab.gnome.org/GNOME/glib/issues/1313
2018-10-10 13:51:06 -04:00
Philip Withnall
f85c462315 build: Check for bind_textdomain_codeset() properly
Previously we weren’t checking for it in meson.build (but were checking
for it in configure.ac, courtesy of glib-gettext.m4). Roughly emulate
the checks from glib-gettext.m4, checking for bind_textdomain_codeset()
in whichever libintl implementation we found ngettext() in.

meson.build still doesn’t implement the full set and order of checks in
glib-gettext.m4; there’s still a FIXME about that in meson.build.

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

https://gitlab.gnome.org/GNOME/glib/issues/1313
2018-10-10 13:51:06 -04:00
Philip Withnall
bdc37e3711 build: Define GLIB_USING_SYSTEM_PRINTF properly
Previously it was hard-coded to true, rather than being based on the
calculations actually made by meson.build.

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

https://gitlab.gnome.org/GNOME/glib/issues/1313
2018-10-10 13:51:06 -04:00
Philip Withnall
d0e979b748 build: Check for Unix98 positional parameter support in printf()
This is equivalent to the AC_FUNC_PRINTF_UNIX98 macro which we use in
configure.ac. There may still be some obscure Unix platforms which don’t
natively support positional parameters, 20 years on.

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

https://gitlab.gnome.org/GNOME/glib/issues/1313
2018-10-10 13:51:06 -04:00
Christoph Reiter
3f9a922d96 build: simplify alloca checks. See #1313
The goal of this commit is to reduce differences between the autotools and meson build.

With autotools AC_FUNC_ALLOCA was used which defines HAVE_ALLOCA_H, HAVE_ALLOCA,
C_ALLOCA. meson tried to replicate that with has_function() but alloca can be a macro
and and is named _alloca under Windows. Since we require a working alloca anyway
and only need to know if the header exists replace AC_FUNC_ALLOCA with a simple
AC_CHECK_HEADERS.

There is still one user of HAVE_ALLOCA in the embedded gnulib, but since alloca is
always provided through galloca.h just force define HAVE_ALLOCA there and add a comment.

The docs were mentioning alloca as an example for cross compiling. Since that variable no
longer exists now replace it with another one.
2018-10-10 13:51:06 -04:00
Fabio Tomat
fc7b8e84a7 Update Friulian translation 2018-09-29 14:51:23 +00:00
Xavier Claessens
a579ac9c14 Merge branch 'stable-ci' into 'glib-2-58'
ci: Use a docker image for stable branch

See merge request GNOME/glib!346
2018-09-28 14:30:49 +00:00
Xavier Claessens
21da53a7f6 ci: Use a docker image for stable branch
The master docker image will eventually use a new meson version, but we
want to ensure stable branch still works on old version.
2018-09-24 10:05:15 -04:00