
23 May
2007
23 May
'07
9:51 p.m.
This #ifdef maze is too much even for my standards. And that does mean something.
Is there anybody out there with an idea how to avoid that?
The cond_syscall() macro in the Linux kernel might be worth stealing. How about something like this?
#define cond_extern(name) asm(".weak\t" #name "\n\t.set\t" #name ", unimpl_extern")
I do not understand what this does. Does it work?
static int unimpl_extern(void) { return -ENOSYS; /* or something more appropriate */ }
How is this different that using the dummy function?
cond_extern(do_protect); cond_extern(do_flerase);
-Jeff