aboutsummaryrefslogtreecommitdiff
path: root/src/rc-plugin.h
blob: b15a11c7f5794b52aa4361940f371f807fa14824 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
   librc-plugin.h 
   Private instructions to use plugins
   Copyright 2007 Gentoo Foundation
   Released under the GPLv2
   */

#ifndef __LIBRC_PLUGIN_H__
#define __LIBRC_PLUGIN_H__

/* A simple flag to say if we're in a plugin proccess or not.
 * Mainly used in atexit code. */
extern bool rc_in_plugin;

void rc_plugin_load ();
void rc_plugin_unload ();
void rc_plugin_run (rc_hook_t, const char *value);

/* dlfunc defines needed to avoid ISO errors. FreeBSD has this right :) */
#ifndef __FreeBSD__
struct __dlfunc_arg {
	int	__dlfunc_dummy;
};

typedef	void (*dlfunc_t) (struct __dlfunc_arg);

dlfunc_t dlfunc (void * __restrict handle, const char * __restrict symbol);
#endif

#endif