[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/pgtk 4c49ec7 3/3: Make PGTK's additions conditioinal
From: |
Yuuki Harano |
Subject: |
feature/pgtk 4c49ec7 3/3: Make PGTK's additions conditioinal |
Date: |
Mon, 16 Aug 2021 10:04:27 -0400 (EDT) |
branch: feature/pgtk
commit 4c49ec7f865bdad1629d2f125f71f4e506b258f2
Author: Yuuki Harano <masm+github@masm11.me>
Commit: Yuuki Harano <masm+github@masm11.me>
Make PGTK's additions conditioinal
* src/.gdbinit: Make them enclosed in condition.
* src/alloc.c: Define defined_HAVE_PGTK and make it externally visible.
---
src/.gdbinit | 8 ++++++--
src/alloc.c | 7 +++++++
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/.gdbinit b/src/.gdbinit
index 53e17df..68db1ff 100644
--- a/src/.gdbinit
+++ b/src/.gdbinit
@@ -42,7 +42,9 @@ handle SIGUSR2 noprint pass
handle SIGALRM ignore
# On selection send failed.
-handle SIGPIPE nostop noprint
+if defined_HAVE_PGTK
+ handle SIGPIPE nostop noprint
+end
# Use $bugfix so that the value isn't a constant.
# Using a constant runs into GDB bugs sometimes.
@@ -1227,7 +1229,9 @@ set print pretty on
set print sevenbit-strings
show environment DISPLAY
-show environment WAYLAND_DISPLAY
+if defined_HAVE_PGTK
+ show environment WAYLAND_DISPLAY
+end
show environment TERM
# When debugging, it is handy to be able to "return" from
diff --git a/src/alloc.c b/src/alloc.c
index a17488e..ff3670e 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -7709,6 +7709,12 @@ enum defined_HAVE_X_WINDOWS { defined_HAVE_X_WINDOWS =
true };
enum defined_HAVE_X_WINDOWS { defined_HAVE_X_WINDOWS = false };
#endif
+#ifdef HAVE_PGTK
+enum defined_HAVE_PGTK { defined_HAVE_PGTK = true };
+#else
+enum defined_HAVE_PGTK { defined_HAVE_PGTK = false };
+#endif
+
/* When compiled with GCC, GDB might say "No enum type named
pvec_type" if we don't have at least one symbol with that type, and
then xbacktrace could fail. Similarly for the other enums and
@@ -7728,5 +7734,6 @@ union
enum More_Lisp_Bits More_Lisp_Bits;
enum pvec_type pvec_type;
enum defined_HAVE_X_WINDOWS defined_HAVE_X_WINDOWS;
+ enum defined_HAVE_PGTK defined_HAVE_PGTK;
} const EXTERNALLY_VISIBLE gdb_make_enums_visible = {0};
#endif /* __GNUC__ */