X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fed25519%2Ffixedint.h;h=41cdda4ff805b15b6b51c80de73bdbb5e082ab7c;hb=c789d94e0508c8d61219b2b042954209166b84a1;hp=af031e9a8997c4bccb2725149dc0b7d84017a0ca;hpb=f6e87ab476a0faf8b124ecaaa27f967d825e6457;p=tinc diff --git a/src/ed25519/fixedint.h b/src/ed25519/fixedint.h index af031e9a..41cdda4f 100644 --- a/src/ed25519/fixedint.h +++ b/src/ed25519/fixedint.h @@ -7,7 +7,7 @@ Not a compatible replacement for , do not blindly use it as such. */ -#if ((defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L) || (defined(__WATCOMC__) && (defined(_STDINT_H_INCLUDED) || __WATCOMC__ >= 1250)) || (defined(__GNUC__) && (defined(_STDINT_H) || defined(_STDINT_H_) || defined(__UINT_FAST64_TYPE__)) )) && !defined(FIXEDINT_H_INCLUDED) +#if ((defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L) || (defined(_MSC_VER) && _MSC_VER >= 1600) || (defined(__WATCOMC__) && (defined(_STDINT_H_INCLUDED) || __WATCOMC__ >= 1250)) || (defined(__GNUC__) && (defined(_STDINT_H) || defined(_STDINT_H_) || defined(__UINT_FAST64_TYPE__)) )) && !defined(FIXEDINT_H_INCLUDED) #include #define FIXEDINT_H_INCLUDED @@ -77,11 +77,11 @@ static inline unsigned char shlu8(unsigned char a, uint32_t b) { } static inline int32_t shl32(uint32_t a, uint32_t b) { - return a << b; + return (int32_t)(a << b); } static inline int64_t shl64(uint64_t a, uint32_t b) { - return a << b; + return (int64_t)(a << b); } static inline uint64_t shlu64(uint64_t a, uint32_t b) {