Windows Port:

- Fix compiling issues on Visual Studio 2015.
This commit is contained in:
rogerman 2015-08-26 03:06:37 +00:00
parent 2967cd2c62
commit 5a6590ff49
3 changed files with 19 additions and 12 deletions

View File

@ -1573,7 +1573,7 @@ createStub_gdb( uint16_t port,
if ( temp_sock != -1) {
/* create a thread to connect to this socket */
temp_thread = CreateThread( NULL, 0, control_creator, &temp_data, 0, &temp_threadID);
temp_thread = CreateThread( NULL, 0, (LPTHREAD_START_ROUTINE)control_creator, &temp_data, 0, &temp_threadID);
if ( temp_thread != INVALID_HANDLE_VALUE) {
struct sockaddr_in ignore_addr;
int addr_size = sizeof( ignore_addr);

View File

@ -25,13 +25,17 @@
#ifndef _GDBSTUB_INTERNAL_H_
#define _GDBSTUB_INTERNAL_H_ 1
#ifdef WIN32
typedef __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef __int16 int16_t;
typedef unsigned __int16 uint16_t;
typedef __int8 int8_t;
typedef unsigned __int8 uint8_t;
#if defined(_MSC_VER)
#if _MSC_VER < 1900
typedef __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef __int16 int16_t;
typedef unsigned __int16 uint16_t;
typedef __int8 int8_t;
typedef unsigned __int8 uint8_t;
#else
#include <stdint.h>
#endif
#include <winsock2.h>
#define SOCKET_TYPE SOCKET

View File

@ -95,11 +95,14 @@
#endif
#ifdef _MSC_VER
#define strcasecmp(x,y) _stricmp(x,y)
#define strncasecmp(x, y, l) strnicmp(x, y, l)
#define snprintf _snprintf
#define strcasecmp(x,y) _stricmp(x,y)
#define strncasecmp(x, y, l) strnicmp(x, y, l)
#if _MSC_VER < 1900
#define snprintf _snprintf
#endif
#else
#define WINAPI
#define WINAPI
#endif
#if !defined(MAX_PATH)