diff options
author | Roland McGrath <roland@redhat.com> | 1993-03-18 01:02:20 +0000 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 1993-03-18 01:02:20 +0000 |
commit | f9b50f64362184425ae05431d04be3c0bba1fa48 (patch) | |
tree | 0e655fac1f52f7ca735b6f99615057030fa9cc13 /main.c | |
parent | 28c125b725bb2b41dcaf26cee9a157cfb3de36d6 (diff) | |
download | gunmake-f9b50f64362184425ae05431d04be3c0bba1fa48.tar.gz |
Formerly main.c.~74~
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -1495,10 +1495,15 @@ define_makeflags (all, makefile) if (all) { struct stringlist *sl = *(struct stringlist **) cs->value_ptr; - register unsigned int i; if (sl != 0) - for (i = 0; i < sl->idx; ++i) - ADD_FLAG (sl->list[i], strlen (sl->list[i])); + { + /* Add the elements in reverse order, because + all the flags get reversed below; and the order + matters for some switches (like -I). */ + register unsigned int i = sl->idx; + while (i-- > 0) + ADD_FLAG (sl->list[i], strlen (sl->list[i])); + } } break; } |