| 94 | #else /* ifdef MD_HAVE_ARC4RANDOM */ |
| 95 | |
| 96 | static int rand_choosenum(int l, int h) |
| 97 | { |
| 98 | int i; |
| 99 | char buf[50]; |
| 100 | |
| 101 | apr_snprintf(buf, sizeof(buf), "%.0f", |
| 102 | (((double)(rand()%RAND_MAX)/RAND_MAX)*(h-l))); |
| 103 | i = atoi(buf)+1; |
| 104 | if (i < l) i = l; |
| 105 | if (i > h) i = h; |
| 106 | return i; |
| 107 | } |
| 108 | |
| 109 | static void seed_RAND(int pid) |
| 110 | { |