Differences From Artifact [b0cc705195]:
- File
src/OFStdIOStream.m
— part of check-in
[614c6678e8]
at
2017-05-27 14:45:24
on branch trunk
— OFStdIOStream: Use AmigaDOS directly on MorphOS
This is necessary for using -noixemul. (user: js, size: 5341) [annotate] [blame] [check-ins using]
To Artifact [37f14b4e93]:
- File src/OFStdIOStream.m — part of check-in [4258b6f227] at 2017-05-28 12:54:40 on branch trunk — Only use AmigaDOS directly when not using ixemul (user: js, size: 5422) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
35 36 37 38 39 40 41 | # include "OFStdIOStream_Win32Console.h" #endif #import "OFOutOfRangeException.h" #import "OFReadFailedException.h" #import "OFWriteFailedException.h" | | | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | # include "OFStdIOStream_Win32Console.h" #endif #import "OFOutOfRangeException.h" #import "OFReadFailedException.h" #import "OFWriteFailedException.h" #if defined(OF_MORPHOS) && !defined(OF_IXEMUL) # define BOOL EXEC_BOOL # include <exec/execbase.h> # include <proto/dos.h> # undef BOOL # define INVALID_FD 0 # define getpid() ((int)SysBase->ThisTask) |
︙ | ︙ | |||
94 95 96 97 98 99 100 | objc_autoreleasePoolPop(pool); } @implementation OFStdIOStream #ifndef OF_WINDOWS + (void)load { | | | 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | objc_autoreleasePoolPop(pool); } @implementation OFStdIOStream #ifndef OF_WINDOWS + (void)load { # if !defined(OF_MORPHOS) || defined(OF_IXEMUL) of_stdin = [[OFStdIOStream alloc] of_initWithFileDescriptor: 0]; of_stdout = [[OFStdIOStream alloc] of_initWithFileDescriptor: 1]; of_stderr = [[OFStdIOStream alloc] of_initWithFileDescriptor: 2]; # else of_stdin = [[OFStdIOStream alloc] of_initWithFileDescriptor: Input()]; of_stdout = [[OFStdIOStream alloc] of_initWithFileDescriptor: Output()]; of_stderr = [[OFStdIOStream alloc] of_initWithFileDescriptor: Output()]; |
︙ | ︙ | |||
184 185 186 187 188 189 190 | if (write(_fd, buffer, (int)length) != (int)length) @throw [OFWriteFailedException exceptionWithObject: self requestedLength: length errNo: errno]; #endif } | | | 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | if (write(_fd, buffer, (int)length) != (int)length) @throw [OFWriteFailedException exceptionWithObject: self requestedLength: length errNo: errno]; #endif } #if !defined(OF_WINDOWS) && (!defined(OF_MORPHOS) || defined(OF_IXEMUL)) - (int)fileDescriptorForReading { return _fd; } - (int)fileDescriptorForWriting { |
︙ | ︙ |