Discussion:
[9fans] 8c - is this leagal?
(too old to reply)
Bence Fábián
2012-11-21 13:32:47 UTC
Permalink
8c is for Plan9's C dialect.
Look into /sys/doc/ape.ps
I'am trying (again) to build svn for plan9 native.
bad in naddr: NAME cache_init_state
static volatile svn_atomic_t cache_init_state = 0;
Is this legal c code, static and volatile?
if it is anyone any ideas how to fix 8c - compilers are a closed book to
me.
-Steve
Charles Forsyth
2012-11-21 13:30:25 UTC
Permalink
static is scope, volatile has dynamic effects, very dynamic. you
should be able to #define volatile
to nothing (-Dvolatile'=') and it will usually work. certainly for
statics and externals.
the one real effect it might have is on automatic variables if the
usage in conjunction
with setjmp is a little strange (straightforward uses are fine with setjmp).
Is this legal c code, static and volatile?
Charles Forsyth
2012-11-21 13:31:41 UTC
Permalink
static volatile svn_atomic_t cache_init_state = 0;
svn_atomic_t? has it got its own thread library? coroutines?
Charles Forsyth
2012-11-21 14:09:40 UTC
Permalink
By which I meant that yes, it's legal ANSI C code to combine them. The
strange way the compiler implements volatile references probably led
to that odd diagnostic.
As I said, I'd try nopping the volatile.
Post by Charles Forsyth
static is scope, volatile has dynamic effects, very dynamic.
Steve Simon
2012-11-21 15:51:22 UTC
Permalink
Thanks for the comments,

I dropped the volatile and that bit compiles,
I am getting close I think.

And in answer to charles, there is all sorts going on in there.

counting the semicolons gives:

Apache portable utils 16049
Apache portable runtime 24852
sqlite3 43944
subversion 343690
Total 428535

and for context:

/sys/src/9 107216

-Steve

Bence Fábián
2012-11-21 15:03:02 UTC
Permalink
yeah i realized since. sorry
Post by Bence Fábián
8c is for Plan9's C dialect.
Look into /sys/doc/ape.ps
This was not a useful answer to Steve's question.
- Dan C.
Dan Cross
2012-11-21 14:56:55 UTC
Permalink
Post by Bence Fábián
8c is for Plan9's C dialect.
Look into /sys/doc/ape.ps
This was not a useful answer to Steve's question.

- Dan C.
erik quanstrom
2012-11-21 15:53:35 UTC
Permalink
/sys/src/9 107216
half of that is for obsolete pc drivers.

- erik
Loading...