crypto/armcap.c: detect ARMv8 capabilities [in 32-bit build].
[openssl.git] / crypto / cast / cast_lcl.h
index 9f3a6602c966ff17ed78a19cdc66c3aa7c076ca5..e756021a33dc3bc4fc50095255e90240947da74a 100644 (file)
  * [including the GNU Public Licence.]
  */
 
-#ifdef WIN32
+
+#include "e_os.h"
+
+#ifdef OPENSSL_SYS_WIN32
 #include <stdlib.h>
 #endif
 
-/* we need OPENSSL_EXTERN from e_os.h */
-#ifndef FLAT_INC
-# include "../e_os.h"
-#else
-# include "e_os.h"
-#endif
 
 #undef c2l
 #define c2l(c,l)       (l =((unsigned long)(*((c)++)))    , \
                          *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \
                          *((c)++)=(unsigned char)(((l)     )&0xff))
 
-#if defined(WIN32)
+#if defined(OPENSSL_SYS_WIN32) && defined(_MSC_VER)
 #define ROTL(a,n)     (_lrotl(a,n))
 #else
 #define ROTL(a,n)     ((((a)<<(n))&0xffffffffL)|((a)>>(32-(n))))
        }
 #endif
 
-OPENSSL_EXTERN CAST_LONG CAST_S_table0[256];
-OPENSSL_EXTERN CAST_LONG CAST_S_table1[256];
-OPENSSL_EXTERN CAST_LONG CAST_S_table2[256];
-OPENSSL_EXTERN CAST_LONG CAST_S_table3[256];
-OPENSSL_EXTERN CAST_LONG CAST_S_table4[256];
-OPENSSL_EXTERN CAST_LONG CAST_S_table5[256];
-OPENSSL_EXTERN CAST_LONG CAST_S_table6[256];
-OPENSSL_EXTERN CAST_LONG CAST_S_table7[256];
+extern const CAST_LONG CAST_S_table0[256];
+extern const CAST_LONG CAST_S_table1[256];
+extern const CAST_LONG CAST_S_table2[256];
+extern const CAST_LONG CAST_S_table3[256];
+extern const CAST_LONG CAST_S_table4[256];
+extern const CAST_LONG CAST_S_table5[256];
+extern const CAST_LONG CAST_S_table6[256];
+extern const CAST_LONG CAST_S_table7[256];