+2008-09-01  Simon Josefsson  <simon@josefsson.org>
+
+       * modules/bitrotate (configure.ac): Need
+       AC_REQUIRE([AC_C_INLINE]).
+       (Description): Mention stdint.h.  Reported by Bruno Haible
+       <bruno@clisp.org>.
+
+       * lib/bitrotate.h (rotr16, rotl16): Fix mask value.  Reported by
+       Paolo Bonzini <bonzini@gnu.org>.
+
 2008-08-31  Bruno Haible  <bruno@clisp.org>
 
        Assume Solaris specific bi-arch conventions on Solaris systems.
 
 static inline uint16_t
 rotl16 (uint16_t x, int n)
 {
-  return ((x << n) | (x >> (16 - n))) & 0xFFFFFFFF;
+  return ((x << n) | (x >> (16 - n))) & 0xFFFF;
 }
 
 /* Given an unsigned 16-bit argument X, return the value corresponding
 static inline uint16_t
 rotr16 (uint16_t x, int n)
 {
-  return ((x >> n) | (x << (16 - n))) & 0xFFFFFFFF;
+  return ((x >> n) | (x << (16 - n))) & 0xFFFF;
 }
 
 #endif /* _GL_BITROTATE_H */
 
 Description:
-Rotate bits in 16 and 32 bit integers.
+Rotate bits in 16 and 32 bit integers using stdint.h.
 
 Files:
 lib/bitrotate.h
 Depends-on:
 
 configure.ac:
+AC_REQUIRE([AC_C_INLINE])
 
 Makefile.am:
 lib_SOURCES += bitrotate.h