OI changed the version string on their GCC some months back, causing
imake to run off into the weeds and crash. Huzzah for unguarded loops.
I'm not sure why it's trying to jump ahead at all while scanning for
digits, rather than just starting at the beginning of the string. Maybe
there was some historical context... However, this patch ought to work
as far back as OpenSolaris, and we don't support anything older.
>From 046f8043fefb7066d78799877ade0d9ce0e5e794 Mon Sep 17 00:00:00 2001
From: "Matthew R. Trower" <d...@blackshard.net>
Date: Mon, 4 Jun 2018 00:34:52 -0500
Subject: [PATCH] Fix imake segfault on OpenIndiana
Version string changed in distributed GCC6, confusing
get_sun_compiler_versions().
---
cde/config/imake/imake.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cde/config/imake/imake.c b/cde/config/imake/imake.c
index 7c429e42..14422e64 100644
--- a/cde/config/imake/imake.c
+++ b/cde/config/imake/imake.c
@@ -1157,7 +1157,7 @@ get_sun_compiler_versions(FILE *inFile)
strncat (cmd, " --version 2>&1", 15);
if ((ccproc = popen (cmd, "r")) != NULL) {
if (fgets (buf, PATH_MAX, ccproc) != NULL) {
- vptr = strrchr (buf, 'G');
+ vptr = strrchr (buf, ')');
for (; !isdigit(*vptr); vptr++);
ret = sscanf (vptr, "%d.%d", &cmajor, &cminor);
fprintf (inFile,
@@ -1182,7 +1182,7 @@ get_sun_compiler_versions(FILE *inFile)
strncat (cmd, " --version 2>&1", 15);
if ((ccproc = popen (cmd, "r")) != NULL) {
if (fgets (buf, PATH_MAX, ccproc) != NULL) {
- vptr = strrchr (buf, 'G');
+ vptr = strrchr (buf, ')');
for (; !isdigit(*vptr); vptr++);
ret = sscanf (vptr, "%d.%d", &cmajor, &cminor);
fprintf (inFile,
--
2.16.2
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel