diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-03-11 10:24:58 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-03-11 10:24:58 +0100 |
commit | 6c3ef4dacfa0a0fb0099299e30335c788704fe2a (patch) | |
tree | cb43da8a6fd9508f872059d6dada70ed02348b10 /runtime/module-template.h | |
parent | cd61ecd459d7ba915ac5b31743e7ded8db62e30e (diff) | |
parent | fd26a42bdc04eaf497cafd9ef806a54f3de1a7e9 (diff) | |
download | rsyslog-6c3ef4dacfa0a0fb0099299e30335c788704fe2a.tar.gz rsyslog-6c3ef4dacfa0a0fb0099299e30335c788704fe2a.tar.xz rsyslog-6c3ef4dacfa0a0fb0099299e30335c788704fe2a.zip |
Merge branch 'v5-beta'
Conflicts:
ChangeLog
configure.ac
doc/manual.html
plugins/omlibdbi/omlibdbi.c
tests/Makefile.am
tests/diag.sh
Diffstat (limited to 'runtime/module-template.h')
-rw-r--r-- | runtime/module-template.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/module-template.h b/runtime/module-template.h index f0084ea1..2b0ed593 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 @@ -386,6 +396,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 |