For people who are into pain, such as those who use CORBA C bindings, I
offer http://bugzilla.mozilla.org/show_bug.cgi?id=72083 , which now
contains a working-though-incomplete example of a component written
completely in C. No NSPR linking, no libxpcom linking, just good old
libc and some hand-crafted vtables. It only took a couple of hours,
including a fair while debugging a crash that was a direct result of
making Sample_query_interface lie.
You can use it with xpcshell to poke at the nsISample methods, just like
you can with the C++ nsSample.cpp code.
As I mention in the bug, with xpidl support for a C mode and some helper
macros, it wouldn't even be mind-alteringly unpleasant.
Mike