mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-15 14:28:24 +00:00
bring back compile-option checking when loading modules, only this time use a string-based storage and comparison mechanism because it is easier to support on other platforms
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89461 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -203,6 +203,7 @@ struct ast_module_info {
|
||||
|
||||
const char *key;
|
||||
unsigned int flags;
|
||||
const char buildopt_sum[33]; /* The value of AST_BUILDOPT_SUM when this module was compiled */
|
||||
};
|
||||
|
||||
void ast_module_register(const struct ast_module_info *);
|
||||
@@ -229,7 +230,8 @@ void ast_module_unref(struct ast_module *);
|
||||
AST_MODULE, \
|
||||
desc, \
|
||||
keystr, \
|
||||
flags_to_set \
|
||||
flags_to_set, \
|
||||
AST_BUILDOPT_SUM, \
|
||||
}; \
|
||||
static void __attribute__ ((constructor)) __reg_module(void) \
|
||||
{ \
|
||||
@@ -259,6 +261,7 @@ const static __attribute__((unused)) struct ast_module_info *ast_module_info;
|
||||
.flags = flags_to_set, \
|
||||
.description = desc, \
|
||||
.key = keystr, \
|
||||
.buildopt_sum = AST_BUILDOPT_SUM, \
|
||||
fields \
|
||||
}; \
|
||||
static void __attribute__ ((constructor)) __reg_module(void) \
|
||||
|
||||
Reference in New Issue
Block a user