Commit Graph

20113 Commits

Author SHA1 Message Date
Ting-Wei Lan
41259ac173 kqueue: Only fallback to polling on /media and /run/media
The check in _ke_is_excluded, which causes GKqueueFileMonitor to
fallback to GPollFileMonitor when it returns TRUE, was made to prevent
file monitor from blocking unmount of removable drives on systems not
supporting O_EVTONLY flag in open. However, since g_mount_can_unmount
always returns TRUE on Unix-like platforms, the check always returns
TRUE on non-standard mount points, which is very likely to cause all
programs on the desktop to use the polling fallback if GNOME is
installed in a different prefix for development. This makes the desktop
sluggish and results in bad developer experience on *BSD.
2018-06-07 00:38:07 +08:00
Ting-Wei Lan
70e4ca0340 tests: Don't run file creation and deletion test on kqueue
Kqueue isn't good at detecting rapid file creation and deletion. It
tends to miss events because events returned by the kernel don't include
filename information. Since the size of struct kevent is fixed, it is
probably not possible to extend the API to include file names without
breaking ABI. Therefore, we disables the test here to avoid test failure
that is impossible to fix in a reliable way.
2018-06-07 00:38:07 +08:00
Ting-Wei Lan
bfbeb6f0f5 tests: Don't fail when not using du from GNU coreutils
The test 'file' uses non-standard '--bytes' option when running du,
which may cause error on non-GNU systems. To keep the test working,
we skips the du check as if we don't find a du command when du fails.
2018-06-07 00:37:28 +08:00
Ting-Wei Lan
12a7f27256 meson: Don't use -export-dynamic
-export-dynamic is a libtool flag. It is also supported by GCC as an
undocumented flag, but it is not supported by Clang. Since we don't use
libtool in meson, we should use -Wl,--export-dynamic instead.
2018-06-07 00:34:36 +08:00
Ting-Wei Lan
0388367356 kqueue: Make _ke_is_excluded static
It is not used in any other file.
2018-06-07 00:34:36 +08:00
Chun-wei Fan
cd2081d6a8 README.win32: More updates on GLib usage
Remove mentions of the pre-configured glibconfig.h.win32, as it does not
exist anymore.  Also make the 2008/x64 build workarounds clearer.
2018-06-06 23:54:13 +08:00
Chun-wei Fan
b806ab8906 build: Remove build/win32/vs8
The Visual Studio 2005 projects have not been updated nor dist'ed in a
while, plus we are directing people using Visual Studio to build using
Meson, so it's time to remove them from the source tree.
2018-06-06 23:54:13 +08:00
Chun-wei Fan
4bb173b297 build: Remove leftovers of Visual Studio project stuff
There are more leftover preconfigured stuff that we ought to remove...
2018-06-06 23:54:13 +08:00
Chun-wei Fan
efd19088b0 Drop config.h.win32.in and glib/glibconfig.h.win32.in
Since the Visual Studio projects are dropped, the pre-configured
config.h.win32.in and glib/glibconfig.h.win32.in are no longer needed.
2018-06-06 23:54:13 +08:00
Chun-wei Fan
6888e3278c README.win32: Update build instructions
Let people know that they should use Meson for building GLib under
Visual Studio, and the steps that they may need to know.
2018-06-06 23:54:13 +08:00
Chun-wei Fan
f658e94e65 build: Drop Visual Studio projects
In master, it is already possible to build GLib using Visual Studio
using Meson[1] for some time, so we should focus on maintaining only the
Meson build files for building GLib with Visual Studio.

[1]: There are caveats when building with Visual Studio 2008, namely
     that one needs to use the mt command to embed the manifests that
     are generated with the .exe/DLLs, for all builds, and that in the
     case where the compilation hangs on Visual Studio 2008 x64, as a
     workaround, should stop the build by terminating all cl.exe tasks
     and change the compiler optimization flag from /O2 (full speed) to
     /O1 (optimize for size), due to compiler optimization issues.
2018-06-06 23:54:13 +08:00
Philip Withnall
b4259dec70 Merge branch 'wip/oholy/gunixmountfor-docs' into 'master'
docs: Document g_unix_mount_for

See merge request GNOME/glib!66
2018-06-06 11:03:32 +00:00
Philip Withnall
205059b9c0 Merge branch 'wip/oholy/trashing-locations' into 'master'
glocalfile: Allow trashing only for locations supported by trash:///

