summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2016-09-07 11:47:23 +0100
committerPeter Stephenson <pws@zsh.org>2016-09-07 11:50:00 +0100
commit8d188728171dfe764562b7d4e81fbfdc212897e4 (patch)
tree3e1d8a55ee662f10f078d9737136c58f34e79409
parent2d5dd747324b130e8aeea6fa9c274ead18b62ef6 (diff)
downloadzsh-8d188728171dfe764562b7d4e81fbfdc212897e4.tar.gz
zsh-8d188728171dfe764562b7d4e81fbfdc212897e4.zip
39217: fix error name generation with GCC.
Adapt the same trick as in zsh.mdd to ensure we don't get preprocessor lines in the output.
-rw-r--r--ChangeLog5
-rw-r--r--Src/Modules/system.mdd7
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e2d9d351b..fbff070d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-09-07 Peter Stephenson <p.stephenson@samsung.com>
+
+ * 39217: Src/Modules/system.mdd: adapt zsh.mdd to avoid problems
+ with GCC preprocessor in error names.
+
2016-09-06 Barton E. Schaefer <schaefer@zsh.org>
* m0viefreak: 38153 (cf. 39135): Completion/Base/Utility/_arguments:
diff --git a/Src/Modules/system.mdd b/Src/Modules/system.mdd
index eed0c1b9d..00a3e7896 100644
--- a/Src/Modules/system.mdd
+++ b/Src/Modules/system.mdd
@@ -15,7 +15,12 @@ errnames.c: errnames1.awk errnames2.awk $(dir_top)/config.h @ERRNO_H@
touch errtmp.out; \
else \
$(AWK) -f $(sdir)/errnames1.awk @ERRNO_H@ >errtmp.c; \
- $(CPP) errtmp.c >errtmp.out; \
+ case "`$(CPP) --version </dev/null 2>&1`" in \
+ *"Free Software Foundation"*) \
+ $(CPP) -P errtmp.c >errtmp.out;; \
+ *) \
+ $(CPP) errtmp.c >errtmp.out;; \
+ esac; \
fi
$(AWK) -f $(sdir)/errnames2.awk errtmp.out > $@
rm -f errtmp.c errtmp.out