Update the debugger to work on Windows (#2684)
Changed the debugger-tcp.c file to include Windows specific socket handling code and mode user all components are compilable for Windows. Added appveyor configuration to build with and without debugger. JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
This commit is contained in:
@@ -19,11 +19,13 @@
|
||||
#define _XOPEN_SOURCE 500
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_TIME_H
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#elif defined (HAVE_TIME_H)
|
||||
#include <time.h>
|
||||
#elif defined (HAVE_UNISTD_H)
|
||||
#include <unistd.h>
|
||||
#endif /* HAVE_TIME_H */
|
||||
#endif /* WIN32 */
|
||||
|
||||
#include "jerryscript-port.h"
|
||||
#include "jerryscript-port-default.h"
|
||||
@@ -34,7 +36,9 @@
|
||||
*/
|
||||
void jerry_port_sleep (uint32_t sleep_time) /**< milliseconds to sleep */
|
||||
{
|
||||
#ifdef HAVE_TIME_H
|
||||
#ifdef WIN32
|
||||
Sleep (sleep_time);
|
||||
#elif defined (HAVE_TIME_H)
|
||||
struct timespec sleep_timespec;
|
||||
sleep_timespec.tv_sec = (time_t) sleep_time / 1000;
|
||||
sleep_timespec.tv_nsec = ((long int) sleep_time % 1000) * 1000000L;
|
||||
|
||||
Reference in New Issue
Block a user