Fix imake segfault on OpenIndiana
Version string changed in distributed GCC6, confusing get_sun_compiler_versions().
This commit is contained in:
committed by
Jon Trulson
parent
fd9e74ae42
commit
650ce0768f
@@ -1157,7 +1157,7 @@ get_sun_compiler_versions(FILE *inFile)
|
|||||||
strncat (cmd, " --version 2>&1", 15);
|
strncat (cmd, " --version 2>&1", 15);
|
||||||
if ((ccproc = popen (cmd, "r")) != NULL) {
|
if ((ccproc = popen (cmd, "r")) != NULL) {
|
||||||
if (fgets (buf, PATH_MAX, ccproc) != NULL) {
|
if (fgets (buf, PATH_MAX, ccproc) != NULL) {
|
||||||
vptr = strrchr (buf, 'G');
|
vptr = strrchr (buf, ')');
|
||||||
for (; !isdigit(*vptr); vptr++);
|
for (; !isdigit(*vptr); vptr++);
|
||||||
ret = sscanf (vptr, "%d.%d", &cmajor, &cminor);
|
ret = sscanf (vptr, "%d.%d", &cmajor, &cminor);
|
||||||
fprintf (inFile,
|
fprintf (inFile,
|
||||||
@@ -1182,7 +1182,7 @@ get_sun_compiler_versions(FILE *inFile)
|
|||||||
strncat (cmd, " --version 2>&1", 15);
|
strncat (cmd, " --version 2>&1", 15);
|
||||||
if ((ccproc = popen (cmd, "r")) != NULL) {
|
if ((ccproc = popen (cmd, "r")) != NULL) {
|
||||||
if (fgets (buf, PATH_MAX, ccproc) != NULL) {
|
if (fgets (buf, PATH_MAX, ccproc) != NULL) {
|
||||||
vptr = strrchr (buf, 'G');
|
vptr = strrchr (buf, ')');
|
||||||
for (; !isdigit(*vptr); vptr++);
|
for (; !isdigit(*vptr); vptr++);
|
||||||
ret = sscanf (vptr, "%d.%d", &cmajor, &cminor);
|
ret = sscanf (vptr, "%d.%d", &cmajor, &cminor);
|
||||||
fprintf (inFile,
|
fprintf (inFile,
|
||||||
|
|||||||
Reference in New Issue
Block a user