Hi all I am trying to look into porting nhc98 to plan9. Plan9 has only two C compiler and it doesnt support all the C capability available in Unix due to the difficulty in emulating some areas of unix into plan9. So far getting some section of nhc98-1.20/src/runtime compiled works ok, but I had to a do some minor changes on the section of code below. The C preprocessor coudn't determine the value of the initializer for F0_Prelude_46primLeave[], giving the error "initializer is not a constant for F0_Prelude_46primLeave". I tried to hard code the value, but was not sure if my number is correct, so I wanted to get first hand information. --snippet from newmacros.h --- #define VAP_TAG 1 #define WORDSHIFT 5 #define WORDSIZE (1<<WORDSHIFT) #define WORDMASK (WORDSIZE-1) #define NS (WORDSIZE>>3) #define ZAP_BIT (1L<<(WORDSIZE-1)) #define CAPTAG(fun,need) useLabel(fun) - (NS + 2 + (2 * need)) + VAP_TAG #define useLabel(name) ((unsigned)name) ---- -- snippet from newbuiltin.c ---- unsigned F0_Prelude_46primLeave[] = { CAPTAG(FN_Prelude_46primLeave,1) #ifdef PROFILE , useLabel(PROF_primLeave) , 0 , 0 , 0 #endif -- regards fernan -- http://www.fernski.com
participants (1)
-
Fernan Bolando