@@ -3,9 +3,7 @@
#include "hdef.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
+BEGIN_EXTERN_C
//---------------------safe alloc/free---------------------------
extern unsigned int g_alloc_cnt;
@@ -71,8 +69,6 @@ char* safe_strncat(char* dest, const char* src, size_t n);
// 1 y on yes true enable
bool getboolean(const char* str);
-} // extern "C"
+END_EXTERN_C
#endif // HV_BASE_H_
@@ -4,6 +4,8 @@
#include "hplatform.h"
#include "htime.h"
+
#ifdef _MSC_VER
#define hmutex_t CRITICAL_SECTION
#define hmutex_init InitializeCriticalSection
@@ -186,6 +188,8 @@ static inline int hsem_wait_for(hsem_t* sem, unsigned int ms) {
#endif
#ifdef __cplusplus
#include <mutex>
#include <condition_variable>
@@ -1,13 +1,11 @@
#ifndef HV_TIME_H_
#define HV_TIME_H_
-
#define SECONDS_PER_HOUR 3600
#define SECONDS_PER_DAY 86400 // 24*3600
#define SECONDS_PER_WEEK 604800 // 7*24*3600
@@ -112,8 +110,6 @@ const char* weekday_itoa(int weekday);
datetime_t hv_compile_datetime();
#endif // HV_TIME_H_
@@ -1,12 +1,10 @@
#ifndef HV_VERSION_H_
#define HV_VERSION_H_
#define HV_VERSION_MAJOR 1
#define HV_VERSION_MINOR 20
#define HV_VERSION_PATCH 3
@@ -30,8 +28,6 @@ int version_atoi(const char* str);
// 0x01020304 => 1.2.3.4
void version_itoa(int hex, char* str);
#endif // HV_VERSION_H_