Simplify preprocessor statements.
[openssl.git] / crypto / rand / rand_win.c
index 9f2dcff9a92bf86fb217cbc6c47916d363b8cea5..eed64e62a2313256949d290bf85bcac5f0f2a1c1 100644 (file)
@@ -310,7 +310,7 @@ int RAND_poll(void)
                        {
                        if (gen(hProvider, sizeof(buf), buf) != 0)
                                {
-                               RAND_add(buf, sizeof(buf), sizeof(buf));
+                               RAND_add(buf, sizeof(buf), 0);
 #ifdef DEBUG
                                printf("randomness from PROV_RSA_FULL\n");
 #endif
@@ -461,7 +461,7 @@ int RAND_poll(void)
                                                hlist.th32ProcessID,
                                                hlist.th32HeapID))
                                                {
-                                               int entrycnt = 50;
+                                               int entrycnt = 80;
                                                do
                                                        RAND_add(&hentry,
                                                                hentry.dwSize, 5);
@@ -570,7 +570,7 @@ static void readtimer(void)
        DWORD w;
        LARGE_INTEGER l;
        static int have_perfc = 1;
-#ifndef __GNUC__
+#ifdef _MSC_VER
        static int have_tsc = 1;
        DWORD cyclecount;
 
@@ -688,6 +688,10 @@ static void readscreen(void)
 
 #include <time.h>
 
+#ifdef NO_FP_API
+#  undef DEVRANDOM
+#endif
+
 int RAND_poll(void)
 {
        unsigned long l;