ext3 and ext4 (for quite some time) with default mount options don't
need fsync() to ensure safety of replace-by-rename. Stop doing that for
these filesystems.
Note: this patch also impacts ext2, which is probably not safe, but I
don't know of any way to check ext2. vs the others because they all have
the same magic numbers (short of opening /proc/mount).
This patch assumes that if BTRFS_SUPER_MAGIC is defined then so will be
EXT3_SUPER_MAGIC.
https://bugzilla.gnome.org/show_bug.cgi?id=701560
OS X's getaddrinfo() only supports IPv6 scope IDs that are interface
names, not numbers. So use if_indextoname() to get the name of an
interface and construct an address using that.
https://bugzilla.gnome.org/show_bug.cgi?id=700123
Use a normal write() system call instead of fdopen() and fwrite().
This will definitely work on UNIX system and should work on Windows as
well...
As an added bonus, we can use g_close() now as well.
https://bugzilla.gnome.org/show_bug.cgi?id=701560
g_file_set_contents() sets a GError in the event of various failures
that count occur. It uses g_filename_display_name() in order to get the
filename to include in the messages.
Factor out the error handling to make it easier to allocate the display
name only when we need it (instead of allocating it every time).
https://bugzilla.gnome.org/show_bug.cgi?id=701560
Extents-based filesystems like knowing in advance how much data will be
written to a file in order to prevent fragmentation. If we have it, use
posix_fallocate() before writing data in g_file_set_contents().
https://bugzilla.gnome.org/show_bug.cgi?id=701560
In the case that HAVE_DBUS_DAEMON was undefined (as in ostree where glib
is built before D-Bus) this test was failing. Move it inside the
HAVE_DBUS_DAEMON block.
Newer versions of automake (~1.13.1) seem to generate some new rules for
testcases that get tripped up on our use of $(addsuffix) and $(strip) so
take those out of the definition of TESTS on win32.
Remove the complications that were introduced in an attempt to make the
gsettings and gschema-compile tests function as installed tests. These
tests are designed (in large part for gsettings and entirely for
gschema-compile) to test the in-tree tools and should not be testing the
system versions.
In the future we may want to move the use of the in-tree tools from the
gsettings testcase into the Makefile and install the resulting files,
allowing this testcase to run against those files, installed.
Perform a substantial cleanup of the build system with respect to
building and installing testcases.
First, Makefile.decl has been renamed glib.mk and substantially
expanded. We intend to add more stuff here in the future, like canned
rules for mkenums, marshallers, resources, etc.
By default, tests are no longer compiled as part of 'make'. They will
be built when 'make check' is run. The old behaviour can be obtained
with --enable-always-build-tests.
--disable-modular-tests is gone (because tests are no longer built by
default). There is no longer any way to cause 'make check' to be a
no-op, but that's not very useful anyway.
A new glibtests.m4 file is introduced. Along with glib.mk, this
provides for consistent handling of --enable-installed-tests and
--enable-always-build-tests (mentioned above).
Port our various test-installing Makefiles to the new framework.
This patch substantially improves the situation in the toplevel tests/
directory. Things are now somewhat under control there. There were
some tests being built that weren't even being run and we run those now.
The long-running GObject performance tests in this directory have been
removed from 'make check' because they take too long.
As an experiment, 'make check' now runs the testcases on win32 builds,
by default. We can't run them under gtester (since it uses a pipe to
communicate with the subprocess) so just toss them in TESTS. Most of
them are passing on win32.
Things are not quite done here, but this patch is already a substantial
improvement. More to come.
After this patch, there is but one remaining use of g_thread_init(),
which is in tests/slice-threadinit.c, a testcase dedicated to testing
the functionality of gslice across a g_thread_init() boundary.
This testcase is pretty meaningless these days... probably we should
delete it.
This should be the last users that need to be ported.
For some of the oldschool non-gtester-ified tests, we call g_test_init()
from main() because it is necessary in order to use
g_test_build_filename().
testgobject.c and timeloop-closure.c are the only two tests in the
toplevel tests/ directory that depend on gobject, so move them to
tests/gobject/ along with the other gobject tests.
Both of these were in noinst_PROGRAMS and not TESTS, so keep them that
way when we move them.
Mark 'test', 'test-report', 'perf-report' and 'full-report' as PHONY in
docs/Makefile.am to prevent recursion of gtester into the documentation
subdirectories. Stop including Makefile.decl from these directories
since it is no longer necessary.
This will clear up the warnings about EXTRA_DIST being defined once in
gtk-doc.make and again in Makefile.decl.
GObject has previously allowed installing properties after class_init
has finished running. This means that you could install some of your
own properties on G_TYPE_OBJECT, for example, although they wouldn't
have worked properly.
A previous patch asserted that this was not true and we had to revert it
because it broke the shell. Instead of reverting, we should have used a
critical, so do that now.
Complaints go to this bug:
https://bugzilla.gnome.org/show_bug.cgi?id=698614
Since this feature is so utterly automake-centric, we may as well be
using the same terminology as automake itself (ie: although it's
BUILT_SOURCES, it's DIST_EXTRA, not DISTED).
Also add some comments to the enum explaining that these terms are
really corresponding directly to the automake terms.
https://bugzilla.gnome.org/show_bug.cgi?id=549783