mirror of
https://github.com/ksherlock/mpw.git
synced 2024-11-29 15:49:31 +00:00
solaris updates.
This commit is contained in:
parent
5daebb35b6
commit
95c018da0c
@ -21,13 +21,13 @@ if (APPLE)
|
||||
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")
|
||||
set(CMAKE_CXX_FLAGS "-std=c++14 -Wall -g -Wno-unknown-pragmas")
|
||||
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")
|
||||
set(CMAKE_CXX_FLAGS "-std=c++14 -Wall -g -Wno-unknown-pragmas")
|
||||
set(CMAKE_C_FLAGS "-std=c99 -Wall -g")
|
||||
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Windows")
|
||||
|
||||
endif()
|
||||
|
28
config.h
Normal file
28
config.h
Normal file
@ -0,0 +1,28 @@
|
||||
#ifndef __mpw_config_h__
|
||||
#define __mpw_config_h__
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <machine/endian.h>
|
||||
|
||||
#define HAVE_STAT_ST_BIRTHTIME
|
||||
#define HAVE_DIRENT_D_NAMLEN
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __sun__
|
||||
#include <endian.h>
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __linux__
|
||||
#include <endian.h>
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
@ -54,6 +54,8 @@
|
||||
#include <macos/errors.h>
|
||||
#include <macos/traps.h>
|
||||
|
||||
#include <config.h>
|
||||
|
||||
// yuck. TST.W d0
|
||||
extern "C" void cpuSetFlagsNZ00NewW(UWO res);
|
||||
|
||||
@ -102,7 +104,7 @@ namespace {
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
inline constexpr uint16_t host_to_big_endian_16(uint16_t x)
|
||||
{
|
||||
return __builtin_bswap16(x);
|
||||
return (x << 8) | (x >> 8); // __builtin_bswap16(x);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -55,6 +55,8 @@
|
||||
#include "stackframe.h"
|
||||
#include "fs_spec.h"
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <native/native.h>
|
||||
|
||||
using ToolBox::Log;
|
||||
@ -381,6 +383,8 @@ namespace OS {
|
||||
}
|
||||
#ifdef HAVE_DIRENT_D_NAMLEN
|
||||
if (dir->d_namlen > 255) continue; // too long!
|
||||
#else
|
||||
if (strlen(dir->d_name) > 255) continue;
|
||||
#endif
|
||||
if (--ioFDirIndex == 0) break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user