PeterMosmans / openssl

'Extra featured' OpenSSL with ChaCha20 and Poly1305 support
https://onwebsecurity.com/pages/openssl.html
Other
92 stars 18 forks source link

Fails to build on Win32 using MSVC compiler #8

Closed eakraly closed 9 years ago

eakraly commented 9 years ago

The reason seams to be ssize_t used in files related to chacha20poly1305 and aead in general - ssize_t is not defined in MSVC (and is not a type defined in standard). I think following comment in CHANGES might be related to this: *) Use type ossl_ssize_t instad of ssize_t which isn't available on all platforms. Move ssize_t definition from e_os.h to the public header file e_os2.h as it now appears in public header file cms.h [Steve Henson]

PeterMosmans commented 9 years ago

Thanks for reporting this issue. ssize_t is indeed a POSIX type definition and not pure C.

Could you test the latest release (efe0953e9b55365a213227bf4b38084bda595c4d) ?

eakraly commented 9 years ago

There is one more related issue - SSIZE_MAX which is defined for ssize_t

PeterMosmans commented 9 years ago

Thanks for your feedback, commit abdfd1f251cb425093e337630fa2b19da5aa4900 should fix it. I defined SSIZE_MAX as INT_MAX, which is way too low for a proper 64 architecture. If you look at the code however the values in size_t will be equal or lower, so I don't expect any issues there on MSVC.