See merge request GNOME/glib!49
2018-06-06 10:58:22 +00:00
Ondrej Holy
8df517b457 docs: Document g_unix_mount_for
g_unix_mount_for() has been added into GLib before some time,
however, it is missing in the docs.
2018-06-06 12:24:12 +02:00
Ondrej Holy
f7e80f8d0c glocalfile: Add test case for g_file_trash
g_local_file_trash has been changed to return G_IO_ERROR_NOT_SUPPORTED
for locations on system-internal mounts. Let's verify that.

https://gitlab.gnome.org/GNOME/glib/issues/251
2018-06-06 12:18:30 +02:00
Marek Cernocky
5107d209d8 Updated Czech translation 2018-06-06 11:06:49 +02:00
Philip Withnall
f06ba1722c Merge branch 'solaris-defines' into 'master'
Meson: Add missing defines on Solaris

See merge request GNOME/glib!64
2018-06-06 01:55:43 +00:00
Xavier Claessens
02bac34921 Merge branch 'drop-unused-defines' into 'master'
Remove unused HAVE_LONG_LONG_FORMAT and HAVE_LONG_LONG_FORMAT

See merge request GNOME/glib!63
2018-06-05 23:32:20 +00:00
Xavier Claessens
6ed57f8e26 Meson: Add missing defines on Solaris
We have no way to test Solaris builds atm, and it is not even clear how
to detect Solaris systems with meson. It will probably need to be
revisited when we get a proper CI in place.
2018-06-05 19:30:16 -04:00
Xavier Claessens
65bd090d57 Remove unused HAVE_LONG_LONG_FORMAT and HAVE_INT64_AND_I64 2018-06-05 19:04:48 -04:00
Philip Withnall
8683e029be Merge branch 'ci-cleanup' into 'master'
ci: small cleanups

See merge request GNOME/glib!62
2018-06-05 22:30:16 +00:00
Xavier Claessens
79c1cd21f2 ci: Be consistent on artifact naming 2018-06-05 14:01:53 -04:00
Xavier Claessens
a4ccb4972c ci: No need to "cd _build" and set prefix/libdir 2018-06-05 13:58:48 -04:00
Xavier Claessens
34e0c5a799 ci: Add missing "except: tags" 2018-06-05 13:39:26 -04:00
Christoph Reiter
0a36314b28 Merge branch 'meson-unused-zlib-libname' into 'master'
Meson: Remove unused zlib_libname variable

See merge request GNOME/glib!61
2018-06-05 15:37:57 +00:00
Xavier Claessens
9229f96fd6 Meson: Remove unused zlib_libname variable 2018-06-05 10:51:03 -04:00
Xavier Claessens
68d99c766b Merge branch 'patch-2' into 'master'
Fix potential Null pointer dereference

See merge request GNOME/glib!60
2018-06-05 14:38:44 +00:00
Gaurav
4ade09416b Fix potential Null pointer dereference.
if "match" is NULL, it is dereferenced in match_free() (L:457)
2018-06-05 14:01:47 +00:00
Ondrej Holy
6dfd0a00e7 glocalfile: Update G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH logic
Change G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH logic to be consistent
with recent g_local_file_trash changes, i.e. set this to FALSE for
locations on system-internal mounts.

https://gitlab.gnome.org/GNOME/glib/issues/251
2018-06-05 14:53:15 +02:00
Ondrej Holy
15a47afb0e glocalfile: Allow trashing only for locations supported by trash:///
New bugs appears periodically in nautilus/gvfs/glib components that not
all trashed files are shown in trash:///. It used to be problem mostly
for "bind mounts" and btrfs subvolumes only. Currently, it is also
problem for nfs, cifs and other filesystems, which have been recently
added by commmit 0d69462f on the list of system internal filesystems.

This happens because the trash backend doesn't monitor files on system
internal mounts. Such behavior is not against the trash-spec, however,
we should be consistent within GNOME.

This behavior has the nice side-effect that it solves issues with hangs
on network filesystems: https://gitlab.gnome.org/GNOME/glib/issues/605,
because those are currently on the system internal filesystem list.

https://gitlab.gnome.org/GNOME/glib/issues/251
2018-06-05 14:53:15 +02:00
Philip Withnall
1e9060547d Merge branch '1307-tarball-dist' into 'master'
Remove some files not included in tarballs

Closes #1307

