summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2005-06-06 20:27:51 +0000
committerKevin P. Fleming <kpfleming@digium.com>2005-06-06 20:27:51 +0000
commit0e6762dd5f01e10d2e8d6ae5252caac1315828ef (patch)
tree2caa31e5bbb676cf8588f73516608ecef258757b /include
parent6cbf69981d7efbdb6ff30fb3c7511f61573578d4 (diff)
remove experimental module version tags
add per-file revision tags and 'show version files' CLI command git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rwxr-xr-xinclude/asterisk.h23
-rwxr-xr-xinclude/asterisk/linkedlists.h8
-rwxr-xr-xinclude/asterisk/module.h4
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 */