diff options
author | Michael Biebl <biebl@debian.org> | 2011-03-09 22:20:53 +0100 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2011-03-09 22:20:53 +0100 |
commit | a362b3333f84518889cefc1706d4e6adaa92888c (patch) | |
tree | c680c3dec25c9b987bcb3ddb2caa34f68fe00944 /runtime/module-template.h | |
parent | 4f45cc34384973b3643148c21a5ede489ab05f86 (diff) | |
download | rsyslog-a362b3333f84518889cefc1706d4e6adaa92888c.tar.gz |
Imported Upstream version 5.7.8upstream/5.7.8
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 d05ec23..c2585e6 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 |