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([[
/* 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
-#include "../config.h"
+#include "config.h"
#include <errno.h>
#include <stdbool.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
-#include "../config.h"
+#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
-#include "../config.h"
+#include "config.h"
#include <fcntl.h>
#include <stdarg.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"
-#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"
-#define __STDC_FORMAT_MACROS
+#include <ctype.h>
#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 _FILE_OFFSET_BITS 64
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>