Differences From Artifact [f28a278b7e]:
- File src/OFStdIOStream.m — part of check-in [c5c3df3abe] at 2017-05-30 22:01:45 on branch trunk — MorphOS: Name variable handle instead of fd (user: js, size: 7200) [annotate] [blame] [check-ins using]
To Artifact [26c295bea1]:
- File
src/OFStdIOStream.m
— part of check-in
[cb450cb1bd]
at
2017-06-03 15:03:27
on branch trunk
— Include unistd.h on MorphOS + libnix
It turns out that including unistd.h does work when defining BOOL to
something else. (user: js, size: 7118) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
37 38 39 40 41 42 43 | #import "OFOutOfRangeException.h" #import "OFReadFailedException.h" #import "OFWriteFailedException.h" #if defined(OF_MORPHOS) && !defined(OF_IXEMUL) # define BOOL EXEC_BOOL | | < < | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | #import "OFOutOfRangeException.h" #import "OFReadFailedException.h" #import "OFWriteFailedException.h" #if defined(OF_MORPHOS) && !defined(OF_IXEMUL) # define BOOL EXEC_BOOL # include <proto/exec.h> # include <proto/dos.h> # undef BOOL #endif /* References for static linking */ #ifdef OF_WINDOWS void _reference_to_OFStdIOStream_Win32Console(void) { |
︙ | ︙ | |||
99 100 101 102 103 104 105 | { # 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 BPTR input = Input(), output = Output(); | | | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | { # 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 BPTR input = Input(), output = Output(); BPTR error = ((struct Process *)FindTask(NULL))->pr_CES; bool inputClosable = false, outputClosable = false, errorClosable = false; if (input == 0) { input = Open("*", MODE_OLDFILE); inputClosable = true; } |
︙ | ︙ |