kconfig: use C89 random functions in conf.c
[safe/jmp/linux-2.6] / scripts / kconfig / conf.c
index d4737d3..01c2f35 100644 (file)
@@ -4,11 +4,11 @@
  */
 
 #include <ctype.h>
-#include <stdlib.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
-#include <unistd.h>
 #include <time.h>
+#include <unistd.h>
 #include <sys/stat.h>
 
 #define LKC_DIRECT_LINK
@@ -160,7 +160,7 @@ static int conf_askvalue(struct symbol *sym, const char *def)
                }
        case set_random:
                do {
-                       val = (tristate)(random() % 3);
+                       val = (tristate)(rand() % 3);
                } while (!sym_tristate_within_range(sym, val));
                switch (val) {
                case no: line[0] = 'n'; break;
@@ -375,7 +375,7 @@ static int conf_choice(struct menu *menu)
                        break;
                case set_random:
                        if (is_new)
-                               def = (random() % cnt) + 1;
+                               def = (rand() % cnt) + 1;
                case set_default:
                case set_yes:
                case set_mod:
@@ -526,7 +526,7 @@ int main(int ac, char **av)
                        break;
                case 'r':
                        input_mode = set_random;
-                       srandom(time(NULL));
+                       srand(time(NULL));
                        break;
                case 'h':
                        printf("See README for usage info\n");