Commits

Victor Stinner committed 14bec7a

weak engines require dynlib

  • Participants
  • Parent commits 5406c63

Comments (0)

Files changed (1)

 int hasard_zero_init(struct hasard_engine_t *engine);
 int hasard_mt_init(struct hasard_engine_t *engine);
 int hasard_isaac_init(struct hasard_engine_t *engine);
+#ifdef HAVE_DYNLIB
 int hasard_weak_init(struct hasard_engine_t *engine);
+#endif
 int hasard_arcfour_init(struct hasard_engine_t *engine);
 int hasard_cryptgen_init(struct hasard_engine_t *engine);
 int hasard_dev_init(struct hasard_engine_t *engine);
 struct hasard_engine_info_t hasard_engines[] = {
     /* name, seed needed?, initializer */
     {HASARD_MERSENNE_TWISTER, true, hasard_mt_init},
-    {HASARD_RANDU, true, hasard_weak_init},
-    {HASARD_MINIMUM_STANDARD, true, hasard_weak_init},
-    {HASARD_PARK_MILLER, true, hasard_weak_init},
-    {HASARD_WINDOWS, true, hasard_weak_init},
-    {HASARD_ZX_SPECTRUM , true, hasard_weak_init},
-    {HASARD_LIBC_RAND, true, hasard_weak_init},
-    {HASARD_LIBC_RAND_R, true, hasard_weak_init},
-    {HASARD_LIBC_RAND48, true, hasard_weak_init},
-    {HASARD_LIBC_RAND48_R, true, hasard_weak_init},
-    {HASARD_LIBC_RANDOM, true, hasard_weak_init},
-    {HASARD_LIBC_RANDOM_R_8, true, hasard_weak_init},
-    {HASARD_LIBC_RANDOM_R_32, true, hasard_weak_init},
-    {HASARD_LIBC_RANDOM_R_64, true, hasard_weak_init},
-    {HASARD_LIBC_RANDOM_R_128, true, hasard_weak_init},
-    {HASARD_LIBC_RANDOM_R_256, true, hasard_weak_init},
-#ifdef HASARD_INT64
-    {HASARD_RAND48, true, hasard_weak_init},
-#endif
 #ifdef WINDOWS
     {HASARD_CRYPTGEN, false, hasard_cryptgen_init},
 #else
     {HASARD_ISAAC, true, hasard_isaac_init},
     {HASARD_ZERO, false, hasard_zero_init},
     {HASARD_ONE, false, hasard_zero_init},
-    {HASARD_COUNTER, true, hasard_weak_init},
-    {HASARD_MIDDLE_SQUARE, true, hasard_weak_init},
     {HASARD_ARCFOUR, true, hasard_arcfour_init},
     {HASARD_KISS, true, hasard_kiss_init},
 #ifdef HAVE_DYNLIB
 #endif
     {HASARD_NSPR, true, hasard_nspr_init},
 #endif
+
+#ifdef HAVE_DYNLIB
+    {HASARD_RANDU, true, hasard_weak_init},
+    {HASARD_MINIMUM_STANDARD, true, hasard_weak_init},
+    {HASARD_PARK_MILLER, true, hasard_weak_init},
+    {HASARD_WINDOWS, true, hasard_weak_init},
+    {HASARD_ZX_SPECTRUM , true, hasard_weak_init},
+    {HASARD_LIBC_RAND, true, hasard_weak_init},
+    {HASARD_LIBC_RAND_R, true, hasard_weak_init},
+    {HASARD_LIBC_RAND48, true, hasard_weak_init},
+    {HASARD_LIBC_RAND48_R, true, hasard_weak_init},
+    {HASARD_LIBC_RANDOM, true, hasard_weak_init},
+    {HASARD_LIBC_RANDOM_R_8, true, hasard_weak_init},
+    {HASARD_LIBC_RANDOM_R_32, true, hasard_weak_init},
+    {HASARD_LIBC_RANDOM_R_64, true, hasard_weak_init},
+    {HASARD_LIBC_RANDOM_R_128, true, hasard_weak_init},
+    {HASARD_LIBC_RANDOM_R_256, true, hasard_weak_init},
+#ifdef HASARD_INT64
+    {HASARD_RAND48, true, hasard_weak_init},
+#endif
+    {HASARD_COUNTER, true, hasard_weak_init},
+    {HASARD_MIDDLE_SQUARE, true, hasard_weak_init},
+#endif
     {NULL, false, NULL},
 };