Commit Graph

464 Commits

Author SHA1 Message Date
Xavier Claessens
9d12af9ef8 configure.ac: Remove --disable-znodelete options
There is no reason to disable this linker flags, and we are not going to
add this option in our meson build system, so remove it from autotools
too to be on par. If anyone complains with a valid use-case we can add
them back.

Keeping -Bsymbolc for now because it is used for refdbg and Debian has a
package that build glib with that flag.

https://bugzilla.gnome.org/show_bug.cgi?id=788771
2018-04-30 12:14:07 -04:00
Xavier Claessens
01e8396301 Fix build when pthread_getname_np is not available
On Android _setname_ is always available but _getname_ is available only
with API level >= 26.

https://bugzilla.gnome.org/show_bug.cgi?id=795406
2018-04-25 13:56:14 -04:00
Xavier Claessens
7efd76dd67 struct ip_mreq_source definition is broken on Android NDK <= r16
This fix the build on Android r16 and older, see:
https://issuetracker.google.com/issues/36987220

https://bugzilla.gnome.org/show_bug.cgi?id=740791
2018-04-24 15:00:17 -04:00
Philip Withnall
723ac89b0c tests: Add a GFileMonitor test for G_FILE_MONITOR_WATCH_HARD_LINKS
Add a test for monitoring an existing local file, with the
WATCH_HARD_LINKS flag specified. This would previously cause a crash;
now it doesn’t.

This test contains a FIXME where I suspect we should be getting some
additional file change notifications from changes made through the hard
link; this requires further follow up and probably further fixes to our
inotify backend.

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

https://bugzilla.gnome.org/show_bug.cgi?id=755721
2018-04-18 15:13:02 +01:00
Philip Withnall
15201345de build: Bump version to 2.57.0
Ready for the new unstable release series.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Reviewed-by: nobody
2018-03-13 12:17:31 +00:00
Matthias Clasen
f58d46e39f 2.56.0 2018-03-12 16:52:13 -04:00
Dr. Michael Lauer
cc50c19544 configure.ac: link to AppKit on macOS.
This is actually only necessary for gio, not for the other libraries.

https://bugzilla.gnome.org/show_bug.cgi?id=793565
2018-03-05 16:48:07 +00:00
Ernestas Kulik
aef0e694eb configure.ac: add -Wduplicated-branches
https://bugzilla.gnome.org/show_bug.cgi?id=793399
2018-02-21 13:57:10 +00:00
Rafal Luzynski
be4f96b650 g_date_time_format: Support nominative/genitive months
Supports %OB (alternative, standalone, nominative) month name along
with the old %B (primary, in a complete date format context, genitive)
month name.  Similarly %Ob and %Oh for abbreviated month names.
Depending on the underlying operating system uses nl_langinfo()
or provides our custom implementation.

(Tweaked by Philip Withnall <withnall@endlessm.com> to add test case
comment and bug reference.)

https://bugzilla.gnome.org/show_bug.cgi?id=749206
2018-02-16 14:37:51 +00:00
Matthias Clasen
ee57d56e8d 2.55.2 2018-02-14 08:19:20 -05:00
Philip Withnall
35d5add4bb build: Lower libmount dependency to 2.23
Since commit 96ebcee8c4, we don’t actually need libmount 2.28. Lower our
dependency to 2.23 so that we can continue to build against CentOS 7.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Reviewed-by: Emmanuele Bassi <ebassi@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=793288
2018-02-13 14:59:03 +00:00
Philip Withnall
b716660fab build: Drop fallback checks for libmount versions without pkg-config
Building against libmount installed into a non-default prefix wasn’t
working, as we were using #include <libmount/libmount.h> rather than
the correct #include <libmount.h> — all the mount.pc pkg-config files
set `Cflags: -I${includedir}/libmount`.

Fixing this while retaining the fallback support for versions of
libmount without a pkg-config file would have been tricky (we would need
to work out a suitable -I flag to set in LIBMOUNT_CFLAGS) to still be
able to use the correct #include path). Thankfully, libmount gained
pkg-config support a long time ago, so I think we can safely drop the
fallback code. In particular, Debian Jessie, Ubuntu Trusty, and CentOS 5
all ship a mount.pc file.

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

