by birc_a · 9y ago · 0 comments
outputmodule_t omstdout = { .name = "omstdout", .description = "blah", .init = prepare_stdout, .do_action = write_to_stdout }
#if COMPILING_FOR_RUNTIME_LOADING
outputmodule_t *rsyslog_outputmodule = &omstdout;
#endif
Then either stick `omstdout` in a list of modules known at compile-time or compile separately and use dlopen/dlsym to get the one necessary symbol.
No GNUisms, no language extensions, no linker tricks, no macro magic.C has problems but it's not that hard to create readable code in it.
No comments yet.