Overview
Comment: | Include unistd.h on MorphOS + libnix
It turns out that including unistd.h does work when defining BOOL to |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
cb450cb1bd65c544c2f09a764db11bf0 |
User & Date: | js on 2017-06-03 15:03:27 |
Other Links: | manifest | tags |
Context
2017-06-03
| ||
15:57 | -[OFApplication environment] for MorphOS + libnix check-in: 6d0a185364 user: js tags: trunk | |
15:03 | Include unistd.h on MorphOS + libnix check-in: cb450cb1bd user: js tags: trunk | |
14:37 | OFFileManager: Mask modes to ensure safe modes check-in: 4175b93242 user: js tags: trunk | |
Changes
Modified src/OFStdIOStream.m from [f28a278b7e] to [26c295bea1].
︙ | ︙ | |||
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; } |
︙ | ︙ |
Modified src/unistd_wrapper.h from [892d1c3341] to [33a8d48723].
︙ | ︙ | |||
15 16 17 18 19 20 21 | #include "config.h" #include <stdlib.h> /* Make sure we have any libc include */ #import "platform.h" | > > > > > > | | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | #include "config.h" #include <stdlib.h> /* Make sure we have any libc include */ #import "platform.h" #if defined(OF_MORPHOS) && !defined(OF_IXEMUL) # define BOOL EXEC_BOOL # include <exec/types.h> # undef BOOL #endif #if defined(HAVE_UNISTD_H) # ifdef __GLIBC__ # undef __USE_XOPEN /* Needed to avoid old glibc using __block */ # endif # include <unistd.h> # ifdef __GLIBC__ # define __USE_XOPEN 1 # endif #endif |