]> git.proxmox.com Git - mirror_lxcfs.git/commitdiff
tree-wide: set _GNU_SOURCE configure.ac
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 14 Oct 2021 15:04:14 +0000 (17:04 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 19 Oct 2021 13:39:50 +0000 (15:39 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
18 files changed:
configure.ac
src/bindings.c
src/cgroup_fuse.c
src/cgroups/cgfsng.c
src/cgroups/cgroup.c
src/cgroups/cgroup.h
src/cgroups/cgroup2_devices.c
src/cgroups/cgroup2_devices.h
src/cgroups/cgroup_utils.c
src/cgroups/cgroup_utils.h
src/cpuset_parse.c
src/cpuset_parse.h
src/proc_cpuview.c
src/proc_fuse.c
src/proc_loadavg.c
src/syscall_numbers.h
src/sysfs_fuse.c
src/utils.c

index 58be9d563f777d5a1e91b4a74c24fd3f3f0b05ab..7e2f2ccc26fe984946c76681bba6bd58523cce5d 100644 (file)
@@ -15,6 +15,7 @@ AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability subdir-objects])
 AC_CANONICAL_HOST
 AM_PROG_CC_C_O
 AC_USE_SYSTEM_EXTENSIONS
+AC_GNU_SOURCE
 
 # Test if we have a new enough compiler.
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
index dc4da14281ec69ef2eda8c03b3a9be093356534f..eb62ddbdbc656686aec33735056a4b131bd45c69 100644 (file)
@@ -1,9 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
 #include "config.h"
 
 #include <dirent.h>
index cfdf77013408dc14b7c8c2e5ecfc9202a21cff5b..5c22fd15d5c7f45cfdee3bc02f7cde8ae0c5e183 100644 (file)
@@ -1,12 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
 #include "config.h"
 
-#define __STDC_FORMAT_MACROS
 #include <dirent.h>
 #include <errno.h>
 #include <fcntl.h>
index 510fe0b04b0a42530e3f8ef01796d97c17921c99..3eb4227b6a9581753e0d14283a2e79d0b6adf357 100644 (file)
  * a comma-separated list of controllers.
  */
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
 #include "config.h"
 
 #include <ctype.h>
index 7aec7aed6a290179dba4fa89a79bd6bb43047a4a..5bf7f62daced53773203615efb004d154bd1dd88 100644 (file)
@@ -1,9 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
 #include "config.h"
 
 #include <dirent.h>
index d92e6199670d26af567faae38caa2be298acd3cc..2c8cca31a6b4e5c73881924e2913cb638d02767e 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __LXC_CGROUP_H
 #define __LXC_CGROUP_H
 
-#include "../config.h"
+#include "config.h"
 
 #include <errno.h>
 #include <stdbool.h>
index 06d258fa15eb32fdae226add2867b11a7f993be7..e2eab796a0465c85267674575683bc42a694d291 100644 (file)
@@ -2,10 +2,6 @@
 
 /* Parts of this taken from systemd's implementation. */
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
 #include "config.h"
 
 #include <errno.h>
index 7207b39bd57ebc35fed3e79ad7a9bac48e4791d6..6de10216ea857d08858c73a0a5a25864f140aecc 100644 (file)
@@ -5,7 +5,7 @@
 #ifndef __LXC_CGROUP2_DEVICES_H
 #define __LXC_CGROUP2_DEVICES_H
 
-#include "../config.h"
+#include "config.h"
 
 #include <errno.h>
 #include <fcntl.h>
index f4ae4ccf93849c5cb2a3f72010be9be682b10aad..83e4cbf7fa4b4f6b56f5a6d85a1e8f6bce447c6e 100644 (file)
@@ -1,9 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
 #include "config.h"
 
 #include <fcntl.h>
index 5166b7874f05a3f37eea5f99d0000d5801ef375f..f4316866fc7e31067213383f7c4e4f49d20ae2af 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __LXC_CGROUP_UTILS_H
 #define __LXC_CGROUP_UTILS_H
 
-#include "../config.h"
+#include "config.h"
 
 #include <fcntl.h>
 #include <stdarg.h>
index c2edbc0457b80aff4a1d433586e7409eb4e1eebc..e511bb021745c78837dfef4eb34646f3571a8a58 100644 (file)
@@ -1,15 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
 #include "config.h"
 
-#define _FILE_OFFSET_BITS 64
-
-#define __STDC_FORMAT_MACROS
-
 #include <stdio.h>
 #include <string.h>
 #include <stdbool.h>
index 5ff8e668bdd414957eb1c1d5bfbd567fa665bdfa..332434577398f8804eceea8d88382c40fb5c3327 100644 (file)
@@ -3,11 +3,7 @@
 #ifndef __LXCFS_CPUSET_PARSE_H
 #define __LXCFS_CPUSET_PARSE_H
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#define _FILE_OFFSET_BITS 64
+#include "config.h"
 
 #include <stdbool.h>
 #include <stdio.h>
index 91fcef2143e79c7c6eb0fe3347ddcf4e6133d55a..9f6a55e2a52511c8f97184fdada64aaa55b9d01f 100644 (file)
@@ -1,12 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
 #include "config.h"
 
-#define __STDC_FORMAT_MACROS
 #include <dirent.h>
 #include <errno.h>
 #include <fcntl.h>
index fef86b50aaee9a895793d3ef003c1be7b5e82cdd..94168c90718291f598d8537b3864a85bf660f6f8 100644 (file)
@@ -1,12 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
 #include "config.h"
 
-#define __STDC_FORMAT_MACROS
 #include <dirent.h>
 #include <errno.h>
 #include <fcntl.h>
index b70437a930239739c29a4659b3fa5079ba329005..5f9bec7920548330b6b975f79413b03519179b5f 100644 (file)
@@ -1,12 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
 #include "config.h"
 
-#define __STDC_FORMAT_MACROS
 #include <dirent.h>
 #include <errno.h>
 #include <fcntl.h>
index 41eb5dcc730e99f3c31b1bd0f22dc5fb39405539..c9006af3bd6e77e28a2b3601aabab3d2b0a3b73c 100644 (file)
@@ -2,9 +2,8 @@
 #ifndef __LXCFS_SYSCALL_NUMBERS_H
 #define __LXCFS_SYSCALL_NUMBERS_H
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
+#include "config.h"
+
 #include <asm/unistd.h>
 #include <errno.h>
 #include <sched.h>
index 851e36b7eabada4d212f6d4ec033579a86a181e5..e65d411fa22f47a270b75b71241ce9dcf5dcb520 100644 (file)
@@ -1,12 +1,8 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
 #include "config.h"
 
-#define __STDC_FORMAT_MACROS
+#include <ctype.h>
 #include <dirent.h>
 #include <errno.h>
 #include <fcntl.h>
index 99271854ebb8ee23e1d592b50bfd4f26fe753334..b826b2ef20c172934c1d5cc5a3c0afb2e4f84000 100644 (file)
@@ -1,12 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
 #include "config.h"
 
-#define _FILE_OFFSET_BITS 64
 #include <ctype.h>
 #include <errno.h>
 #include <fcntl.h>