diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Makefile-libglnx.am | 6 | ||||
-rw-r--r-- | glnx-backports.c | 2 | ||||
-rw-r--r-- | glnx-console.c | 2 | ||||
-rw-r--r-- | glnx-dirfd.c | 2 | ||||
-rw-r--r-- | glnx-errors.c | 2 | ||||
-rw-r--r-- | glnx-fdio.c | 4 | ||||
-rw-r--r-- | glnx-local-alloc.c | 2 | ||||
-rw-r--r-- | glnx-lockfile.c | 2 | ||||
-rw-r--r-- | glnx-lockfile.h | 2 | ||||
-rw-r--r-- | glnx-missing-syscall.h | 2 | ||||
-rw-r--r-- | glnx-shutil.c | 2 | ||||
-rw-r--r-- | glnx-xattrs.c | 2 | ||||
-rw-r--r-- | meson.build | 11 | ||||
-rw-r--r-- | tests/libglnx-testlib.c | 2 | ||||
-rw-r--r-- | tests/test-libglnx-errors.c | 2 | ||||
-rw-r--r-- | tests/test-libglnx-fdio.c | 2 | ||||
-rw-r--r-- | tests/test-libglnx-macros.c | 2 | ||||
-rw-r--r-- | tests/test-libglnx-shutil.c | 2 | ||||
-rw-r--r-- | tests/test-libglnx-xattrs.c | 2 |
20 files changed, 32 insertions, 23 deletions
@@ -2,6 +2,8 @@ # subdir-objects Makefile-libglnx.am.inc +libglnx-config.h + # Some standard bits .deps .libs diff --git a/Makefile-libglnx.am b/Makefile-libglnx.am index 957eae9..b09e43b 100644 --- a/Makefile-libglnx.am +++ b/Makefile-libglnx.am @@ -21,6 +21,10 @@ EXTRA_DIST += \ $(libglnx_srcpath)/libglnx.m4 \ $(NULL) +BUILT_SOURCES += $(top_builddir)/libglnx-config.h +$(top_builddir)/libglnx-config.h: Makefile.am + echo '#include "config.h"' > $@ + libglnx_la_SOURCES = \ $(libglnx_srcpath)/glnx-macros.h \ $(libglnx_srcpath)/glnx-backport-autocleanups.h \ @@ -49,7 +53,7 @@ libglnx_la_SOURCES = \ $(libglnx_srcpath)/tests/libglnx-testlib.h \ $(NULL) -libglnx_la_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) +libglnx_la_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) -I$(builddir) libglnx_la_LDFLAGS = -avoid-version -Bsymbolic-functions -export-symbols-regex "^glnx_" -no-undefined -export-dynamic libglnx_la_LIBADD = $(libglnx_libs) diff --git a/glnx-backports.c b/glnx-backports.c index c7bb600..c016d37 100644 --- a/glnx-backports.c +++ b/glnx-backports.c @@ -18,7 +18,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include "glnx-backports.h" diff --git a/glnx-console.c b/glnx-console.c index 0a96cdc..adc8cd8 100644 --- a/glnx-console.c +++ b/glnx-console.c @@ -18,7 +18,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include "glnx-console.h" diff --git a/glnx-dirfd.c b/glnx-dirfd.c index 0a63bcb..041e1cf 100644 --- a/glnx-dirfd.c +++ b/glnx-dirfd.c @@ -18,7 +18,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include <string.h> diff --git a/glnx-errors.c b/glnx-errors.c index f350f30..52a6161 100644 --- a/glnx-errors.c +++ b/glnx-errors.c @@ -18,7 +18,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include <glnx-backport-autocleanups.h> #include <glnx-errors.h> diff --git a/glnx-fdio.c b/glnx-fdio.c index c6d130b..b7ddffd 100644 --- a/glnx-fdio.c +++ b/glnx-fdio.c @@ -21,7 +21,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include <string.h> #include <stdio.h> @@ -831,7 +831,7 @@ glnx_regfile_copy_bytes (int fdf, int fdt, off_t max_bytes) have_cfr = 0; try_cfr = false; } - else if (G_IN_SET (errno, EXDEV, EOPNOTSUPP)) + else if (G_IN_SET (errno, EXDEV, EINVAL, EOPNOTSUPP)) /* We won't try cfr again for this run, but let's be * conservative and not mark it as available/unavailable until * we know for sure. diff --git a/glnx-local-alloc.c b/glnx-local-alloc.c index 692f0de..58776b9 100644 --- a/glnx-local-alloc.c +++ b/glnx-local-alloc.c @@ -18,7 +18,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include "glnx-local-alloc.h" diff --git a/glnx-lockfile.c b/glnx-lockfile.c index f1d52de..4f7e8c7 100644 --- a/glnx-lockfile.c +++ b/glnx-lockfile.c @@ -22,7 +22,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "config.h" +#include "libglnx-config.h" #include <stdlib.h> #include <stdbool.h> diff --git a/glnx-lockfile.h b/glnx-lockfile.h index b346508..0adfeac 100644 --- a/glnx-lockfile.h +++ b/glnx-lockfile.h @@ -22,8 +22,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "config.h" - #include "glnx-backport-autoptr.h" typedef struct GLnxLockFile { diff --git a/glnx-missing-syscall.h b/glnx-missing-syscall.h index 4876ca3..0b617bd 100644 --- a/glnx-missing-syscall.h +++ b/glnx-missing-syscall.h @@ -30,7 +30,7 @@ Add abstraction model for BPF programs */ -#include "config.h" +#include "libglnx-config.h" #if !HAVE_DECL_RENAMEAT2 # ifndef __NR_renameat2 diff --git a/glnx-shutil.c b/glnx-shutil.c index 78042fe..8aa4f21 100644 --- a/glnx-shutil.c +++ b/glnx-shutil.c @@ -18,7 +18,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include <string.h> diff --git a/glnx-xattrs.c b/glnx-xattrs.c index 785ad0e..1e89bf0 100644 --- a/glnx-xattrs.c +++ b/glnx-xattrs.c @@ -18,7 +18,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include <string.h> #include <stdio.h> diff --git a/meson.build b/meson.build index 74ee36a..c42cfed 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,12 @@ -project('libglnx', 'c') +project( + 'libglnx', + 'c', + default_options : [ + 'c_std=gnu99', + ], +) add_project_arguments('-D_GNU_SOURCE', language: 'c') -add_project_arguments('-std=gnu99', language: 'c') add_project_arguments('-Wno-unused-local-typedefs', language: 'c') cc = meson.get_compiler('c') @@ -35,7 +40,7 @@ foreach check_function : check_functions conf.set10('HAVE_DECL_' + check_function.underscorify().to_upper(), have_it) endforeach config_h = configure_file( - output : 'config.h', + output : 'libglnx-config.h', configuration : conf, ) diff --git a/tests/libglnx-testlib.c b/tests/libglnx-testlib.c index 869d144..879b876 100644 --- a/tests/libglnx-testlib.c +++ b/tests/libglnx-testlib.c @@ -18,7 +18,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include "libglnx-testlib.h" #include <errno.h> diff --git a/tests/test-libglnx-errors.c b/tests/test-libglnx-errors.c index 4e91e02..9e8c1e3 100644 --- a/tests/test-libglnx-errors.c +++ b/tests/test-libglnx-errors.c @@ -18,7 +18,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include "libglnx.h" #include <glib.h> #include <stdlib.h> diff --git a/tests/test-libglnx-fdio.c b/tests/test-libglnx-fdio.c index be4448f..26c0fbc 100644 --- a/tests/test-libglnx-fdio.c +++ b/tests/test-libglnx-fdio.c @@ -18,7 +18,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include "libglnx.h" #include <glib.h> #include <stdlib.h> diff --git a/tests/test-libglnx-macros.c b/tests/test-libglnx-macros.c index ffde8fa..68dc5db 100644 --- a/tests/test-libglnx-macros.c +++ b/tests/test-libglnx-macros.c @@ -18,7 +18,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include "libglnx.h" #include <glib.h> #include <stdlib.h> diff --git a/tests/test-libglnx-shutil.c b/tests/test-libglnx-shutil.c index 6917b89..b4ee838 100644 --- a/tests/test-libglnx-shutil.c +++ b/tests/test-libglnx-shutil.c @@ -18,7 +18,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include "libglnx.h" #include <glib.h> #include <stdlib.h> diff --git a/tests/test-libglnx-xattrs.c b/tests/test-libglnx-xattrs.c index 82def4a..0789a2e 100644 --- a/tests/test-libglnx-xattrs.c +++ b/tests/test-libglnx-xattrs.c @@ -18,7 +18,7 @@ * Boston, MA 02111-1307, USA. */ -#include "config.h" +#include "libglnx-config.h" #include "libglnx.h" #include <glib.h> #include <stdlib.h> |