extern "C" {
#endif
-#ifdef NO_CAST
+#include <openssl/opensslconf.h>
+
+#ifdef OPENSSL_NO_CAST
#error CAST is disabled.
#endif
#define CAST_ENCRYPT 1
#define CAST_DECRYPT 0
-#define CAST_LONG unsigned long
+#define CAST_LONG unsigned int
#define CAST_BLOCK 8
#define CAST_KEY_LENGTH 16