diff --git a/src/core/platform.h b/src/core/platform.h index 0dd62ce..7a5ffcf 100644 --- a/src/core/platform.h +++ b/src/core/platform.h @@ -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) diff --git a/src/core/unixfsservices.cpp b/src/core/unixfsservices.cpp index 934196f..0f91d1e 100644 --- a/src/core/unixfsservices.cpp +++ b/src/core/unixfsservices.cpp @@ -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; diff --git a/src/twtest/fcocompare_t.cpp b/src/twtest/fcocompare_t.cpp index 686665e..f4580ba 100644 --- a/src/twtest/fcocompare_t.cpp +++ b/src/twtest/fcocompare_t.cpp @@ -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()); diff --git a/src/twtest/tchar_t.cpp b/src/twtest/tchar_t.cpp index 36006d6..9bcc5d0 100644 --- a/src/twtest/tchar_t.cpp +++ b/src/twtest/tchar_t.cpp @@ -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");