jonas@sisug.sisu.se (Jonas Olsson) (02/20/89)
make dumps core when values are omitted to flags e.g.: make -j Segmentation fault (dump saved in "core") This occurs in the case where you have a flag with an optional numerical argument as last argument on the command line. This only occurs on systems that doesn't allow references of address zero (eg. Sun). The fix is simple: *** make.c.org Mon Feb 20 12:46:24 1989 --- make.c Mon Feb 20 13:00:15 1989 *************** *** 847,853 **** case positive_int: if (*sw == '\0') sw = argv[++i]; ! if (isdigit (*sw)) { int i = atoi (sw); while (isdigit (*sw)) --- 847,853 ---- case positive_int: if (*sw == '\0') sw = argv[++i]; ! if (sw && isdigit (*sw)) { int i = atoi (sw); while (isdigit (*sw)) *************** *** 888,894 **** case floating: if (*sw == '\0') sw = argv[++i]; ! if (*sw == '.' || isdigit (*sw)) { *(double *) cs->value_ptr = atof (sw); while (*sw == '.' || isdigit (*sw)) --- 888,894 ---- case floating: if (*sw == '\0') sw = argv[++i]; ! if (sw && (*sw == '.' || isdigit (*sw))) { *(double *) cs->value_ptr = atof (sw); while (*sw == '.' || isdigit (*sw))
bob@tinman.cis.ohio-state.edu (Bob Sutterfield) (02/20/89)
In article <8902201222.AA12455@sisug.sisu.se> jonas@sisug.sisu.se (Jonas Olsson) writes:
Subject: Re: Argument decoding bug in gnu make-3.38
Are you sure that's what you have? The current version on
prep.ai.mit.edu is 3.27, dated 12 Dec.