]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/lib.h
UCW docs: split definitions off the main index
[libucw.git] / ucw / lib.h
index c473343ce5338af7466ca703c81ad63b091db098..e4352ee85d9e7a675262e839b15302a1e164b0c7 100644 (file)
--- a/ucw/lib.h
+++ b/ucw/lib.h
@@ -43,7 +43,8 @@
 #define COMPARE_LT(x,y) do { if ((x)<(y)) return 1; if ((x)>(y)) return 0; } while(0)
 #define COMPARE_GT(x,y) COMPARE_LT(y,x)
 
-#define        ROL(x, bits) (((x) << (bits)) | ((x) >> (sizeof(uns)*8 - (bits))))      /* Bitwise rotation of an uns to the left */
+#define        ROL(x, bits) (((x) << (bits)) | ((uns)(x) >> (sizeof(uns)*8 - (bits)))) /* Bitwise rotation of an uns to the left */
+#define        ROR(x, bits) (((uns)(x) >> (bits)) | ((x) << (sizeof(uns)*8 - (bits))))
 
 /* GCC Extensions */