bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch : sco3.2v5.0.7 : 'strlist' redeclared as different kind of symbol


From: Kevin R. Bulgrien
Subject: patch : sco3.2v5.0.7 : 'strlist' redeclared as different kind of symbol
Date: Thu, 10 Jan 2019 13:22:35 -0600 (CST)

While compiling GNU make 4.1 and 4.2.1 for an old (read ancient) system,
the following problem was encountered:

$ cd /csdi/src/sco507/gnu/make-4.2.1
$ ./configure --prefix=/csdi/src/sco507/root/usr/local
...
$ make
...
gcc -DLOCALEDIR=\"/csdi/src/sco507/root/usr/local/share/locale\"
-DLIBDIR=\"/csdi/src/sco507/root/usr/local/lib\"
-DINCLUDEDIR=\"/csdi/src/sco507/root/usr/local/include\" -DHAVE_CONFIG_H -I.
-I./glob    -static -c -o main.o main.c
main.c:98: `strlist' redeclared as different kind of symbol
/usr/include/string.h:67: previous declaration of `strlist'
main.c:98: warning: `strlist' was declared `extern' and later `static'
make[2]: *** [main.o] Error 1
make[2]: Leaving directory `/csdi/src/sco507/gnu/make-4.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/csdi/src/sco507/gnu/make-4.1'
make: *** [all] Error 2

This is resolvable by renaming all strlist in main.c with an alternate
spelling of an identifier.  For example:

$ cat make-4.1-i686-pc-sco3.2v5.0.7.patch
diff -ur make-4.1.orig/main.c make-4.1/main.c
--- make-4.1.orig/main.c        2014-10-05 11:24:51.000000000 -0500
+++ make-4.1/main.c     2019-01-10 12:24:05.000000000 -0600
@@ -95,7 +95,7 @@
         flag,                   /* Turn int flag on.  */
         flag_off,               /* Turn int flag off.  */
         string,                 /* One string per invocation.  */
-        strlist,                /* One string per switch.  */
+        strnglist,                /* One string per switch.  */
         filename,               /* A string containing a file name.  */
         positive_int,           /* A positive integer.  */
         floating,               /* A floating-point number (double).  */
@@ -119,7 +119,7 @@
 #define short_option(c) ((c) <= CHAR_MAX)

 /* The structure used to hold the list of strings given
-   in command switches of a type that takes strlist arguments.  */
+   in command switches of a type that takes strnglist arguments.  */

 struct stringlist
   {
@@ -437,14 +437,14 @@
     { 'W', filename, &new_files, 0, 0, 0, 0, 0, "what-if" },

     /* These are long-style options.  */
-    { CHAR_MAX+1, strlist, &db_flags, 1, 1, 0, "basic", 0, "debug" },
+    { CHAR_MAX+1, strnglist, &db_flags, 1, 1, 0, "basic", 0, "debug" },
     { CHAR_MAX+2, string, &jobserver_fds, 1, 1, 0, 0, 0, "jobserver-fds" },
     { CHAR_MAX+3, flag, &trace_flag, 1, 1, 0, 0, 0, "trace" },
     { CHAR_MAX+4, flag, &inhibit_print_directory_flag, 1, 1, 0, 0, 0,
       "no-print-directory" },
     { CHAR_MAX+5, flag, &warn_undefined_variables_flag, 1, 1, 0, 0, 0,
       "warn-undefined-variables" },
-    { CHAR_MAX+6, strlist, &eval_strings, 1, 0, 0, 0, 0, "eval" },
+    { CHAR_MAX+6, strnglist, &eval_strings, 1, 0, 0, 0, 0, "eval" },
     { CHAR_MAX+7, string, &sync_mutex, 1, 1, 0, 0, 0, "sync-mutex" },
     { 0, 0, 0, 0, 0, 0, 0, 0, 0 }
   };
@@ -2590,7 +2590,7 @@
           break;

         case string:
-        case strlist:
+        case strnglist:
         case filename:
         case positive_int:
         case floating:
@@ -2786,7 +2786,7 @@
                   break;

                 case string:
-                case strlist:
+                case strnglist:
                 case filename:
                   if (!doit)
                     break;
@@ -3126,7 +3126,7 @@
           break;

         case filename:
-        case strlist:
+        case strnglist:
           if (all)
             {
               struct stringlist *sl = *(struct stringlist **) cs->value_ptr;


The change is small enough, that perhaps someone might consider whether it
is reasonable to make an official change to avoid this name conflict so
future releases do not trigger the same issue.  If not, that is fine,
but it would be appreciated.

This is the only source change required to make build on this platform
possible.  I realize that this particular platform is far outside of
vendor support, but don't really see the need to go through all that
again, but at least, I figured I'd throw this on the list if only to
archive the finding.

Regards,

Kevin R. Bulgrien



reply via email to

[Prev in Thread] Current Thread [Next in Thread]