OSDN Git Service

* cygmagic: Attempt to figure out if sum takes an option.
authorcgf <cgf>
Tue, 22 Jan 2002 03:01:59 +0000 (03:01 +0000)
committercgf <cgf>
Tue, 22 Jan 2002 03:01:59 +0000 (03:01 +0000)
winsup/cygwin/ChangeLog
winsup/cygwin/cygmagic

index 156e975..654ee88 100644 (file)
@@ -1,3 +1,7 @@
+2002-01-21  Christopher Faylor  <cgf@redhat.com>
+
+       * cygmagic: Attempt to figure out if sum takes an option.
+
 2002-01-21  DJ Delorie  <dj@redhat.com>
 
        * Makefile.in (libpthread.a): Pass the assembler also.
index 87e571d..1605362 100755 (executable)
@@ -17,10 +17,16 @@ cat <<EOF > $file_magic
 /* autogenerated - do not edit */
 #include "$file"
 EOF
+if sum -r /dev/null; then
+  sumit(){ sum -r $*; }
+else
+  sumit(){ sum $*; }
+fi
+
 while [ -n "$1" ]; do
     define=$1; shift
     struct=$1; shift
-    sum=`$gcc -E $file | sed -n "/^$struct/,/^};/p" | sed -e 's/[      ]//g' -e '/^$/d' | sum | awk '{printf "0x%x", $1}'`
+    sum=`$gcc -E $file | sed -n "/^$struct/,/^};/p" | sed -e 's/[      ]//g' -e '/^$/d' | sumit | awk '{printf "0x%x", $1}'`
     echo "#define $define $sum"
     curr=`sed -n "s/^#[        ]*define CURR_$define[  ][      ]*\([^  ][^     ]*\)/\1/p" $file`
     [ "$curr" != "$sum" ] && echo "*** WARNING WARNING WARNING WARNING WARNING ***