summary refs log tree commit diff
path: root/Src/Modules/system.mdd
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 /Src/Modules/system.mdd
parent2d5dd747324b130e8aeea6fa9c274ead18b62ef6 (diff)
downloadzsh-8d188728171dfe764562b7d4e81fbfdc212897e4.tar.gz
zsh-8d188728171dfe764562b7d4e81fbfdc212897e4.tar.xz
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.
Diffstat (limited to 'Src/Modules/system.mdd')
-rw-r--r--Src/Modules/system.mdd7
1 files changed, 6 insertions, 1 deletions
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