diff 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 diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/win32/7zip/7z/C/RotateDefs.h	Sat Mar 03 10:31:27 2012 -0600
     1.3 @@ -0,0 +1,22 @@
     1.4 +/* RotateDefs.h -- Rotate functions
     1.5 +2008-08-05
     1.6 +Igor Pavlov
     1.7 +Public domain */
     1.8 +
     1.9 +#ifndef __ROTATEDEFS_H
    1.10 +#define __ROTATEDEFS_H
    1.11 +
    1.12 +#ifdef _MSC_VER
    1.13 +
    1.14 +#include <stdlib.h>
    1.15 +#define rotlFixed(x, n) _rotl((x), (n))
    1.16 +#define rotrFixed(x, n) _rotr((x), (n))
    1.17 +
    1.18 +#else
    1.19 +
    1.20 +#define rotlFixed(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
    1.21 +#define rotrFixed(x, n) (((x) >> (n)) | ((x) << (32 - (n))))
    1.22 +
    1.23 +#endif
    1.24 +
    1.25 +#endif