Fix build issues cross compiling for RISC OS (haven't verified we actually work yet, though); fix a couple of build issues left over from recent test-dir changes to twtest

This commit is contained in:
brc0x1 2017-08-24 19:20:40 -07:00
parent bd3b071e1b
commit 8cec86246f
4 changed files with 14 additions and 12 deletions

View File

@ -80,6 +80,7 @@
#define OS_MINT 0x0507
#define OS_AROS 0x0508
#define OS_RTEMS 0x0509
#define OS_RISCOS 0x050A
#define COMP_UNKNOWN 0
#define COMP_GCC 0x0001
@ -209,14 +210,15 @@
#elif defined(__AROS__)
#define OS OS_AROS
#define IS_AROS 1
#elif defined(__rtems__)
#define OS OS_RTEMS
#define IS_RTEMS 1
#else
// OK for OS not to resolve, it's being phased out.
// #error Unknown OS
#elif defined(__riscos__)
#define OS OS_RISCOS
#define IS_RISCOS 1
#endif
@ -300,7 +302,7 @@
#define SUPPORTS_ST_BLOCKS (!IS_DOS_DJGPP)
#define SUPPORTS_POSIX_SIGNALS (!IS_DOS_DJGPP)
#define SUPPORTS_NETWORKING (!IS_SORTIX && !IS_DOS_DJGPP)
#define SUPPORTS_SYSLOG (HAVE_SYSLOG_H && !IS_SKYOS)
#define SUPPORTS_SYSLOG (HAVE_SYSLOG_H && !IS_SKYOS && !IS_RISCOS)
#define NEEDS_SWAB_IMPL (IS_SYLLABLE || IS_ANDROID || IS_SORTIX)
#define USES_MBLEN (!IS_ANDROID && !IS_AROS)
#define USES_DEVICE_PATH (IS_AROS || IS_DOS_DJGPP)

View File

@ -368,7 +368,7 @@ void cUnixFSServices::Stat( const TSTRING& strNameC, cFSStatArgs& stat) const
#ifdef S_IFDOOR
else if(S_ISDOOR(statbuf.st_mode)) stat.mFileType = cFSStatArgs::TY_DOOR;
#endif
#ifdef S_IFPORT
#ifdef S_ISPORT
else if(S_ISPORT(statbuf.st_mode)) stat.mFileType = cFSStatArgs::TY_PORT;
#endif
@ -599,7 +599,7 @@ void cUnixFSServices::ConvertModeToString( uint64 perm, TSTRING& tstrPerm ) cons
szPerm[0] = _T('D');
break;
#endif
#ifdef S_IFPORT
#ifdef S_ISPORT
case S_IFPORT:
szPerm[0] = _T('P');
break;

View File

@ -69,7 +69,7 @@ void TestFCOCompare()
// first, create an fco to compare with...
TOFSTREAM fstr(filename);
TOFSTREAM fstr(filename.c_str());
if(fstr.bad())
{
d.TraceError("Unable to create test file %s!\n", filename.c_str());
@ -109,7 +109,7 @@ void TestFCOCompare()
// change the file...
d.TraceDebug("Changing the file...\n");
fstr.open(filename);
fstr.open(filename.c_str());
if(fstr.bad())
{
d.TraceError("Unable to reopen %s!\n", filename.c_str());

View File

@ -94,16 +94,16 @@ void TestTCHAR()
//Set up the input file.
TOFSTREAM out;
out.open(inputfile, std::ios_base::out);
out.open(inputfile.c_str(), std::ios_base::out);
out<<"Unicode is fun\n";
out.close();
TIFSTREAM from;
from.open(inputfile, std::ios_base::in);
from.open(inputfile.c_str(), std::ios_base::in);
if(!from)
d.TraceDetail("error opening input file\n");
TOFSTREAM to(outputfile, std::ios_base::trunc);
TOFSTREAM to(outputfile.c_str(), std::ios_base::trunc);
if(!to)
d.TraceDetail("error opening output file\n");