diff options
Diffstat (limited to 'platform/src/proxy.cpp')
| -rw-r--r-- | platform/src/proxy.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/platform/src/proxy.cpp b/platform/src/proxy.cpp index 8847b90..c6b778c 100644 --- a/platform/src/proxy.cpp +++ b/platform/src/proxy.cpp @@ -45,6 +45,25 @@ struct tfe_proxy * g_default_proxy = NULL; thread_local unsigned int __currect_thread_id = 0; thread_local void * __currect_default_logger = NULL; +#define TFE_VAR_VERSION_CATTER(v) static __attribute__((__used__)) const char * TFE_VERSION_version_##v = NULL +#define TFE_VAR_VERSION_EXPEND(v) TFE_VAR_VERSION_CATTER(v) + +/* VERSION TAG */ +#ifdef TFE_VAR_VERSION +TFE_VAR_VERSION_EXPEND(TFE_VAR_VERSION); +#else +static __attribute__((__used__)) const char * TFE_VERSION_version_UNKNOWN = NULL; +#endif +#undef TFE_VAR_VERSION_CATTER +#undef TFE_VAR_VERSION_EXPEND + +/* VERSION STRING */ +#ifdef TFE_GIT_VERSION +static __attribute__((__used__)) const char * tfe_version = TFE_GIT_VERSION; +#else +static __attribute__((__used__)) const char * tfe_version = "Unknown"; +#endif + struct tfe_thread_ctx * tfe_proxy_thread_ctx_acquire(struct tfe_proxy * ctx) { unsigned int min_thread_id = 0; |
