/**
* collectd - src/libcollectdclient/network_buffer.c
- * Copyright (C) 2010-2012 Florian octo Forster
+ * Copyright (C) 2010-2014 Florian octo Forster
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* Florian octo Forster <octo at collectd.org>
**/
-#include "config.h"
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#if WIN32
+
+#include <windows.h>
+#include <math.h>
+#include <assert.h>
+
+#else
#include <stdlib.h>
#include <string.h>
GCRY_THREAD_OPTION_PTHREAD_IMPL;
#endif
+#endif /* !WIN32 */
+
#include "collectd/network_buffer.h"
#define TYPE_HOST 0x0000
#define PART_SIGNATURE_SHA256_SIZE 36
#define PART_ENCRYPTION_AES256_SIZE 42
+#ifndef ENOTSUP
+# define ENOTSUP -1
+#endif
+
#define ADD_GENERIC(nb,srcptr,size) do { \
assert ((size) <= (nb)->free); \
memcpy ((nb)->ptr, (srcptr), (size)); \
return (0);
} /* }}} int nb_add_value_list */
+/* TODO: Add encryption for Windows */
#if HAVE_LIBGCRYPT
static int nb_add_signature (lcc_network_buffer_t *nb) /* {{{ */
{