Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Ralf Habacker" To: "Cygwin" Subject: note on cygmagic Date: Sun, 30 Dec 2001 13:29:07 +0100 Message-ID: <004001c1912d$93480110$0e6307d5@BRAMSCHE> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Hi, I tried to build a fresh cygwin dll and recognized that the tool "bc" seems newly be used in a helper script named cygmagic. One can say, please install it, but another way could be to minimize the needed helper packages. So this is a note for doing the second. I found the following line in src/winsup/cygwin/cygmagic awk '{print "obase=16;\"0x\";", $1}' | bc another possibility without "bc" seems to me like this awk '{printf("0x%x",$1) }' So if someone means, that this is a good note, please use it, otherwise forget it. $ diff -ubBp cygmagic.orig cygmagic --- cygmagic.orig Sat Dec 29 13:49:58 2001 +++ cygmagic Sat Dec 29 13:50:12 2001 @@ -10,7 +10,7 @@ EOF 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 '{print "obase=16;\"0x\";", $ 1}' | bc | tr '[A-Z]' '[a-z]'` + sum=`$gcc -E $file | sed -n "/^$struct/,/^};/p" | sed -e 's/[ ]//g' -e '/^$/d' | sum | awk '{printf("0x%x",$1) }' | tr ' [A-Z]' '[a-z]'` echo "#define $define $sum" curr=`sed -n "s/^#[ ]*define CURR_$define[ ][ ]*\([^ ][^ ]*\)/\1/p" $file` [ "$curr" = "$sum" ] || echo "*** WARNING WARNING WARNING WARNING WARNING *** Ralf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/