chiark / gitweb /
Fixes for Cygwin.
authormdw <mdw>
Thu, 15 Sep 2005 00:49:46 +0000 (00:49 +0000)
committermdw <mdw>
Thu, 15 Sep 2005 00:49:46 +0000 (00:49 +0000)
Makefile.am
unihash-check.pl

index e5c1f1fe7929963698ba9b730043a595d020cc55..aa3aa1d74f7df626379ec2cdfe23c3be9d13bbca 100644 (file)
@@ -89,9 +89,11 @@ unihash-global.c: unihash-mkstatic$(EXEEXT)
 crc_mktab_SOURCES = \
        crc-mktab.c \
        mdwopt.c quis.c pquis.c report.c str.c
 crc_mktab_SOURCES = \
        crc-mktab.c \
        mdwopt.c quis.c pquis.c report.c str.c
+crc_mktab_CFLAGS = $(AM_CFLAGS)
 unihash_mkstatic_SOURCES = \
        unihash-mkstatic.c \
        mdwopt.c quis.c pquis.c report.c str.c unihash.c
 unihash_mkstatic_SOURCES = \
        unihash-mkstatic.c \
        mdwopt.c quis.c pquis.c report.c str.c unihash.c
+unihash_mkstatic_CFLAGS = $(AM_CFLAGS)
 
 ## --- Test code ---
 
 
 ## --- Test code ---
 
@@ -215,11 +217,8 @@ TEST_DIST = \
 ## I must (a) build the standalone version, and (b) inform the client library
 ## where the standalone version is.
 
 ## I must (a) build the standalone version, and (b) inform the client library
 ## where the standalone version is.
 
-bres$(EXEEXT): bres-stnd.o
-       $(LINK) -o bres bres-stnd.o $(LIBS)
-
-bres-stnd.o: $(srcdir)/bres.c
-       $(COMPILE) -c -DBRES_STANDALONE -o bres-stnd.o $(srcdir)/bres.c
+bres_SOURCES = bres.c
+bres_CFLAGS = -DBRES_STANDALONE
 
 bres.lo: $(srcdir)/bres.c
        $(LTCOMPILE) -c -DBRES_SERVER="\"$(libexecdir)/$(PACKAGE)/`echo bres|sed '$(transform)'`\"" $(srcdir)/bres.c
 
 bres.lo: $(srcdir)/bres.c
        $(LTCOMPILE) -c -DBRES_SERVER="\"$(libexecdir)/$(PACKAGE)/`echo bres|sed '$(transform)'`\"" $(srcdir)/bres.c
index 72c3b9b84da0e97a8a1e7888b7ea5196ca8a6ba1..f7041f8f1e4f4ebbfc151d7f26ec8ef724ce6146 100644 (file)
@@ -8,7 +8,7 @@ sub gfmul {
 
   while ($y) {
     if ($y & 1) { $a ^= $x };
 
   while ($y) {
     if ($y & 1) { $a ^= $x };
-    if ($x & 0x80000000) { $x <<= 1; $x ^= $MOD; }
+    if ($x & 0x80000000) { $x <<= 1; $x &= 0xffffffff; $x ^= $MOD; }
     else { $x <<= 1; }
     $y >>= 1;
   }
     else { $x <<= 1; }
     $y >>= 1;
   }