diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-06-06 20:27:51 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-06-06 20:27:51 +0000 |
commit | b2cbb6a75dfc8ea70554192ea223c3bd5dd52ed8 (patch) | |
tree | 2caa31e5bbb676cf8588f73516608ecef258757b /include | |
parent | 2d6a1fbb231a5e8e082a2172a31d8def4a6e9607 (diff) |
remove experimental module version tags
add per-file revision tags and 'show version files' CLI command
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5864 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rwxr-xr-x | include/asterisk.h | 23 | ||||
-rwxr-xr-x | include/asterisk/linkedlists.h | 8 | ||||
-rwxr-xr-x | include/asterisk/module.h | 4 |
3 files changed, 25 insertions, 10 deletions
diff --git a/include/asterisk.h b/include/asterisk.h index b4b26a775..0e9d2e365 100755 --- a/include/asterisk.h +++ b/include/asterisk.h @@ -3,9 +3,9 @@ * * General Definitions for Asterisk top level program * - * Copyright (C) 1999, Mark Spencer + * Copyright (C) 1999-2005, Mark Spencer * - * Mark Spencer <markster@linux-support.net> + * Mark Spencer <markster@digium.com> * * This program is free software, distributed under the terms of * the GNU General Public License @@ -54,4 +54,21 @@ extern void ast_channels_init(void); extern int dnsmgr_init(void); extern void dnsmgr_reload(void); -#endif +void ast_register_file_version(const char *file, const char *version); +void ast_unregister_file_version(const char *file); + +#ifdef __GNUC__ +#define ASTERISK_FILE_VERSION(x) \ + static void __attribute__((constructor)) __register_file_version(void) \ + { \ + ast_register_file_version(__FILE__, x); \ + } \ + static void __attribute__((destructor)) __unregister_file_version(void) \ + { \ + ast_unregister_file_version(__FILE__); \ + } +#else /* ! __GNUC__ */ +#define ASTERISK_FILE_VERSION(x) static const char __file_version[] = x; +#endif /* __GNUC__ */ + +#endif /* _ASTERISK_H */ diff --git a/include/asterisk/linkedlists.h b/include/asterisk/linkedlists.h index d90365920..9f5f216fd 100755 --- a/include/asterisk/linkedlists.h +++ b/include/asterisk/linkedlists.h @@ -66,14 +66,14 @@ struct name { \ Example usage: \code - static AST_LIST_HEAD_STATIC(entry_list, entry) entries; + static AST_LIST_HEAD_STATIC(entry_list, entry); \endcode - This would define \c struct \c entry_list, and declare an instance of it named - \a entries, all intended to hold a list of type \c struct \c entry. + This would define \c struct \c entry_list, intended to hold a list of + type \c struct \c entry. */ #define AST_LIST_HEAD_STATIC(name, type) \ -struct name { \ +struct name { \ struct type *first; \ ast_mutex_t lock; \ } name = { \ diff --git a/include/asterisk/module.h b/include/asterisk/module.h index c674d16ae..4889550a1 100755 --- a/include/asterisk/module.h +++ b/include/asterisk/module.h @@ -66,8 +66,6 @@ char *key(void); /*! Return the below mentioned key, unmodified */ */ int reload(void); /*! reload configs */ -const char *version(void); - #define ASTERISK_GPL_KEY \ "This paragraph is Copyright (C) 2000, Linux Support Services, Inc. \ In order for your module to load, it must return this key via a function \ @@ -116,7 +114,7 @@ void ast_update_use_count(void); * For each of the modules loaded, modentry will be executed with the resource, description, * version, and usecount values of each particular module. */ -int ast_update_module_list(int (*modentry)(const char *module, const char *description, int usecnt, const char *version, const char *like), +int ast_update_module_list(int (*modentry)(const char *module, const char *description, int usecnt, const char *like), const char *like); /*! Ask this procedure to be run with modules have been updated */ |