summaryrefslogtreecommitdiffstats
path: root/runtime/module-template.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-03-06 15:11:08 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2011-03-06 15:11:08 +0100
commitaf3de3d45104820dfdfdf2fe96ddac058b8fad9d (patch)
treee4c6b59a337e707442b30817042007f58837139d /runtime/module-template.h
parenteeb3212dad4d72eedad04a37b28b38fc831f67ed (diff)
parenteb8e018d5a7b27700bbae1b8681b4f2f8e8a4f99 (diff)
downloadrsyslog-af3de3d45104820dfdfdf2fe96ddac058b8fad9d.tar.gz
rsyslog-af3de3d45104820dfdfdf2fe96ddac058b8fad9d.tar.xz
rsyslog-af3de3d45104820dfdfdf2fe96ddac058b8fad9d.zip
Merge branch 'v5-beta' of git+ssh://git.adiscon.com/git/rsyslog into v5-beta
Diffstat (limited to 'runtime/module-template.h')
-rw-r--r--runtime/module-template.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/module-template.h b/runtime/module-template.h
index d05ec23c..c2585e67 100644
--- a/runtime/module-template.h
+++ b/runtime/module-template.h
@@ -77,6 +77,16 @@ static rsRetVal modGetType(eModType_t *modType) \
DEF_LMOD_STATIC_DATA \
MODULE_TYPE(eMOD_LIB)
+/* Macro to define whether the module should be kept dynamically linked.
+ */
+#define MODULE_KEEP_TYPE(x)\
+static rsRetVal modGetKeepType(eModKeepType_t *modKeepType) \
+ { \
+ *modKeepType = x; \
+ return RS_RET_OK;\
+ }
+#define MODULE_TYPE_NOKEEP MODULE_KEEP_TYPE(eMOD_NOKEEP)
+#define MODULE_TYPE_KEEP MODULE_KEEP_TYPE(eMOD_KEEP)
/* macro to define a unique module id. This must be able to fit in a void*. The
* module id must be unique inside a running rsyslogd application. It is used to
@@ -342,6 +352,8 @@ static rsRetVal queryEtryPt(uchar *name, rsRetVal (**pEtryPoint)())\
*pEtryPoint = modGetID;\
} else if(!strcmp((char*) name, "getType")) {\
*pEtryPoint = modGetType;\
+ } else if(!strcmp((char*) name, "getKeepType")) {\
+ *pEtryPoint = modGetKeepType;\
}
/* the following definition is the standard block for queryEtryPt for output