From 833630979404faae2bd99c59e4e5739e675917f0 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sat, 1 May 2021 16:55:38 +0100 Subject: meson: Define HAVE_CONFIG_H as a project flag Precisely what Autotools does, instead of adding it as per-target C argument. Once we remove HAVE_CONFIG_H checks in every source file, we'll be able to drop it. --- boilerplate/meson.build | 2 -- 1 file changed, 2 deletions(-) (limited to 'boilerplate') diff --git a/boilerplate/meson.build b/boilerplate/meson.build index 79d1eeea4..0216b7a6c 100644 --- a/boilerplate/meson.build +++ b/boilerplate/meson.build @@ -35,8 +35,6 @@ cairo_boilerplate_constructors = custom_target('cairo-boilerplate-constructors.c command: [python3, files('make-cairo-boilerplate-constructors.py')[0], '@OUTPUT@', '@INPUT@']) libcairoboilerplate = static_library('cairoboilerplate', cairo_boilerplate_sources + [cairo_boilerplate_constructors], - c_args: ['-DHAVE_CONFIG_H'], - cpp_args: ['-DHAVE_CONFIG_H'], include_directories: [incbase, incsrc], dependencies: deps, link_with: [libcairo], -- cgit v1.2.1 From bfd1602db9fd0d23074ef4d1628de66d70241c3b Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sat, 1 May 2021 16:58:15 +0100 Subject: Remove stray _GNU_SOURCE definitions We define _GNU_SOURCE globally in both the Autotools build, through the use of the AC_USE_SYSTEM_EXTENSIONS macro; and in the Meson build, with add_project_arguments(). --- boilerplate/cairo-boilerplate-system.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'boilerplate') diff --git a/boilerplate/cairo-boilerplate-system.c b/boilerplate/cairo-boilerplate-system.c index ec23341a4..e9bcd78c5 100644 --- a/boilerplate/cairo-boilerplate-system.c +++ b/boilerplate/cairo-boilerplate-system.c @@ -23,8 +23,6 @@ * Author: Carl D. Worth */ -#define _GNU_SOURCE 1 /* for vasprintf */ - #include "cairo-boilerplate.h" #include "cairo-boilerplate-system.h" -- cgit v1.2.1 From bd138412579e9a7c251ea8f2f1bb2cdb3d0bf95b Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sat, 1 May 2021 17:05:29 +0100 Subject: Drop the conditional inclusion of config.h We *always* generate this file, and we depend on its existence. The idea behind HAVE_CONFIG_H was being able to include random files from different projects, back in a time where "libraries" were literally just random files instead of actual shared objects. Since we're not in the '80s any more, and our build system(s) define HAVE_CONFIG_H *and* generate the config.h header file, we don't need a conditional guard around its inclusion. --- boilerplate/cairo-boilerplate.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'boilerplate') diff --git a/boilerplate/cairo-boilerplate.h b/boilerplate/cairo-boilerplate.h index 515bb03bc..544d38816 100644 --- a/boilerplate/cairo-boilerplate.h +++ b/boilerplate/cairo-boilerplate.h @@ -26,9 +26,7 @@ #ifndef _CAIRO_BOILERPLATE_H_ #define _CAIRO_BOILERPLATE_H_ -#if HAVE_CONFIG_H #include "config.h" -#endif #include #include -- cgit v1.2.1