summaryrefslogtreecommitdiffstats
path: root/0004-cygwin-work-around-GCC-5-preprocessor-changes.patch
diff options
context:
space:
mode:
Diffstat (limited to '0004-cygwin-work-around-GCC-5-preprocessor-changes.patch')
-rw-r--r--0004-cygwin-work-around-GCC-5-preprocessor-changes.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/0004-cygwin-work-around-GCC-5-preprocessor-changes.patch b/0004-cygwin-work-around-GCC-5-preprocessor-changes.patch
new file mode 100644
index 0000000..691d997
--- /dev/null
+++ b/0004-cygwin-work-around-GCC-5-preprocessor-changes.patch
@@ -0,0 +1,32 @@
+From ef64aa4940e1d9120875a74f37b8419680f535e3 Mon Sep 17 00:00:00 2001
+From: Yaakov Selkowitz <yselkowi@redhat.com>
+Date: Fri, 12 Feb 2016 16:02:13 -0600
+Subject: [PATCH 4/4] cygwin: work around GCC 5 preprocessor changes
+
+GCC 5 adds #line directives (and hence extra newlines) for macros
+expansions, which confuses cygmagic. Using the -P flag avoids
+them entirely.
+
+https://cygwin.com/ml/cygwin-patches/2016-q1/msg00016.html
+
+Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
+---
+ winsup/cygwin/cygmagic | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/winsup/cygwin/cygmagic b/winsup/cygwin/cygmagic
+index b945291..036c79c 100755
+--- a/winsup/cygwin/cygmagic
++++ b/winsup/cygwin/cygmagic
+@@ -24,7 +24,7 @@ sumit() {
+ while [ -n "$1" ]; do
+ define=$1; shift
+ struct=$1; shift
+- sum=`$gcc -D__CYGMAGIC__ -E $file | sed -n "/^$struct/,/^};/p" | sed -e 's/[ ]//g' -e '/^$/d' | sumit | awk '{printf "0x%xU", $1}'`
++ sum=`$gcc -D__CYGMAGIC__ -E -P $file | sed -n "/^$struct/,/^};/p" | sed -e 's/[ ]//g' -e '/^$/d' | sumit | awk '{printf "0x%xU", $1}'`
+ echo "#define $define $sum"
+ curr=`sed -n "s/^#[ ]*define CURR_$define[ ][ ]*\([^ ][^ ]*\)/\1/p" $file`
+ [ "$curr" != "$sum" ] && echo "*** WARNING WARNING WARNING WARNING WARNING ***
+--
+2.7.4
+