See merge request GNOME/glib!58
2018-06-05 09:10:21 +00:00
Xavier Claessens
27ec1469ab Remove developer script not needed in git repository 2018-06-04 22:27:22 -04:00
Xavier Claessens
b04cf01934 Remove old tests not being built since 2012
Those tests are failing and are not built since commit d6a075b
2018-06-04 22:18:02 -04:00
Xavier Claessens
4a369a0b6c Remove tests/gio-ls.c that never has been built 2018-06-04 21:53:00 -04:00
Philip Withnall
95ebaa26aa Merge branch '1401-g_clear_handle_id-clear_func-not-nullable' into 'master'
g_clear_handle_id: don't accept NULL clear_func

Closes #1401

See merge request GNOME/glib!55
2018-06-04 13:41:10 +00:00
Will Thompson
0f7c196c21
g_clear_handle_id: don't accept NULL clear_func
Fixes #1401.
2018-06-04 13:11:49 +01:00
Philip Withnall
e1e8002998 garray: Optimise over-allocations with g_array_insert_vals()
When over-allocating by inserting values off the end of an array, maybe
expand the array once, rather than twice (once for setting the size and
once for appending the values).

Suggestion by Peter Bloomfield (@peterb) as a follow-up to #1374.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-06-04 11:45:48 +01:00
Philip Withnall
e0f82b9494 Merge branch '1374-array-tests' into 'master'
Resolve "Fix g_array_insert_vals() with an index off the end of the array"

Closes #1374

See merge request GNOME/glib!12
2018-06-04 10:34:28 +00:00
Philip Withnall
80243e65b6 tests: Expand GArray test coverage to cover all construction forms
Previously, there was very little coverage of GArray behaviour with
either of the zero_terminated or clear_ arguments to g_array_new() set
to TRUE.

Parameterise the tests and exhaustively expand the coverage to cover all
possible GArray configurations.

This was made possible by the online code coverage report for GLib which
we now have:
https://gnome.pages.gitlab.gnome.org/glib/coverage/glib/garray.c.gcov.html.

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

https://bugzilla.gnome.org/show_bug.cgi?id=795975
2018-06-04 11:11:26 +01:00
Philip Withnall
89f45e96b2 garray: Allow over-allocation in g_array_insert_vals()
Previously, g_array_insert_vals() would crash if called with an index
off the end of the array. This is inconsistent with the behaviour of
other methods (like g_array_set_size()), which will expand the array as
necessary.

Modify g_array_insert_vals() to expand the array as necessary. New array
elements will be cleared to zero if the GArray was constructed with
(clear_ == TRUE).

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

https://bugzilla.gnome.org/show_bug.cgi?id=795975
2018-06-04 11:11:26 +01:00
Philip Withnall
3eeec77800 garray: Fix (nullable) annotation on GArray.[prepend|insert]_vals()
They do both accept NULL value arrays, but only if the number of
elements in the value array is zero. Fix the annotations and mention
this in the documentation.

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

https://bugzilla.gnome.org/show_bug.cgi?id=795975
2018-06-04 11:11:26 +01:00
Xavier Claessens
05fe110635 Merge branch 'remove-disable-mem-pools' into 'master'
build: Remove the --disable-mem-pools build option and the DISABLE_MEM_POOLS macro

See merge request GNOME/glib!52
2018-06-03 03:22:18 +00:00
Christoph Reiter
3aa23078ac build: Remove the --disable-mem-pools build option and the DISABLE_MEM_POOLS macro
It's mostly not used anymore and doesn't do what it says it does.

The docs state that it affects GList, GSList, GNode, GMemChunks, GSignal,
GType n_preallocs and GBSearchArray while:

* GList, GSList and GNode use GSlice and are not affected
* GMemChunks is gone
* GType npreallocs is ignored

It also states that it can be used to force the usage of g_malloc/g_free,
which is handled by G_SLICE=always-malloc now.

The only places where it's used is in signal handling through GBSearchArray
and in GValueArray (deprecated). Since it's unlikely that anyone wants to
reduce allocation sizes just for those cases remove the build option.
2018-06-02 09:45:55 +02:00
Christoph Reiter
553df9dcaf Merge branch 'fix-gdbus-unix-addresses-test' into 'master'
Fix failing gdbus-unix-addresses test when G_MESSAGES_DEBUG is set

See merge request GNOME/glib!50
2018-06-01 15:31:25 +00:00
Nirbheek Chauhan
b1ce8344b7 Merge branch 'patch-1' into 'master'
Fix a warning reported by static analyser tool

See merge request GNOME/glib!44
2018-06-01 14:30:14 +00:00
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