fixes for solaris

This commit is contained in:
Kelvin Sherlock 2016-08-02 17:12:15 -04:00
parent fd23d9ab21
commit dce8bc8b02
17 changed files with 48 additions and 43 deletions

View File

@ -1,10 +1,36 @@
set(CMAKE_C_COMPILER "clang")
set(CMAKE_CXX_COMPILER "clang++")
set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ -Wall -g")
set(CMAKE_C_FLAGS " -Wall -g")
project(mpw)
cmake_minimum_required(VERSION 2.6)
project(mpw)
set (PROJECT_TYPE "CXX")
set (PROJECT_NAME "mpw")
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_CXX_EXTENSIONS FALSE)
if (APPLE)
set(CMAKE_C_COMPILER "clang")
set(CMAKE_CXX_COMPILER "clang++")
set(CMAKE_CXX_FLAGS "-stdlib=libc++ -Wall -g")
set(CMAKE_C_FLAGS " -Wall -g")
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "SunOS")
set(CMAKE_C_COMPILER "gcc")
set(CMAKE_CXX_COMPILER "g++")
set(CMAKE_CXX_FLAGS "-std=c++14 -Wall -g")
set(CMAKE_C_FLAGS "-std=c99 -Wall -g")
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
set(CMAKE_C_COMPILER "gcc")
set(CMAKE_CXX_COMPILER "g++")
set(CMAKE_CXX_FLAGS "-std=c++14 -Wall -g")
set(CMAKE_C_FLAGS "-std=c99 -Wall -g")
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Windows")
endif()
#set_property (TARGET mpw PROPERTY CXX_STANDARD 14)
#set_property (TARGET mpw PROPERTY CXX_STANDARD_REQUIRED TRUE)
#set_property (TARGET mpw PROPERTY CXX_EXTENSIONS FALSE)
add_subdirectory(bin)
add_subdirectory(cpu)

View File

@ -1,7 +1,3 @@
#set(CMAKE_C_COMPILER "clang")
#set(CMAKE_CXX_COMPILER "clang++")
set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ -Wall -Wno-deprecated-declarations -g")
SET(CMAKE_EXE_LINKER_FLAGS "-framework Carbon")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
add_definitions(-I ${CMAKE_SOURCE_DIR}/)
@ -84,9 +80,9 @@ target_link_libraries(mpw MACOS_LIB)
set_target_properties(mpw PROPERTIES LINK_FLAGS "-ledit")
add_executable(disasm disasm.cpp)
target_link_libraries(disasm CPU_LIB)
target_link_libraries(disasm MACOS_LIB)
#add_executable(disasm disasm.cpp)
#target_link_libraries(disasm CPU_LIB)
#target_link_libraries(disasm MACOS_LIB)
install(
PROGRAMS

View File

@ -1,6 +1,6 @@
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_C_FLAGS " -Wall -Wno-unused-function -g")
set(CMAKE_C_FLAGS "-std=c99 -Wall -Wno-unused-function -g")
set(CPU_SRC
CpuModule.c

View File

@ -1,7 +1,5 @@
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ -Wall -g")
add_definitions(-I ${CMAKE_SOURCE_DIR}/)
set(MACOS_SRC traps.c sysequ.c errors.cpp)

View File

@ -1,8 +1,6 @@
set(CMAKE_INCLUDE_CURRENT_DIR ON)
add_definitions(-I ${CMAKE_SOURCE_DIR}/)
set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ -Wall -g")
set(NATIVE_SRC native.cpp ${CMAKE_SYSTEM_NAME}.cpp)
add_library(NATIVE_LIB ${NATIVE_SRC})

View File

@ -79,7 +79,7 @@ namespace native {
if (x == 32 || x == 16){
prodos_ftype_out(buffer);
memcpy(info, buffer, extended ? 32 : 16);
return 0;
return noErr;
}
}

View File

@ -26,10 +26,13 @@
#include "native_internal.h"
#include <string>
#include <algorithm>
#include <cctype>
#include <fcntl.h>
#include <unistd.h>
#include <strings.h>
using namespace MacOS;

View File

@ -1,7 +1,5 @@
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_FLAGS "-std=c++14 -stdlib=libc++ -Wall -Wno-deprecated-declarations -g")
add_definitions(-I ${CMAKE_SOURCE_DIR}/)
set(TOOLBOX_SRC

View File

@ -39,8 +39,8 @@
#include "toolbox.h"
#include "stackframe.h"
#include "RM.h"
#include "MM.h"
#include "rm.h"
#include "mm.h"
#include <macos/sysequ.h>

View File

@ -32,9 +32,7 @@
#include <deque>
#include <string>
#include <sys/xattr.h>
#include <sys/stat.h>
#include <sys/paths.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>

View File

@ -32,9 +32,7 @@
#include <deque>
#include <string>
#include <sys/xattr.h>
#include <sys/stat.h>
#include <sys/paths.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>

View File

@ -32,9 +32,7 @@
#include <deque>
#include <string>
#include <sys/xattr.h>
#include <sys/stat.h>
#include <sys/paths.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>

View File

@ -34,9 +34,7 @@
#include <map>
#include <type_traits>
#include <sys/xattr.h>
#include <sys/stat.h>
#include <sys/paths.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>

View File

@ -34,9 +34,7 @@
#include <string>
#include <cstring>
#include <sys/xattr.h>
#include <sys/stat.h>
#include <sys/paths.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
@ -381,7 +379,9 @@ namespace OS {
if (!strcmp(dir->d_name, ".")) continue;
if (!strcmp(dir->d_name, "..")) continue;
}
#ifdef HAVE_DIRENT_D_NAMLEN
if (dir->d_namlen > 255) continue; // too long!
#endif
if (--ioFDirIndex == 0) break;
}

View File

@ -33,9 +33,7 @@
#include <string>
#include <cstring>
#include <sys/xattr.h>
#include <sys/stat.h>
#include <sys/paths.h>
#include <stdlib.h>

View File

@ -38,13 +38,11 @@
#include <unistd.h>
#include <fcntl.h>
#include <sys/xattr.h>
#include <sys/attr.h>
#include <sys/paths.h>
#include <native/native.h>
#include <machine/endian.h>
//#include <machine/endian.h>
using ToolBox::Log;
using MacOS::macos_error_from_errno;

View File

@ -32,9 +32,7 @@
#include <deque>
#include <string>
#include <sys/xattr.h>
#include <sys/stat.h>
#include <sys/paths.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>