mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-15 13:58:32 +00:00
FS-10167: Basic building of libks under VS2015, tests compile but most do not run successfully yet.
This commit is contained in:
1 parent
856c87b4cb
commit
17f3daa7c3
15 files changed
+203
-23
No files matched your search
@@ -141,7 +141,7 @@ CJSON_PUBLIC(int) cJSON_GetArraySize(const cJSON *array);
|
||||
CJSON_PUBLIC(cJSON *) cJSON_GetArrayItem(const cJSON *array, int item);
|
||||
/* Get item "string" from object. Case insensitive. */
|
||||
CJSON_PUBLIC(cJSON *) cJSON_GetObjectItem(const cJSON *object, const char *string);
|
||||
CJSON_PUBLIC(cJSON *) cJSON_GetObjectItemCaseSensitive(const cJSON *object, const char *string);
|
||||
CJSON_PUBLIC(cJSON *) cJSON_GetObjectItemCaseSensitive(const cJSON * const object, const char * const string);
|
||||
CJSON_PUBLIC(int) cJSON_HasObjectItem(const cJSON *object, const char *string);
|
||||
/* For analysing failed parses. This returns a pointer to the parse error. You'll probably need to look a few chars back to make sense of it. Defined when cJSON_Parse() returns 0. 0 when cJSON_Parse() succeeds. */
|
||||
CJSON_PUBLIC(const char *) cJSON_GetErrorPtr(void);
|
||||
|
||||
@@ -73,6 +73,11 @@ KS_BEGIN_EXTERN_C
|
||||
KS_POLL_ERROR = (1 << 2)
|
||||
} ks_poll_t;
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#include <BaseTsd.h>
|
||||
typedef SSIZE_T ssize_t;
|
||||
#endif
|
||||
|
||||
typedef uint16_t ks_port_t;
|
||||
typedef size_t ks_size_t;
|
||||
typedef unsigned char ks_byte_t;
|
||||
|
||||
@@ -57,7 +57,7 @@ KS_DECLARE(char *) ks_uuid_str(ks_pool_t *pool, uuid_t *uuid)
|
||||
#ifdef __WINDOWS__
|
||||
unsigned char * str;
|
||||
UuidToStringA ( uuid, &str );
|
||||
uuidstr = ks_pstrdup(pool, str);
|
||||
uuidstr = ks_pstrdup(pool, (const char *)str);
|
||||
RpcStringFreeA ( &str );
|
||||
#else
|
||||
char str[37] = { 0 };
|
||||
@@ -129,7 +129,7 @@ KS_DECLARE(size_t) ks_rng_seed_data(uint8_t *seed, size_t length)
|
||||
}
|
||||
#ifdef __WINDOWS__
|
||||
if (crypt_provider) {
|
||||
if(!CryptGenRandom(crypt_provider, length, seed)) {
|
||||
if(!CryptGenRandom(crypt_provider, (DWORD)length, seed)) {
|
||||
return 0;
|
||||
}
|
||||
bytes = length;
|
||||
@@ -156,11 +156,11 @@ KS_DECLARE(size_t) ks_rng_add_entropy(const uint8_t *buffer, size_t length)
|
||||
}
|
||||
|
||||
if (buffer && length) {
|
||||
sha512_hash(buffer, length, &global_sha512);
|
||||
sha512_hash(buffer, (unsigned long)length, &global_sha512);
|
||||
}
|
||||
|
||||
if (len > 0) {
|
||||
sha512_hash(seed, len, &global_sha512);
|
||||
sha512_hash(seed, (unsigned long)len, &global_sha512);
|
||||
length += len;
|
||||
}
|
||||
|
||||
|
||||
@@ -123,8 +123,8 @@ KS_DECLARE(ks_status_t) ks_socket_option(ks_socket_t socket, int option_name, ks
|
||||
break;
|
||||
case IPV6_V6ONLY:
|
||||
#ifdef WIN32
|
||||
#warning make sure windows works like linux for IPV6 to IPV4 automapping stuff
|
||||
result = setsockopt(socket, SOL_IPV6, IPV6_V6ONLY, (char *)&opt, sizeof(opt));
|
||||
//#warning make sure windows works like linux for IPV6 to IPV4 automapping stuff
|
||||
result = setsockopt(socket, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&opt, sizeof(opt));
|
||||
#else
|
||||
result = setsockopt(socket, SOL_IPV6, IPV6_V6ONLY, &opt, sizeof(opt));
|
||||
#endif
|
||||
|
||||
@@ -43,7 +43,7 @@ KS_DECLARE(ks_pid_t) ks_thread_self_id(void)
|
||||
{
|
||||
#ifdef WIN32
|
||||
return GetCurrentThreadId();
|
||||
#elseif gettid
|
||||
#elif gettid
|
||||
return gettid();
|
||||
#else
|
||||
return syscall(SYS_gettid);
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
/* SimCList implementation, version 1.6 */
|
||||
#include <ks.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -30,7 +31,7 @@
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#include <Windows.h>
|
||||
//#include <Windows.h>
|
||||
#endif
|
||||
#ifndef SIMCLIST_NO_DUMPRESTORE
|
||||
/* includes for dump/restore */
|
||||
|
||||
Reference in new issue
Block a user