compile on windows
This commit is contained in:
parent
dffc4d317f
commit
8318aa1418
|
@ -20,6 +20,8 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "tdef.h"
|
||||||
|
|
||||||
// If the error is in a third-party library, place this header file under the third-party library header file.
|
// If the error is in a third-party library, place this header file under the third-party library header file.
|
||||||
// When you want to use this feature, you should find or add the same function in the following section.
|
// When you want to use this feature, you should find or add the same function in the following section.
|
||||||
#ifndef ALLOW_FORBID_FUNC
|
#ifndef ALLOW_FORBID_FUNC
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
#include "taos_metric_t.h"
|
#include "taos_metric_t.h"
|
||||||
#include "taos_string_builder_i.h"
|
#include "taos_string_builder_i.h"
|
||||||
|
|
||||||
#include <sys/time.h>
|
|
||||||
|
|
||||||
taos_metric_formatter_t *taos_metric_formatter_new() {
|
taos_metric_formatter_t *taos_metric_formatter_new() {
|
||||||
taos_metric_formatter_t *self = (taos_metric_formatter_t *)taos_malloc(sizeof(taos_metric_formatter_t));
|
taos_metric_formatter_t *self = (taos_metric_formatter_t *)taos_malloc(sizeof(taos_metric_formatter_t));
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdatomic.h>
|
//#include <stdatomic.h>
|
||||||
|
|
||||||
// Public
|
// Public
|
||||||
#include "taos_alloc.h"
|
#include "taos_alloc.h"
|
||||||
|
@ -30,7 +30,7 @@ taos_metric_sample_t *taos_metric_sample_new(taos_metric_type_t type, const char
|
||||||
taos_metric_sample_t *self = (taos_metric_sample_t *)taos_malloc(sizeof(taos_metric_sample_t));
|
taos_metric_sample_t *self = (taos_metric_sample_t *)taos_malloc(sizeof(taos_metric_sample_t));
|
||||||
self->type = type;
|
self->type = type;
|
||||||
self->l_value = taos_strdup(l_value);
|
self->l_value = taos_strdup(l_value);
|
||||||
self->r_value = ATOMIC_VAR_INIT(r_value);
|
self->r_value = 0;
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue