Commits

Anonymous committed c08138d

Some fixes for building (but not linking yet) under Ubuntu.

Comments (0)

Files changed (2)

src/driver/main.c

 #define RUN_PROGRAM 1
 #endif
 
+extern char *optarg;
+extern int optind, opterr, optopt;
+
 struct activation *global_ar;
 
 extern int gc_trigger;
 	int bpi = 0;
 	struct closure *k[2048];
 	int ki = 0;
+        struct value *vptr;
+        struct builtin **biptr;
 
 	program = *given_prog;
 	gptr = *given_prog;
 			if (ic->operand.value.type == VALUE_CLOSURE) {
 				k[ki++] = ic->operand.value.v.s->v.k;
 			}
-			*(((struct value *)gptr)++) = ic->operand.value;
+                        vptr = (struct value *)gptr;
+			*vptr = ic->operand.value;
+                        vptr++;
+                        gptr = (vm_label_t)vptr;
 			break;
 		case INSTR_PUSH_LOCAL:
 		case INSTR_POP_LOCAL:
 			gptr += sizeof(vm_label_t);
 			break;
 		case INSTR_EXTERNAL:
-			*(((struct builtin **)gptr)++) = ic->operand.builtin;
+                        biptr = (struct builtin **)gptr;
+			*biptr = ic->operand.builtin;
+                        biptr++;
+                        gptr = (vm_label_t)biptr;
 			break;
 		}
 	}