]> sourceware.org Git - newlib-cygwin.git/commitdiff
cygwin: work around GCC 5 preprocessor changes
authorYaakov Selkowitz <yselkowi@redhat.com>
Fri, 12 Feb 2016 22:02:13 +0000 (16:02 -0600)
committerCorinna Vinschen <corinna@vinschen.de>
Sat, 13 Feb 2016 14:59:55 +0000 (15:59 +0100)
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

index b9452910930f70ea292bdbb2de3f2fd53015d330..036c79c11bdb49aad636e62fbfad8edcb50b1d2e 100755 (executable)
@@ -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 ***
This page took 0.037074 seconds and 5 git commands to generate.