[gjs/master.msvc: 8/8] gjs_pch.hh: Include alloca.h and syscall.h in profiler builds
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/master.msvc: 8/8] gjs_pch.hh: Include alloca.h and syscall.h in profiler builds
- Date: Mon, 12 Jul 2021 02:34:49 +0000 (UTC)
commit 67dae676c1c08fcab49b854f4d9aeaa469ddac39
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon Jul 12 10:33:40 2021 +0800
gjs_pch.hh: Include alloca.h and syscall.h in profiler builds
These headers are used only when the profiler is enabled. Also drop the
check in meson.build for these headers.
gjs/gjs_pch.hh | 8 ++------
meson.build | 2 --
2 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/gjs/gjs_pch.hh b/gjs/gjs_pch.hh
index 907a9c1a..aa5a736b 100644
--- a/gjs/gjs_pch.hh
+++ b/gjs/gjs_pch.hh
@@ -28,9 +28,6 @@
#include <utility>
#include <vector>
-#ifdef HAVE_ALLOCA_H
-#include <alloca.h>
-#endif
#include <assert.h>
#include <ctype.h>
#include <errno.h>
@@ -123,10 +120,9 @@
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
-#ifdef HAVE_SYSCALL_H
-#include <syscall.h>
-#endif
#ifdef ENABLE_PROFILER
+#include <alloca.h>
+#include <syscall.h>
#include <sysprof-capture.h>
#endif
#ifdef HAVE_UNISTD_H
diff --git a/meson.build b/meson.build
index c09fe1e2..b866bfeb 100644
--- a/meson.build
+++ b/meson.build
@@ -305,8 +305,6 @@ if build_readline
required: readline.found()))
endif
header_conf.set('USE_UNITY_BUILD', get_option('unity'))
-header_conf.set('HAVE_ALLOCA_H', cxx.check_header('alloca.h'))
-header_conf.set('HAVE_SYSCALL_H', cxx.check_header('syscall.h'))
header_conf.set('HAVE_SYS_SYSCALL_H', cxx.check_header('sys/syscall.h'))
header_conf.set('HAVE_UNISTD_H', cxx.check_header('unistd.h'))
header_conf.set('HAVE_SIGNAL_H', cxx.check_header('signal.h',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]