conf.set10('HAVE_' + ident[0].to_upper(), have)
endforeach
+conf.set('_GNU_SOURCE', true)
conf.set('_FILE_OFFSET_BITS', 64)
libfuse = dependency('fuse3', required : false)
/* SPDX-License-Identifier: LGPL-2.1+ */
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
#include "config.h"
#include <dirent.h>
/* 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>
* a comma-separated list of controllers.
*/
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
#include "config.h"
#include <ctype.h>
/* SPDX-License-Identifier: LGPL-2.1+ */
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
#include "config.h"
#include <dirent.h>
#ifndef __LXC_CGROUP_H
#define __LXC_CGROUP_H
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 26
-#endif
-
-#define _FILE_OFFSET_BITS 64
+#include "config.h"
#include <errno.h>
#include <stdbool.h>
#include <stddef.h>
#include <sys/types.h>
-#include "../config.h"
#include "../macro.h"
#include "../memory_utils.h"
/* Parts of this taken from systemd's implementation. */
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
#include "config.h"
#include <errno.h>
#ifndef __LXC_CGROUP2_DEVICES_H
#define __LXC_CGROUP2_DEVICES_H
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 26
-#endif
-
-#define _FILE_OFFSET_BITS 64
+#include "config.h"
#include <errno.h>
#include <fcntl.h>
/* SPDX-License-Identifier: LGPL-2.1+ */
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
#include "config.h"
#include <fcntl.h>
#ifndef __LXC_CGROUP_UTILS_H
#define __LXC_CGROUP_UTILS_H
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 26
-#endif
-
-#define _FILE_OFFSET_BITS 64
+#include "config.h"
#include <fcntl.h>
#include <stdarg.h>
#include <sys/vfs.h>
#include <unistd.h>
-#include "../config.h"
#include "../macro.h"
#include "../memory_utils.h"
/* 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>
#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>
/* SPDX-License-Identifier: LGPL-2.1+ */
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
#include "config.h"
#include <alloca.h>
#ifndef __LXCFS_MACRO_H
#define __LXCFS_MACRO_H
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 26
-#endif
-
-#define _FILE_OFFSET_BITS 64
+#include "config.h"
#include <stdio.h>
-#include "config.h"
-
#define BATCH_SIZE 50
/* filesystem magic values */
/* 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>
/* 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>
/* 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>
#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>
/* SPDX-License-Identifier: LGPL-2.1+ */
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
#include "config.h"
-/* Taken over modified from the kernel sources. */
-#define NBITS 32 /* bits in uint32_t */
-#define DIV_ROUND_UP(n, d) (((n) + (d)-1) / (d))
-#define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, NBITS)
-
-#define __STDC_FORMAT_MACROS
#include <ctype.h>
#include <dirent.h>
#include <errno.h>
#include "lxcfs_fuse_compat.h"
#include "utils.h"
+/* Taken over modified from the kernel sources. */
+#define NBITS 32 /* bits in uint32_t */
+#define DIV_ROUND_UP(n, d) (((n) + (d)-1) / (d))
+#define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, NBITS)
+
static ssize_t get_max_cpus(char *cpulist)
{
char *c1, *c2;
/* 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>
/* SPDX-License-Identifier: LGPL-2.1+ */
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
#include "config.h"
#include <stdio.h>
/* SPDX-License-Identifier: LGPL-2.1+ */
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
#include "config.h"
#include <stdio.h>
/* SPDX-License-Identifier: LGPL-2.1+ */
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
#include "config.h"
#include <errno.h>