]> git.saurik.com Git - bison.git/blobdiff - src/symlist.c
Work around portability problem on Solaris 10: flex-generated
[bison.git] / src / symlist.c
index 662f1f7bc1ffa4a9cd5448b12a12ff3eb93b39c9..7c3ebff6b637ae6ce2278bbdf7596b6e232e3a53 100644 (file)
@@ -19,6 +19,7 @@
    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    Boston, MA 02110-1301, USA.  */
 
+#include <config.h>
 #include "system.h"
 
 #include "complain.h"
@@ -49,10 +50,14 @@ symbol_list_new (symbol *sym, location loc)
 `------------------*/
 
 void
-symbol_list_print (FILE *f, symbol_list *l)
+symbol_list_print (symbol_list *l, FILE *f)
 {
-  for (/* Nothing. */; l; l = l->next)
-    symbol_print (f, l->sym);
+  for (/* Nothing. */; l && l->sym; l = l->next)
+    {
+      symbol_print (l->sym, f);
+      if (l && l->sym)
+       fputc (' ', f);
+    }
 }