Add symbols for version information

This allows us to automatically pull the version of FS out of a core
file for better reporting of bugs.
This commit is contained in:
Travis Cross 2014-01-21 03:49:14 +00:00
parent 69d382c4f1
commit 4249def9c7
1 changed files with 15 additions and 7 deletions

View File

@ -36,12 +36,20 @@
#include <switch.h>
#include <switch_version.h>
SWITCH_DECLARE(const char *)switch_version_major(void) {return SWITCH_VERSION_MAJOR;}
SWITCH_DECLARE(const char *)switch_version_minor(void) {return SWITCH_VERSION_MINOR;}
SWITCH_DECLARE(const char *)switch_version_micro(void) {return SWITCH_VERSION_MICRO;}
const char *switch_version_major_str = SWITCH_VERSION_MAJOR;
const char *switch_version_minor_str = SWITCH_VERSION_MINOR;
const char *switch_version_micro_str = SWITCH_VERSION_MICRO;
const char *switch_version_revision_str = SWITCH_VERSION_REVISION;
const char *switch_version_revision_human_str = SWITCH_VERSION_REVISION_HUMAN;
const char *switch_version_full_str = SWITCH_VERSION_FULL;
const char *switch_version_full_human_str = SWITCH_VERSION_FULL_HUMAN;
SWITCH_DECLARE(const char *)switch_version_revision(void) {return SWITCH_VERSION_REVISION;}
SWITCH_DECLARE(const char *)switch_version_revision_human(void) {return SWITCH_VERSION_REVISION_HUMAN;}
SWITCH_DECLARE(const char *)switch_version_full(void) {return SWITCH_VERSION_FULL;}
SWITCH_DECLARE(const char *)switch_version_full_human(void) {return SWITCH_VERSION_FULL_HUMAN;}
SWITCH_DECLARE(const char *)switch_version_major(void) {return switch_version_major_str;}
SWITCH_DECLARE(const char *)switch_version_minor(void) {return switch_version_minor_str;}
SWITCH_DECLARE(const char *)switch_version_micro(void) {return switch_version_micro_str;}
SWITCH_DECLARE(const char *)switch_version_revision(void) {return switch_version_revision_str;}
SWITCH_DECLARE(const char *)switch_version_revision_human(void) {return switch_version_revision_human_str;}
SWITCH_DECLARE(const char *)switch_version_full(void) {return switch_version_full_str;}
SWITCH_DECLARE(const char *)switch_version_full_human(void) {return switch_version_full_human_str;}