Files
easy7zip/C/RotateDefs.h
Igor Pavlov 3901bf0ab8 4.58 beta
2016-05-28 00:15:55 +01:00

23 lines
389 B
C
Executable File

/* RotateDefs.h -- Rotate functions
2008-03-24
Igor Pavlov
Public domain */
#ifndef __ROTATEDEFS_H
#define __ROTATEDEFS_H
#ifdef _MSC_VER
#include <stdlib.h>
#define rotlFixed(x, n) _rotl((x), (n))
#define rotrFixed(x, n) _rotr((x), (n))
#else
#define rotlFixed(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
#define rotrFixed(x, n) (((x) >> (n)) | ((x) << (32 - (n))))
#endif
#endif