mirror of https://github.com/ksherlock/mpw.git
windows updates...
This commit is contained in:
parent
d5ee48108c
commit
9eaff93985
|
@ -8,3 +8,4 @@ docs/
|
|||
MrC/
|
||||
testing/
|
||||
|
||||
build-msvc/
|
||||
|
|
|
@ -24,7 +24,9 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
|||
add_compile_options(-g -Wall -Wno-unknown-pragmas -Wno-multichar)
|
||||
|
||||
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||
|
||||
add_compile_options(/wd4996 /wd4068)
|
||||
include_directories(winclude)
|
||||
set(HAVE_ENDIAN_H 1)
|
||||
endif()
|
||||
|
||||
|
||||
|
|
|
@ -328,6 +328,9 @@ void help()
|
|||
printf(" --memory-stats print memory usage information\n");
|
||||
printf(" --ram=<number> set the ram size. Default=16M\n");
|
||||
printf(" --stack=<number> set the stack size. Default=8K\n");
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
printf(" --debugger Enable debug shell\n");
|
||||
#endif
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
|
|
|
@ -14,4 +14,9 @@
|
|||
#cmakedefine HAVE_SYS_ENDIAN_H
|
||||
#cmakedefine HAVE_BSD_STRING_H
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
typedef long ssize_t;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
if (MSVC)
|
||||
else()
|
||||
add_compile_options(-g -Wall -Wno-unused-function)
|
||||
endif()
|
||||
|
||||
set(CPU_SRC
|
||||
CpuModule.c
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
#ifndef __winclude_endian_h__
|
||||
#define __winclude_endian_h__
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
# define LITTLE_ENDIAN 1234
|
||||
# define BIG_ENDIAN 4321
|
||||
# define PDP_ENDIAN 3412
|
||||
# define BYTE_ORDER LITTLE_ENDIAN
|
||||
|
||||
#endif
|
|
@ -0,0 +1,10 @@
|
|||
#ifndef __winclude_unistd_h__
|
||||
#define __winclude_unistd_h__
|
||||
|
||||
#include <io.h>
|
||||
|
||||
#define ftruncate(a,b) chsize(a,b)
|
||||
|
||||
typedef long ssize_t;
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue