view src/win32/7zip/7z/C/RotateDefs.h @ 1:f9f4f1b99eed

importing src directory
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 10:31:27 -0600
parents
children
line wrap: on
line source
1 /* RotateDefs.h -- Rotate functions
2 2008-08-05
3 Igor Pavlov
4 Public domain */
6 #ifndef __ROTATEDEFS_H
7 #define __ROTATEDEFS_H
9 #ifdef _MSC_VER
11 #include <stdlib.h>
12 #define rotlFixed(x, n) _rotl((x), (n))
13 #define rotrFixed(x, n) _rotr((x), (n))
15 #else
17 #define rotlFixed(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
18 #define rotrFixed(x, n) (((x) >> (n)) | ((x) << (32 - (n))))
20 #endif
22 #endif