Merge branch 'feature-flags' into 'master'

Fix feature test macros when used as a subproject

See merge request GNOME/sysprof!32
This commit is contained in:
Christian Hergert
2020-07-06 13:42:58 +00:00
11 changed files with 6 additions and 31 deletions

View File

@ -87,7 +87,10 @@ add_project_arguments([
'-I' + meson.build_root(), # config.h
], language: 'c')
global_c_args = []
global_c_args = [
'-D_GNU_SOURCE',
'-D_POSIX_C_SOURCE=200809L',
]
test_c_args = [
'-Wcast-align',
'-Wdeclaration-after-statement',

View File

@ -56,10 +56,6 @@
#include "config.h"
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
#include <assert.h>
#include <endian.h>
#include <errno.h>

View File

@ -54,10 +54,6 @@
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
#include <assert.h>
#include <errno.h>
#include <poll.h>

View File

@ -59,6 +59,8 @@
#pragma once
#include <string.h>
#define sysprof_assert_not_reached() assert (false)
#define SYSPROF_N_ELEMENTS(a) (sizeof (a) / sizeof (*a))

View File

@ -18,10 +18,6 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
#define G_LOG_DOMAIN "sysprof-details-page"
#include "config.h"

View File

@ -20,10 +20,6 @@
#define G_LOG_DOMAIN "sysprof-profiler-assistant"
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
#include "config.h"
#include <sysprof.h>

View File

@ -20,10 +20,6 @@
#pragma once
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
#ifdef HAVE_EXECINFO_H
# include <execinfo.h>
#endif

View File

@ -18,8 +18,6 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#define _GNU_SOURCE
#include "config.h"
#include <dlfcn.h>

View File

@ -18,8 +18,6 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#define _GNU_SOURCE
#include "config.h"
#include <dlfcn.h>

View File

@ -22,10 +22,6 @@
#include "config.h"
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
#include <errno.h>
#include <string.h>
#include <stdio.h>

View File

@ -18,8 +18,6 @@
* SPDX-License-ntifier: GPL-3.0-or-later
*/
#define _GNU_SOURCE
#include "sysprof-turbostat.h"
#include <errno.h>