plugin test for the mentally unwell. I feel bad for using recursive Make.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

13 lines
269B

  1. #ifndef PLUG_H_
  2. #define _QUOTE(name) #name
  3. #define QUOTE(name) _QUOTE(name)
  4. #define BIND(lib, func, func_name) *(void **) (&func) = dlsym(lib, func_name)
  5. #define PLUGIN(lib, x) BIND(lib, x, QUOTE(x))
  6. typedef void (*plug_t)(void);
  7. plug_t plug;
  8. #define PLUG_H_
  9. #endif