summaryrefslogtreecommitdiff
path: root/devel/lcc/patches/patch-ac
diff options
context:
space:
mode:
Diffstat (limited to 'devel/lcc/patches/patch-ac')
-rw-r--r--devel/lcc/patches/patch-ac46
1 files changed, 46 insertions, 0 deletions
diff --git a/devel/lcc/patches/patch-ac b/devel/lcc/patches/patch-ac
new file mode 100644
index 00000000000..318664bb0a4
--- /dev/null
+++ b/devel/lcc/patches/patch-ac
@@ -0,0 +1,46 @@
+$NetBSD: patch-ac,v 1.1.1.1 2001/07/21 02:51:36 gmcgarry Exp $
+--- etc/lcc.c.orig Tue Aug 22 19:56:56 2000
++++ etc/lcc.c Tue Aug 22 21:24:43 2000
+@@ -552,6 +552,20 @@
+ exit(n = 100);
+ }
+
++/* parse -W[alp] argument, splitting at commas, a la gcc */
++static List wappend (char *warg, List lst) {
++ if (*warg != ',') return append (warg, lst);
++ warg++;
++ do {
++ char *s = warg;
++ for (; *warg && *warg != ','; warg++)
++ ;
++ if (*warg) *warg++= '\0';
++ if (*s) lst = append (s, lst);
++ } while (*warg);
++ return lst;
++}
++
+ /* opt - process option in arg */
+ static void opt(char *arg) {
+ switch (arg[1]) { /* multi-character options */
+@@ -563,7 +577,7 @@
+ return;
+ break;
+ case 'p':
+- plist = append(&arg[3], plist);
++ plist = wappend(&arg[3], plist);
+ return;
+ case 'f':
+ if (strcmp(&arg[3], "-C") || option("-b")) {
+@@ -572,10 +586,10 @@
+ }
+ break; /* and fall thru */
+ case 'a':
+- alist = append(&arg[3], alist);
++ alist = wappend(&arg[3], alist);
+ return;
+ case 'l':
+- llist[0] = append(&arg[3], llist[0]);
++ llist[0] = wappend(&arg[3], llist[0]);
+ return;
+ }
+ fprintf(stderr, "%s: %s ignored\n", progname, arg);