Tweak code to make it easier to compile with gcc.
+ Use macros to name symbols with non-ASCII characters.
+ Make some variables unsigned, because they are compared
against unsigned values.
+ Fix a few void* pointers to be MLink*.
R=rsc
DELTA=94 (44 added, 3 deleted, 47 changed)
OCL=22303
CL=22638
diff --git a/src/runtime/mem.c b/src/runtime/mem.c
index 8e7a472..9d6a396 100644
--- a/src/runtime/mem.c
+++ b/src/runtime/mem.c
@@ -29,7 +29,7 @@
{
byte *v;
- v = sys·mmap(nil, n, PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, 0, 0);
+ v = sys_mmap(nil, n, PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, 0, 0);
m->mem.nmmap += n;
return v;
}
@@ -61,10 +61,10 @@
// hunk, and then once brk returned we'd immediately
// overwrite that hunk with our own.
// (the net result would be a memory leak, not a crash.)
- // so we have to call sys·mmap directly - it is written
+ // so we have to call sys_mmap directly - it is written
// in assembly and tagged not to grow the stack.
m->mem.hunk =
- sys·mmap(nil, NHUNK, PROT_READ|PROT_WRITE,
+ sys_mmap(nil, NHUNK, PROT_READ|PROT_WRITE,
MAP_ANON|MAP_PRIVATE, 0, 0);
m->mem.nhunk = NHUNK;
m->mem.nmmap += NHUNK;
@@ -78,7 +78,7 @@
}
void
-sys·mal(uint32 n, uint8 *ret)
+sys_mal(uint32 n, uint8 *ret)
{
ret = mal(n);
FLUSH(&ret);