aboutsummaryrefslogtreecommitdiff
path: root/scripts/kconfig/conf.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kconfig/conf.c')
-rw-r--r--scripts/kconfig/conf.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index ea2446a89..41ac23936 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -153,9 +153,14 @@ static void conf_askvalue(struct symbol *sym, const char *def)
153 break; 153 break;
154 } 154 }
155 case set_random: 155 case set_random:
156#ifdef __MINGW32__
157 fprintf(stderr, "set_random not supported\n");
158 exit(1);
159#else
156 do { 160 do {
157 val = (tristate)(random() % 3); 161 val = (tristate)(random() % 3);
158 } while (!sym_tristate_within_range(sym, val)); 162 } while (!sym_tristate_within_range(sym, val));
163#endif
159 switch (val) { 164 switch (val) {
160 case no: line[0] = 'n'; break; 165 case no: line[0] = 'n'; break;
161 case mod: line[0] = 'm'; break; 166 case mod: line[0] = 'm'; break;
@@ -366,7 +371,12 @@ static int conf_choice(struct menu *menu)
366 continue; 371 continue;
367 break; 372 break;
368 case set_random: 373 case set_random:
374#ifdef __MINGW32__
375 fprintf(stderr, "set_random not supported\n");
376 exit(1);
377#else
369 def = (random() % cnt) + 1; 378 def = (random() % cnt) + 1;
379#endif
370 case set_default: 380 case set_default:
371 case set_yes: 381 case set_yes:
372 case set_mod: 382 case set_mod:
@@ -522,8 +532,13 @@ int main(int ac, char **av)
522 input_mode = set_yes; 532 input_mode = set_yes;
523 break; 533 break;
524 case 'r': 534 case 'r':
535#ifdef __MINGW32__
536 fprintf(stderr, "set_random not supported\n");
537 exit(1);
538#else
525 input_mode = set_random; 539 input_mode = set_random;
526 srandom(time(NULL)); 540 srandom(time(NULL));
541#endif
527 break; 542 break;
528 case 'h': 543 case 'h':
529 case '?': 544 case '?':