As ftruncate is not availabe on all platforms, switch back to
[oweals/openssl.git] / crypto / des / des_locl.h
index d01c704244b696b3f1e2ead57daa4addb92ac08c..e50fa8fb38ab6f663a40c6a855676533592fe53d 100644 (file)
@@ -1,4 +1,4 @@
-/* crypto/des/des_locl.org */
+/* crypto/des/des_locl.h */
 /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
 
 #include <stdio.h>
 #include <stdlib.h>
+
+#include <openssl/opensslconf.h>
+
 #ifndef MSDOS
-#include <unistd.h>
+#if !defined(VMS) || defined(__DECC)
+#ifdef OPENSSL_UNISTD
+# include OPENSSL_UNISTD
+#else
+# include <unistd.h>
 #endif
-#include "des.h"
-
-#include "opensslconf.h"
+#include <math.h>
+#endif
+#endif
+#include <openssl/des.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
-#undef NOPROTO
 #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
-#undef NOPROTO
-#endif
-
-#if defined(NOCONST)
-#define const
-#endif
-
-#ifdef __STDC__
-#undef NOPROTO
-#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];
 
-#ifndef NOPROTO
 void fcrypt_body(DES_LONG *out,des_key_schedule ks,
        DES_LONG Eswap0, DES_LONG Eswap1);
-#else
-void fcrypt_body();
-#endif
-
 #endif