summaryrefslogtreecommitdiff
path: root/src/rc-plugin.h
blob: 56b012ba03b5531aefa05ddc8a1ea1a8fc1c22b6 (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
31
/*
   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;

int rc_waitpid (pid_t pid);
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