* [9fans] plan9port, sun-os, cc, how to compile
@ 2004-05-24 15:15 Bengt Kleberg
0 siblings, 0 replies; only message in thread
From: Bengt Kleberg @ 2004-05-24 15:15 UTC (permalink / raw)
To: 9fans
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-05-24 15:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-24 15:15 [9fans] plan9port, sun-os, cc, how to compile Bengt Kleberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).