diff --git a/Makefile b/Makefile index 37ecd7df4e..51290f2402 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ binr: w32: # TODO: add support for debian - ./configure --without-gmp --without-openssl --with-compiler=i486-mingw32-gcc --with-ostype=windows --host=i486-unknown-windows + ./configure --without-ssl --without-gmp --with-compiler=i486-mingw32-gcc --with-ostype=windows --host=i486-unknown-windows make w32dist: diff --git a/libr/cons/cons.c b/libr/cons/cons.c index 9eb2400506..0d8fde6a8b 100644 --- a/libr/cons/cons.c +++ b/libr/cons/cons.c @@ -22,7 +22,7 @@ static void break_signal(int sig) { static inline void r_cons_write (char *buf, int len) { #if __WINDOWS__ - r_cons_w32_print (buf); + r_cons_w32_print ((unsigned char *)buf); #else if (write (I.fdout, buf, len) == -1) { eprintf ("r_cons_write: write error\n"); @@ -54,8 +54,11 @@ R_API void r_cons_break_end() { #if __WINDOWS__ static HANDLE h; static BOOL __w32_control(DWORD type) { - if (type == CTRL_C_EVENT) + if (type == CTRL_C_EVENT) { break_signal (2); // SIGINT + return R_TRUE; + } + return R_FALSE; } #endif @@ -81,7 +84,7 @@ R_API RCons *r_cons_new () { I.term_raw.c_cc[VMIN] = 1; // Solaris stuff hehe #elif __WINDOWS__ h = GetStdHandle (STD_INPUT_HANDLE); - GetConsoleMode (h, &I.term_buf); + GetConsoleMode (h, (PDWORD) &I.term_buf); I.term_raw = 0; if (!SetConsoleCtrlHandler ((PHANDLER_ROUTINE)__w32_control, TRUE)) eprintf ("r_cons: Cannot set control console handler\n"); @@ -310,8 +313,8 @@ R_API void r_cons_set_raw(int is_raw) { if (is_raw) tcsetattr (0, TCSANOW, &I.term_raw); else tcsetattr (0, TCSANOW, &I.term_buf); #elif __WINDOWS__ - if (is_raw) SetConsoleMode (h, I.term_raw); - else SetConsoleMode (h, I.term_buf); + if (is_raw) SetConsoleMode (h, (DWORD)I.term_raw); + else SetConsoleMode (h, (DWORD)I.term_buf); #else #warning No raw console supported for this platform #endif diff --git a/libr/debug/p/libgdbwrap/include/revm.h b/libr/debug/p/libgdbwrap/include/revm.h index 57c2c0f695..d8b4f5db11 100644 --- a/libr/debug/p/libgdbwrap/include/revm.h +++ b/libr/debug/p/libgdbwrap/include/revm.h @@ -25,6 +25,7 @@ #define FALSE 0 #define ASSERT(x) // #define assert(x) // +#undef LOBYTE #define LOBYTE(_w) ((_w) & 0xff) #define NEXT_CHAR(_x) (_x+1) #define PROFILER_IN(fd,fun,line) // diff --git a/libr/rules.mk b/libr/rules.mk index f80aeb03b3..51f389c484 100644 --- a/libr/rules.mk +++ b/libr/rules.mk @@ -17,7 +17,11 @@ real_all all: ${LIBSO} ${LIBAR} ${EXTRA_TARGETS} SRC=$(subst .o,.c,$(OBJ)) +ifeq (${OSTYPE},gnulinux) LIBNAME=${LDFLAGS_SONAME}${LIBSO}.${VERSION} +else +LIBNAME=${LDFLAGS_SONAME}${LIBSO} +endif ifeq ($(WITHPIC),1) ${LIBSO}: ${OBJ}