#include <stdio.h>
#include <stdlib.h>
+
+#include <openssl/opensslconf.h>
+
#ifndef MSDOS
#if !defined(VMS) || defined(__DECC)
-#include <unistd.h>
+#ifdef OPENSSL_UNISTD
+# include OPENSSL_UNISTD
+#else
+# include <unistd.h>
+#endif
+#include <math.h>
#endif
#endif
#include <openssl/des.h>
-#include <openssl/opensslconf.h>
-
#ifdef MSDOS /* Visual C++ 2.1 (Windows NT/95) */
#include <stdlib.h>
#include <errno.h>
#include <time.h>
#include <io.h>
-#ifndef RAND
-#define RAND
-#endif
-#endif
-
-#ifdef VMS
-#ifndef __DECC
-#include <math.h>
-#define RAND
-#else
-#if __CRTL_VER < 70000000
-#define RAND
-#endif
-#endif
#endif
#if defined(__STDC__) || defined(VMS) || defined(M_XENIX) || defined(MSDOS)
#include <string.h>
#endif
-#ifndef RAND
-#define RAND
-#endif
-
-#ifdef linux
-#undef RAND
-#endif
-
-#ifdef MSDOS
-#define getpid() 2
-#define RAND
-#endif
-
-#ifdef RAND
-#define srandom(s) srand(s)
-#define random rand
-#endif
-
#define ITERATIONS 16
#define HALF_ITERATIONS 8
PERM_OP(l,r,tt, 4,0x0f0f0f0fL); \
}
-EXTERN const DES_LONG des_SPtrans[8][64];
+OPENSSL_EXTERN const DES_LONG des_SPtrans[8][64];
void fcrypt_body(DES_LONG *out,des_key_schedule ks,
DES_LONG Eswap0, DES_LONG Eswap1);