新增根据git记录自动生成GIT_VERSION变量的代码
This commit is contained in:
@@ -17,7 +17,29 @@ typedef struct log_handle_t
|
||||
|
||||
#define LOGMSG_MAX_LEN 4096
|
||||
|
||||
const int HANDLE_LOGGER_VERSION_20190218 = 1;
|
||||
//const int HANDLE_LOGGER_VERSION_20190218 = 1;
|
||||
|
||||
#define GIT_VERSION_CATTER(v) __attribute__((__used__)) const char * GIT_VERSION_##v = NULL
|
||||
#define GIT_VERSION_EXPEND(v) GIT_VERSION_CATTER(v)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/* VERSION TAG */
|
||||
#ifdef GIT_VERSION
|
||||
GIT_VERSION_EXPEND(GIT_VERSION);
|
||||
#else
|
||||
static __attribute__((__used__)) const char * GIT_VERSION_UNKNOWN = NULL;
|
||||
#endif
|
||||
#undef GIT_VERSION_CATTER
|
||||
#undef GIT_VERSION_EXPEND
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static unsigned char weekday_str[7][4] =
|
||||
{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
|
||||
|
||||
Reference in New Issue
Block a user