mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-20 00:30:20 +00:00
instead of trying to forcibly load res_agi when app_stack is loaded (even if the administrator didn't want it loaded), use GCC weak symbols to determine whether it was loaded already or not; if it was loaded, then use it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -55,11 +55,17 @@ typedef struct agi_command {
|
||||
AST_LIST_ENTRY(agi_command) list;
|
||||
} agi_command;
|
||||
|
||||
int ast_agi_fdprintf(struct ast_channel *chan, int fd, char *fmt, ...);
|
||||
int ast_agi_register(struct ast_module *mod, agi_command *cmd);
|
||||
int ast_agi_unregister(struct ast_module *mod, agi_command *cmd);
|
||||
void ast_agi_register_multiple(struct ast_module *mod, agi_command *cmd, int len);
|
||||
void ast_agi_unregister_multiple(struct ast_module *mod, agi_command *cmd, int len);
|
||||
#if defined(ASTERISK_AGI_OPTIONAL)
|
||||
#define AGI_WEAK attribute_weak
|
||||
#else
|
||||
#define AGI_WEAK
|
||||
#endif
|
||||
|
||||
int AGI_WEAK ast_agi_fdprintf(struct ast_channel *chan, int fd, char *fmt, ...);
|
||||
int AGI_WEAK ast_agi_register(struct ast_module *mod, agi_command *cmd);
|
||||
int AGI_WEAK ast_agi_unregister(struct ast_module *mod, agi_command *cmd);
|
||||
void AGI_WEAK ast_agi_register_multiple(struct ast_module *mod, agi_command *cmd, int len);
|
||||
void AGI_WEAK ast_agi_unregister_multiple(struct ast_module *mod, agi_command *cmd, int len);
|
||||
|
||||
#if defined(__cplusplus) || defined(c_plusplus)
|
||||
}
|
||||
|
||||
@@ -117,6 +117,9 @@
|
||||
attribute. */
|
||||
#undef HAVE_ATTRIBUTE_warn_unused_result
|
||||
|
||||
/* Define to 1 if your GCC C compiler supports the 'weak' attribute. */
|
||||
#undef HAVE_ATTRIBUTE_weak
|
||||
|
||||
/* Define this to indicate the ${BKTR_DESCRIP} library */
|
||||
#undef HAVE_BKTR
|
||||
|
||||
|
||||
@@ -68,4 +68,10 @@
|
||||
/* Some older version of GNU gcc (3.3.5 on OpenBSD 4.3 for example) dont like 'NULL' as sentinel */
|
||||
#define SENTINEL ((char *)NULL)
|
||||
|
||||
#ifdef HAVE_ATTRIBUTE_weak
|
||||
#define attribute_weak __attribute__((weak))
|
||||
#else
|
||||
#define attribute_weak
|
||||
#endif
|
||||
|
||||
#endif /* _ASTERISK_COMPILER_H */
|
||||
|
||||
Reference in New Issue
Block a user