This gets it very close to building on tcc, with just key.c causing problems due to some KEY_PAIR* / KEY_PAIR** mixups. My brain can't quite wrap around what's going on there :)
This patch fixes a few places where duplicate variable names and invalid return values were occurring in the pmc's. --Josh Index: embed.c =================================================================== RCS file: /home/perlcvs/parrot/embed.c,v retrieving revision 1.10 diff -u -r1.10 embed.c --- embed.c 15 Feb 2002 02:30:02 -0000 1.10 +++ embed.c 15 Feb 2002 03:46:36 -0000 @@ -129,7 +129,7 @@ pf = PackFile_new(); - if(!PackFile_unpack(interpreter, pf, program_code, (unsigned)program_size) ) { + if(!PackFile_unpack(interpreter, pf, (opcode_t*)program_code, (unsigned)pr ogram_size) ) { fprintf(stderr, "Parrot VM: Can't unpack packfile %s.\n", filename); return NULL; } Index: key.c =================================================================== RCS file: /home/perlcvs/parrot/key.c,v retrieving revision 1.19 diff -u -r1.19 key.c --- key.c 11 Feb 2002 17:59:11 -0000 1.19 +++ key.c 15 Feb 2002 03:46:36 -0000 @@ -121,7 +121,7 @@ UNUSED (interpreter); key->size = 0; - key->keys = 0; + key->keys = NULL; return key; } Index: pdump.c =================================================================== RCS file: /home/perlcvs/parrot/pdump.c,v retrieving revision 1.8 diff -u -r1.8 pdump.c --- pdump.c 1 Jan 2002 19:49:11 -0000 1.8 +++ pdump.c 15 Feb 2002 03:46:36 -0000 @@ -62,7 +62,7 @@ pf = PackFile_new(); - if (!PackFile_unpack(interpreter, pf, packed, packed_size)) { + if (!PackFile_unpack(interpreter, pf, (opcode_t*)packed, packed_size)) { printf( "Can't unpack.\n" ); return 1; } Index: classes/array.pmc =================================================================== RCS file: /home/perlcvs/parrot/classes/array.pmc,v retrieving revision 1.12 diff -u -r1.12 array.pmc --- classes/array.pmc 14 Feb 2002 23:17:21 -0000 1.12 +++ classes/array.pmc 15 Feb 2002 03:46:37 -0000 @@ -189,7 +189,7 @@ PMC* mypmc; if (!key) { - return 0; + return; } kp = (key->keys)[0]; @@ -226,7 +226,7 @@ PMC* mypmc; if (!key) { - return 0; + return; } kp = (key->keys)[0]; @@ -261,7 +261,7 @@ PMC* mypmc; if (!key) { - return 0; + return; } kp = (key->keys)[0]; Index: classes/perlarray.pmc =================================================================== RCS file: /home/perlcvs/parrot/classes/perlarray.pmc,v retrieving revision 1.16 diff -u -r1.16 perlarray.pmc --- classes/perlarray.pmc 14 Feb 2002 23:17:21 -0000 1.16 +++ classes/perlarray.pmc 15 Feb 2002 03:46:37 -0000 @@ -178,10 +178,10 @@ void set_integer_keyed (KEY * key, INTVAL value) { KEY_PAIR* kp; INTVAL ix; - PMC* pmc; + PMC* pmc2; if (!key) { - return 0; + return; } kp = (key->keys)[0]; @@ -194,8 +194,8 @@ ix += SELF->cache.int_val; } - pmc = ((PMC**)(SELF->data))[ix]; - pmc->vtable->set_integer_native(INTERP, pmc, value); + pmc2 = ((PMC**)(SELF->data))[ix]; + pmc2->vtable->set_integer_native(INTERP, pmc2, value); } void set_number (PMC * value) { @@ -218,10 +218,10 @@ void set_number_keyed (KEY * key, FLOATVAL value) { KEY_PAIR* kp; INTVAL ix; - PMC* pmc; + PMC* pmc2; if (!key) { - return 0; + return; } kp = (key->keys)[0]; @@ -234,8 +234,8 @@ ix += SELF->cache.int_val; } - pmc = ((PMC**)(SELF->data))[ix]; - pmc->vtable->set_number_native(INTERP, pmc, value); + pmc2 = ((PMC**)(SELF->data))[ix]; + pmc2->vtable->set_number_native(INTERP, pmc2, value); } void set_string (PMC * value) { @@ -256,10 +256,10 @@ void set_string_keyed (KEY * key, STRING * value) { KEY_PAIR* kp; INTVAL ix; - PMC* pmc; + PMC* pmc2; if (!key) { - return 0; + return; } kp = (key->keys)[0]; @@ -272,8 +272,8 @@ ix += SELF->cache.int_val; } - pmc = ((PMC**)(SELF->data))[ix]; - pmc->vtable->set_string_native(INTERP, pmc, value); + pmc2 = ((PMC**)(SELF->data))[ix]; + pmc2->vtable->set_string_native(INTERP, pmc2, value); } void set_value (void* value) { Index: classes/perlhash.pmc =================================================================== RCS file: /home/perlcvs/parrot/classes/perlhash.pmc,v retrieving revision 1.11 diff -u -r1.11 perlhash.pmc --- classes/perlhash.pmc 11 Feb 2002 17:59:12 -0000 1.11 +++ classes/perlhash.pmc 15 Feb 2002 03:46:37 -0000 @@ -170,10 +170,10 @@ void set_integer_keyed (KEY * key, INTVAL value) { KEY_PAIR* kp; INTVAL ix; - PMC* pmc; + PMC* pmc2; if (!key) { - return 0; + return; } kp = (key->keys)[0]; @@ -188,8 +188,8 @@ ix += SELF->cache.int_val; } - pmc = ((PMC**)(SELF->data))[ix]; - pmc->vtable->set_integer_native(INTERP, pmc, value); + pmc2 = ((PMC**)(SELF->data))[ix]; + pmc2->vtable->set_integer_native(INTERP, pmc2, value); } void set_number (PMC * value) { @@ -212,10 +212,10 @@ void set_number_keyed (KEY * key, FLOATVAL value) { KEY_PAIR* kp; INTVAL ix; - PMC* pmc; + PMC* pmc2; if (!key) { - return 0; + return; } kp = (key->keys)[0]; @@ -230,8 +230,8 @@ ix += SELF->cache.int_val; } - pmc = ((PMC**)(SELF->data))[ix]; - pmc->vtable->set_number_native(INTERP, pmc, value); + pmc2 = ((PMC**)(SELF->data))[ix]; + pmc2->vtable->set_number_native(INTERP, pmc2, value); } void set_string (PMC * value) { @@ -252,7 +252,7 @@ void set_string_keyed (KEY * key, STRING * value) { KEY_PAIR* kp; INTVAL ix; - PMC* pmc; + PMC* pmc2; if (!key) { return; @@ -270,8 +270,8 @@ ix += SELF->cache.int_val; } - pmc = ((PMC**)(SELF->data))[ix]; - pmc->vtable->set_string_native(INTERP, pmc, value); + pmc2 = ((PMC**)(SELF->data))[ix]; + pmc2->vtable->set_string_native(INTERP, pmc2, value); } void set_value (void* value) { Index: lib/Parrot/OpTrans/CPrederef.pm =================================================================== RCS file: /home/perlcvs/parrot/lib/Parrot/OpTrans/CPrederef.pm,v retrieving revision 1.6 diff -u -r1.6 CPrederef.pm --- lib/Parrot/OpTrans/CPrederef.pm 15 Feb 2002 03:25:00 -0000 1.6 +++ lib/Parrot/OpTrans/CPrederef.pm 15 Feb 2002 03:46:39 -0000 @@ -25,7 +25,7 @@ #define REL_PC ((size_t)(cur_opcode - interpreter->prederef_code)) #define CUR_OPCODE (((opcode_t *)interpreter->code->byte_code) + REL_PC) -static inline opcode_t* prederef_to_opcode(struct Parrot_Interp* interpreter, +static opcode_t* prederef_to_opcode(struct Parrot_Interp* interpreter, void** prederef_addr) { ssize_t offset_in_ops; @@ -34,7 +34,7 @@ return (opcode_t*) interpreter->code->byte_code + offset_in_ops; } -static inline void** opcode_to_prederef(struct Parrot_Interp* interpreter, +static void** opcode_to_prederef(struct Parrot_Interp* interpreter, opcode_t* opcode_addr) { ssize_t offset_in_ops; -- Josh Wilmes ([EMAIL PROTECTED]) | http://www.hitchhiker.org