https://bugzilla.gnome.org/show_bug.cgi?id=793288
2018-02-13 14:17:11 +00:00
Philip Withnall
40be86bb0e gio: Port GThreadedResolver to use res_nquery() to fix thread-safety
res_query() uses global state in the form of the struct __res_state
which contains the contents of resolv.conf (and other things). On Linux,
this state seems to be thread-local, so there is no problem. On OS X,
however, it is not, and hence multiple res_query() calls from parallel
threads will compete and return bogus results.

The fix for this is to use res_nquery(), introduced in BIND 8.2, which
takes an explicit state argument. This allows us to manually store the
state thread-locally. If res_nquery() isn’t available, we fall back to
res_query(). It should be available on OS X though. As a data point,
it’s available on Fedora 27.

There’s a slight complication in the fact that OS X requires the state
to be freed using res_ndestroy() rather than res_nclose(). Linux uses
res_nclose().

(See, for example, the NetBSD man page:
https://www.unix.com/man-page/netbsd/3/res_ninit/. The Linux one is
incomplete and not so useful:
http://man7.org/linux/man-pages/man3/resolver.3.html.)

The new code will call res_ninit() once per res_nquery() task. This is
not optimal, but no worse than before — since res_query() was being
called in a worker thread, on Linux, it would implicitly initialise the
thread-local struct __res_state when it was called. We’ve essentially
just made that explicit. In practical terms, this means a
stat("/etc/resolv.conf") call per res_nquery() task.

In future, we could improve this by using an explicit thread pool with
some manually-created worker threads, each of which initialises a struct
__res_state on spawning, and only updates it on receiving
the #GResolver::reload signal.

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

https://bugzilla.gnome.org/show_bug.cgi?id=792050
2018-02-02 18:05:27 +01:00
Emmanuele Bassi
c1d58dd7e0 build: Document the chmod-scripts configure command
The chmod of all the scripts we generate from a template via configure
is necessary because configure will not preserve the bits of the
template when generating a new file.

There's no explanation for it, and you have to hunt it down the commit
history. Since Meson does the right thing, we added the executable bit
on the templates, but we cannot remove the AC_CONFIG_COMMANDS macro from
the Autotools build without breaking it. Let's document this, to avoid
nasty surprises.
2018-01-30 11:18:34 +00:00
Emmanuele Bassi
c685ce973d Fix dir separator in the Autotools build on Windows
Just like we fixed the Meson build in commit f25c7a2a, we need to escape
twice: once for the shell expansion, and the other for the C string
constant.
2018-01-16 15:19:41 +00:00
Mikhail Zabaluev
6dafc1ce13 Move G_DIR_SEPARATOR* and G_SEARCHPATH_SEPARATOR* into glibconfig.h
As platform-dependent macros, they belong in glibconfig.h.
This also makes it one less place where g-ir-scanner picks definitions
from the wrong ifdef branch; see
https://bugzilla.gnome.org/show_bug.cgi?id=696935

Meson configuration support is also added in this commit.

https://bugzilla.gnome.org/show_bug.cgi?id=757284
2018-01-09 12:08:40 +00:00
Philip Withnall
ade324f6fa build: Enable -fno-strict-aliasing
GLib makes various assumptions about aliasing throughout its codebase,
and compiling with -fstrict-aliasing has been demonstrated to cause
problems (for example, bug #791622). Explicitly disable strict aliasing
as a result.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-01-08 11:50:31 +00:00
Michael Catanzaro
617d40c13b Bump to version 2.55.1
So that GIO modules may begin using the static linking support.
2018-01-04 16:34:33 -06:00
Philip Withnall
030efac077 build: Include $host_cpu in tapset directory
SystemTap tapsets are architecture-specific, as they include the full
path to the .so file for each probe they reference. Hence, we should
install them in an architecture-specific path, or multiarch systems will
suffer from collisions between them.

A better long-term solution, using $libdir rather than the
non-architecture-specific $datadir, is under discussion upstream:
https://sourceware.org/bugzilla/show_bug.cgi?id=20264; but this will do
for now.

https://bugzilla.gnome.org/show_bug.cgi?id=662802
2017-11-28 14:00:26 +00:00
Alan Coopersmith
ca32be3bf2 Fix -z nodelete configure check to work on Solaris
Passing -z nodelete without the shared library flags on Solaris results in
ld: fatal: option '-z nodelete' is incompatible with building a dynamic executable
which causes the configure test to falsely report its not supported.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

https://bugzilla.gnome.org/show_bug.cgi?id=776195
2017-11-21 12:14:27 +00:00
Daniel Macks
6bcc8b4034 Add configuration option for charset.alias directory
Specifically controlling the location of this file, rather than simply
using $libdir, allows one to avoid conflicting with the same default
location as the gnulib localcharset module uses.

https://bugzilla.gnome.org/show_bug.cgi?id=346816
2017-11-20 11:27:21 +00:00
Philip Withnall
f2c093f657 build: Drop --enable-rebuilds configure option
It is outdated and no longer effectively used. It was originally in
place to prevent rebuilding generated files (from a tarball) if the
right build tools (awk, Perl, indent) were not available. However, we no
longer use indent, we have hard-required awk for a while, and the only
places the @REBUILD@ substitution was still used were for
glib-genmarshal, which has recently been rewritten in Python (so no
longer depends on whether Perl is available).

Drop the whole lot.

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

https://bugzilla.gnome.org/show_bug.cgi?id=694723
2017-11-17 15:11:47 +00:00
Philip Withnall
cfe41f4ced build: Fix a broken link in an error message from configure.ac
Spotted in bug #742548.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-11-07 11:45:29 +00:00
Colin Walters
6036d40073 build: Work with automake 1.13.3
In https://git.gnome.org/browse/glib/commit/?id=5c13bf9bcf0 we jumped all the
way from `1.11` to `1.14`, but `1.13.3` is what's in RHEL7.4 today, and the build
seems to work fine for me with it.
2017-11-02 08:50:35 -04:00
Colin Walters
96ebcee8c4 Build with old libmount too
Downstream: https://bugzilla.redhat.com/show_bug.cgi?id=1508056

This is an easy change, and lets us build with RHEL7's libmount.

See also cee57a0268
2017-11-01 14:22:18 -04:00
Emmanuele Bassi
5c13bf9bcf build: Use subdir-objects with Autotools
We're eventually going to drop Autotools, but in the meantime we should
probably use idiomatic options and reduce warnings.

GLib is pretty much already safe for subdir-objects to be enabled,
except in the GIO tests, where the build references files that are
generated in a different level. For that, we can use the same solution
employed by GTK+, and link the appropriate file in the right
sub-directory.

https://bugzilla.gnome.org/show_bug.cgi?id=788989
2017-10-24 13:30:41 +01:00
Julien Isorce
ea725a6414 gio: add g_socket_join_multicast_group_ssm (IGMPv3 SSM)
It adds support for source-specific multicast IGMPv3.

Allow receiving data only from a specified source when joining
a multicast group.

g_socket_join_multicast_group_ssm can be called multiple times
to allow receiving data from more than one source.

Support IPv4 and IPv6.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=740791
2017-10-16 11:14:57 +01:00
Руслан Ижбулатов
6abdc06da6 W32: Bump target NT version to 0x601 (7 or newer)
Also remove now-unnecessary if_nametoindex() implementation
(the HAVE_IF_NAMETOINDEX configure check didn't work correctly, it turned out),
which prevents glib from building. if_nametoindex() is available in lphlpapi since
Vista[1], so we don't need a compatibility function for it anymore, as Windows 7
is the new minimally-required version.

[1] https://msdn.microsoft.com/en-us/library/windows/desktop/bb408409(v=vs.85).aspx

https://bugzilla.gnome.org/show_bug.cgi?id=788180
2017-10-11 12:29:55 +01:00
Emmanuele Bassi
f40154e218 build: Look for mkostemp when configuring
We use this function, but it may be missing on older Linux platforms.

https://bugzilla.gnome.org/show_bug.cgi?id=788705
2017-10-09 12:45:59 +01:00
Emmanuele Bassi
7b15f12f0e Remove PERL_PATH from Autotools build
We don't use Perl for glib-mkenums any more.
2017-10-09 12:45:18 +01:00
Matthias Clasen
8be9a6f020 Revert "Prepare for 2.54.1"
This reverts commit 9a08d3ef8f.

Turns out there's new api here already.
2017-10-02 10:54:58 -04:00
Matthias Clasen
9a08d3ef8f Prepare for 2.54.1 2017-10-02 10:45:53 -04:00
Philip Withnall
d5933142c8 build: Bump version to 2.55.0
Ready for the new unstable release series.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-09-11 19:25:56 +01:00
Matthias Clasen
738eff5dec 2.54.0 2017-09-10 20:18:10 -04:00
Matthias Clasen
052f134528 2.53.7 2017-09-04 09:02:53 -04:00
Patrick Welche
2237bb451d build: remove unnecessary executions of libtool from configure
https://bugzilla.gnome.org/show_bug.cgi?id=736710
2017-08-22 08:58:52 +01:00
Matthias Clasen
fd081f38b6 2.53.6 2017-08-19 09:48:14 -04:00
Matthias Clasen
47e10489c5 2.53.5 2017-08-07 12:35:17 -04:00
Philip Withnall
22700faf88 build: Loosen --enable-compile-warnings check
Instead of requiring --enable-compile-warnings or
--enable-compile-warnings=yes, allow any value which is not ‘no’. This
enables compile warnings for --enable-compile-warnings=maximum or
--enable-compile-warnings=error, which are common values for other GNOME
projects. While we don’t change our behaviour for [yes, maximum, error],
at least it means the warnings are enabled now, rather than disabled.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-08-03 11:55:23 +01:00
Emmanuele Bassi
fd541c3518 Require Python 2.7
Python 2.7 is the last stable release of the 2.x series, as per PEP
404: http://legacy.python.org/dev/peps/pep-0404/

Python 2.7 is also 7 years old, and maintained until 2020.
2017-07-20 15:11:50 +01:00
Matthias Clasen
1e4135f253 2.53.4 2017-07-17 10:46:19 -04:00
Nirbheek Chauhan
9096bde3ce build: Remove function checks for unused functions
These were removed several years ago.
2017-07-13 19:03:39 -04:00
Emmanuele Bassi
93f16a45ab Rewrite glib-genmarshal in Python
We're in the process or rewriting other tools in Python to reduce the
number of dependencies of GLib.

Additionally, making glib-genmarshal a Python script reduces the
complexity when cross-compiling, as we don't need a native build to
generate the marshallers.

https://bugzilla.gnome.org/show_bug.cgi?id=784528
2017-07-10 16:47:47 +01:00
Philip Withnall
a131134918 build: Drop nmake/MSC build system for GLib
It hasn’t been seriously maintained for the best part of 10 years and is
very outdated. The recommended way to build GLib on Windows is now
Visual Studio:

https://wiki.gnome.org/Projects/GTK%2B/Win32/MSVCCompilationOfGTKStack#GLib

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

https://bugzilla.gnome.org/show_bug.cgi?id=722047
2017-07-10 11:22:40 +01:00
Aleksander Morgado
1d3210a8ab configure: fix minor typo 'be build'->'be built'
https://bugzilla.gnome.org/show_bug.cgi?id=784739
2017-07-10 11:11:33 +01:00
Jehan
9bc3d025f9 configure: close a parenthese in an error message. 2017-07-01 17:03:29 +02:00
Igor Pashev
c8e268bbce Fix detection and usage of strerror_r()
autoconf provides a macro for this situation, which saves us having to
manually work out whether strerror_r() returns a char* or an int.

https://bugzilla.gnome.org/show_bug.cgi?id=784000
2017-06-20 14:59:27 +01:00
Matthias Clasen
bb50b70713 2.53.3 2017-06-19 21:51:09 -04:00
Matthias Clasen
646041bc28 Allow ltp 1.12
It works just fine, in my testing.
2017-05-27 10:52:40 -04:00
Emmanuele Bassi
5faaaac92c Check for a recent enough libmount
We need mnt_unref_table() in order to use libmount, but we also need to
keep the fallback code for installations of libmount without a
pkg-config file.

https://bugzilla.gnome.org/show_bug.cgi?id=782628
2017-05-16 11:25:02 +01:00