Mail Archives: cygwin/2001/12/30/07:33:02
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/
- Raw text -