diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2005-06-07 16:07:06 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2005-06-07 16:07:06 +0000 |
commit | 01251090f09d680b5c4c4f5c64758aa6a3b72552 (patch) | |
tree | fcae9a796fc99d87f7efd952d417a06b2ae3eef1 | |
parent | cf5b8dba961296ebe21fe8bb47e50f5831034409 (diff) |
fix version-string builds for non-gcc compilers
don't build version-string stuff for LOW_MEMORY builds
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5873 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rwxr-xr-x | asterisk.c | 4 | ||||
-rwxr-xr-x | include/asterisk.h | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/asterisk.c b/asterisk.c index 52992fc7c..e3daa1feb 100755 --- a/asterisk.c +++ b/asterisk.c @@ -152,6 +152,7 @@ static int shuttingdown = 0; static int restartnow = 0; static pthread_t consolethread = AST_PTHREADT_NULL; +#if !defined(LOW_MEMORY) struct file_version { AST_LIST_ENTRY(file_version) list; const char *file; @@ -277,6 +278,7 @@ static char *complete_show_version_files(char *line, char *word, int pos, int st return ret; } +#endif /* ! LOW_MEMORY */ int ast_register_atexit(void (*func)(void)) { @@ -1067,8 +1069,10 @@ static struct ast_cli_entry core_cli[] = { "Restart Asterisk at empty call volume", restart_when_convenient_help }, { { "!", NULL }, handle_bang, "Execute a shell command", bang_help }, +#if !defined(LOW_MEMORY) { { "show", "version", "files", NULL }, handle_show_version_files, "Show versions of files used to build Asterisk", show_version_files_help, complete_show_version_files }, +#endif /* ! LOW_MEMORY */ }; static int ast_el_read_char(EditLine *el, char *cp) diff --git a/include/asterisk.h b/include/asterisk.h index 8c748d99e..3b6f56590 100755 --- a/include/asterisk.h +++ b/include/asterisk.h @@ -97,7 +97,7 @@ void ast_unregister_file_version(const char *file); * not be present and CVS would expand the Revision keyword into the file's * revision number. */ -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(LOW_MEMORY) #define ASTERISK_FILE_VERSION(file, version) \ static void __attribute__((constructor)) __register_file_version(void) \ { \ @@ -107,8 +107,10 @@ void ast_unregister_file_version(const char *file); { \ ast_unregister_file_version(file); \ } -#else /* ! __GNUC__ */ -#define ASTERISK_FILE_VERSION(x) static const char __file_version[] = x; +#elif !defined(LOW_MEMORY) /* ! __GNUC__ && ! LOW_MEMORY*/ +#define ASTERISK_FILE_VERSION(file, x) static const char __file_version[] = x; +#else /* LOW_MEMORY */ +#define ASTERISK_FILE_VERSION(file, x) #endif /* __GNUC__ */ #endif /* _ASTERISK_H */ |