gcontini
2019-11-23 f5106362b82b035dcd8e487d755316e886de3440
src/library/base/base.h
@@ -27,16 +27,26 @@
#endif
#endif
/* #define _DEBUG */
// license file parameters
#define PARAM_EXPIRY_DATE "valid-to"
#define PARAM_BEGIN_DATE "valid-from"
#define PARAM_VERSION_FROM "start-version"
#define PARAM_CLIENT_SIGNATURE "client-signature"
#define PARAM_VERSION_TO "end-version"
#define PARAM_EXTRA_DATA "extra-data"
// license file extra entries
#define LICENSE_SIGNATURE "sig"
#define LICENSE_VERSION "lic_ver"
typedef enum { FUNC_RET_OK, FUNC_RET_NOT_AVAIL, FUNC_RET_ERROR, FUNC_RET_BUFFER_TOO_SMALL } FUNCTION_RETURN;
#define cmin(a,b) \
   ({ __typeof__ (a) _a = (a); \
   ({                          \
      __typeof__(a) _a = (a); \
       __typeof__ (b) _b = (b); \
     _a < _b ? _a : _b; })
typedef enum  {
   FUNC_RET_OK, FUNC_RET_NOT_AVAIL, FUNC_RET_ERROR, FUNC_RET_BUFFER_TOO_SMALL
} FUNCTION_RETURN;
      _a < _b ? _a : _b;      \
   })
#ifdef __cplusplus
}