From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Date: Mon, 24 May 2004 15:15:55 +0000 From: Bengt Kleberg Message-ID: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: [9fans] plan9port, sun-os, cc, how to compile Topicbox-Message-UUID: 866507b4-eacd-11e9-9e20-41e7f4b1d025 greetings, this is about the plan9port plan9-20040517.tar.gz. i have sun-os 5.8, and sun-cc. first i had trouble with sun-os yield() vs plan9 yield(). sun-os and plan9 man pages both agree on void yield(void) but plan9/include/thread.h and plan9/src/libthread/sched.c uses int yield(void) it has proved impossible (so far) to hide the sun-os definition of yield(). i decided to redefine plan9 yield(). *** /home/eleberg/private/plan9/include/thread.h Mon May 24 14:07:45 2004 --- /home/eleberg/private/plan9/include/thread.h.original Mon May 24 14:06:52 2004 *************** *** 121,130 **** int tprivalloc(void); void tprivfree(int); void **tprivaddr(int); ! int p9yield(void); ! #ifndef NOPLAN9DEFINES ! #define yield p9yield ! #endif long threadstack(void); extern int mainstacksize; --- 121,128 ---- int tprivalloc(void); void tprivfree(int); void **tprivaddr(int); ! int yield(void); ! long threadstack(void); extern int mainstacksize; next problem was in plan9/src/libmach. there is no SunOS.c. i have copied Darwin.c to SunOS.c, which allows the installation to continue. i think i have written before about this to comp.os.plan9. finally i had to add a comment to plan9/src/cmd/astro/comet.c. *** /home/eleberg/private/plan9/src/cmd/astro/comet.c Mon May 24 14:22:27 2004 --- /home/eleberg/private/plan9/src/cmd/astro/comet.c.original Mon May 24 14:22:17 2004 *************** *** 73,79 **** 151.0510, 83.1909, }; /*C/1999 S4 (Linear) */ ! /* elem=(struct elem) { etdate(2002, 3, 18.9784), 0.5070601, --- 73,79 ---- 151.0510, 83.1909, }; /*C/1999 S4 (Linear) */ ! elem=(struct elem) { etdate(2002, 3, 18.9784), 0.5070601, doing this allows the installation to continue. it is obvious from the code that the function now uses non initialised data, but the compiler only complains about ./astro.h:203: warning: macro redefined: sun :-) bengt