Overview
Comment: | AmigaOS 4: Do not use libauto
libauto loads the libraries too late. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
d71abc5366018bcec333c2c6b3a0d6d8 |
User & Date: | js on 2018-08-17 01:17:14 |
Other Links: | manifest | tags |
Context
2018-08-18
| ||
17:01 | OFDNSResolver: Obtain name servers on AmigaOS 4 check-in: 3d67a890fb user: js tags: trunk | |
2018-08-17
| ||
01:17 | AmigaOS 4: Do not use libauto check-in: d71abc5366 user: js tags: trunk | |
2018-08-16
| ||
22:33 | Fix compilation for AmigaOS 4 check-in: 7413f500db user: js tags: trunk | |
Changes
Modified configure.ac from [bc2da8d75f] to [86aa9a8c41].
︙ | |||
49 50 51 52 53 54 55 | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | - - | dnl do not work properly in a library. AC_SUBST(AMIGA_LIB_CFLAGS, "-mcpu=68020 -fbaserel") AC_SUBST(AMIGA_LIB_LDFLAGS, "-mcpu=68020 -fbaserel -resident -nostartfiles") ]) ;; powerpc-*-amigaos*) |
︙ |
Modified src/OFApplication.m from [21f22d4085] to [db83d4326f].
︙ | |||
50 51 52 53 54 55 56 | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | + - + + + + + + + + | #if defined(OF_MACOS) # include <crt_externs.h> #elif defined(OF_WINDOWS) # include <windows.h> extern int _CRT_glob; extern void __wgetmainargs(int *, wchar_t ***, wchar_t ***, int, int *); #elif defined(OF_AMIGAOS) # ifdef OF_AMIGAOS4 |
︙ |
Modified src/OFFile.m from [41ccc7307b] to [4a58ba6ba6].
︙ | |||
54 55 56 57 58 59 60 | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | + - + + + + + + + + + + + | #ifdef OF_NINTENDO_DS # include <stdbool.h> # include <filesystem.h> #endif #ifdef OF_AMIGAOS # ifdef OF_AMIGAOS4 |
︙ | |||
101 102 103 104 105 106 107 108 109 110 111 112 113 114 | 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | + + + + + + + + | } OF_DESTRUCTOR() { for (of_file_handle_t iter = firstHandle; iter != NULL; iter = iter->next) Close(iter->handle); # ifdef OF_AMIGAOS4 if (IDOS != NULL) DropInterface(IDOS); if (DOSBase != NULL) CloseLibrary(DOSBase); # endif } #endif #ifndef OF_AMIGAOS static int parseMode(const char *mode) { |
︙ | |||
175 176 177 178 179 180 181 182 183 184 185 186 187 188 | 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | + + + + + + + + + + + | #endif #ifdef OF_NINTENDO_DS if (!nitroFSInit(NULL)) @throw [OFInitializationFailedException exceptionWithClass: self]; #endif #ifdef OF_AMIGAOS4 if ((DOSBase = OpenLibrary("dos.library", 36)) == NULL) @throw [OFInitializationFailedException exceptionWithClass: self]; if ((IDOS = (struct DOSIFace *) GetInterface(DOSBase, "main", 1, NULL)) == NULL) @throw [OFInitializationFailedException exceptionWithClass: self]; #endif } + (instancetype)fileWithPath: (OFString *)path mode: (OFString *)mode { return [[[self alloc] initWithPath: path mode: mode] autorelease]; |
︙ |
Modified src/OFFileManager.m from [197757a9e0] to [e01277d683].
︙ | |||
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | + + - + + + + + + + + + + | #import "OFSystemInfo.h" #import "OFURL.h" #import "OFURLHandler.h" #import "OFChangeCurrentDirectoryPathFailedException.h" #import "OFCopyItemFailedException.h" #import "OFGetCurrentDirectoryPathFailedException.h" #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" #import "OFMoveItemFailedException.h" #import "OFOutOfMemoryException.h" #import "OFOutOfRangeException.h" #import "OFRemoveItemFailedException.h" #import "OFRetrieveItemAttributesFailedException.h" #import "OFUndefinedKeyException.h" #import "OFUnsupportedProtocolException.h" #ifdef OF_WINDOWS # include <windows.h> # include <direct.h> # include <ntdef.h> #endif #ifdef OF_AMIGAOS # ifdef OF_AMIGAOS4 |
︙ | |||
105 106 107 108 109 110 111 112 113 114 115 116 117 118 | 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | + + + + + + + + | static bool dirChanged = false; static BPTR originalDirLock = 0; OF_DESTRUCTOR() { if (dirChanged) UnLock(CurrentDir(originalDirLock)); # ifdef OF_AMIGAOS4 if (IDOS != NULL) DropInterface(IDOS); if (DOSBase != NULL) CloseLibrary(DOSBase); # endif } #endif static id attributeForKeyOrException(of_file_attributes_t attributes, of_file_attribute_key_t key) { |
︙ | |||
126 127 128 129 130 131 132 133 134 135 136 137 138 139 | 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | + + + + + + + + + + + | } @implementation OFFileManager + (void)initialize { if (self != [OFFileManager class]) return; #ifdef OF_AMIGAOS4 if ((DOSBase = OpenLibrary("dos.library", 36)) == NULL) @throw [OFInitializationFailedException exceptionWithClass: self]; if ((IDOS = (struct DOSIFace *) GetInterface(DOSBase, "main", 1, NULL)) == NULL) @throw [OFInitializationFailedException exceptionWithClass: self]; #endif defaultManager = [[OFFileManager_default alloc] init]; } + (OFFileManager *)defaultManager { return defaultManager; |
︙ |
Modified src/OFLocale.m from [77de904e6c] to [6ed03ca549].
︙ | |||
26 27 28 29 30 31 32 | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | + + + - + + + + + + + + + + + + + + + + + + + + + + + + + | #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" #import "OFInvalidEncodingException.h" #import "OFOpenItemFailedException.h" #ifdef OF_AMIGAOS # ifdef OF_AMIGAOS4 # define __NOLIBBASE__ # define __NOGLOBALIFACE__ |
︙ |
Modified src/OFStdIOStream.m from [ecf0064eb3] to [c5d7e54168].
︙ | |||
32 33 34 35 36 37 38 39 40 41 42 43 44 | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | + + - + + + + + + + + + + + + + + + + + + | #import "OFStdIOStream+Private.h" #import "OFDate.h" #import "OFApplication.h" #ifdef OF_WINDOWS # include "OFStdIOStream_Win32Console.h" #endif #import "OFInitializationFailedException.h" #import "OFNotOpenException.h" #import "OFOutOfRangeException.h" #import "OFReadFailedException.h" #import "OFWriteFailedException.h" #ifdef OF_AMIGAOS # ifdef OF_AMIGAOS4 |
︙ | |||
101 102 103 104 105 106 107 | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | - + - + + + + + + + + + + + + + + + | + (void)load { # ifndef OF_AMIGAOS of_stdin = [[OFStdIOStream alloc] of_initWithFileDescriptor: 0]; of_stdout = [[OFStdIOStream alloc] of_initWithFileDescriptor: 1]; of_stderr = [[OFStdIOStream alloc] of_initWithFileDescriptor: 2]; # else |
︙ |
Modified src/OFThread.m from [757dd832c3] to [b00f8ab9a5].
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | + - + + + + + | # include <sched.h> #endif #include "unistd_wrapper.h" #include "platform.h" #ifdef OF_AMIGAOS # ifdef OF_AMIGAOS4 |
︙ | |||
83 84 85 86 87 88 89 90 91 92 93 94 95 96 | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | + + + + + + + + + + + + + + + | #ifdef OF_HAVE_ATOMIC_OPS # import "atomic.h" #endif #ifdef OF_DJGPP # define lrint(x) rint(x) #endif #ifdef OF_AMIGAOS4 extern struct ExecIFace *IExec; static struct Library *DOSBase = NULL; static struct DOSIFace *IDOS = NULL; OF_DESTRUCTOR() { if (IDOS != NULL) DropInterface(IDOS); if (DOSBase != NULL) CloseLibrary(DOSBase); } #endif #if defined(OF_HAVE_THREADS) # import "threading.h" static of_tlskey_t threadSelfKey; static OFThread *mainThread; |
︙ | |||
184 185 186 187 188 189 190 191 192 193 194 195 196 197 | 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | + + + + + + + + + + + + + + + | return nil; if (thread->_threadDictionary == nil) thread->_threadDictionary = [[OFMutableDictionary alloc] init]; return thread->_threadDictionary; } #elif defined(OF_AMIGAOS4) + (void)initialize { if (self != [OFThread class]) return; if ((DOSBase = OpenLibrary("dos.library", 36)) == NULL) @throw [OFInitializationFailedException exceptionWithClass: self]; if ((IDOS = (struct DOSIFace *) GetInterface(DOSBase, "main", 1, NULL)) == NULL) @throw [OFInitializationFailedException exceptionWithClass: self]; } #endif #ifdef OF_HAVE_SOCKETS + (OFDNSResolver *)DNSResolver { # ifdef OF_HAVE_THREADS OFThread *thread = of_tlskey_get(threadSelfKey); |
︙ |
Modified src/OFURLHandler_file.m from [78116b7606] to [dad1460ce8].
︙ | |||
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | + + - + + + + + | #ifdef OF_HAVE_THREADS # import "OFMutex.h" #endif #import "OFCreateDirectoryFailedException.h" #import "OFCreateSymbolicLinkFailedException.h" #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" #import "OFLinkFailedException.h" #import "OFMoveItemFailedException.h" #import "OFNotImplementedException.h" #import "OFOpenItemFailedException.h" #import "OFOutOfRangeException.h" #import "OFReadFailedException.h" #import "OFRemoveItemFailedException.h" #import "OFRetrieveItemAttributesFailedException.h" #import "OFSetItemAttributesFailedException.h" #ifdef OF_WINDOWS # include <windows.h> # include <direct.h> # include <ntdef.h> #endif #ifdef OF_AMIGAOS # ifdef OF_AMIGAOS4 |
︙ | |||
99 100 101 102 103 104 105 106 107 108 109 110 111 112 | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | + + + + + + + + + + + + + + + + + + + + + + + | #if !defined(HAVE_READDIR_R) && defined(OF_HAVE_THREADS) && !defined(OF_WINDOWS) static OFMutex *readdirMutex; #endif #ifdef OF_WINDOWS static WINAPI BOOLEAN (*func_CreateSymbolicLinkW)(LPCWSTR, LPCWSTR, DWORD); #endif #ifdef OF_AMIGAOS4 extern struct ExecIFace *IExec; static struct Library *DOSBase = NULL; static struct DOSIFace *IDOS = NULL; static struct Library *LocaleBase = NULL; static struct LocaleIFace *ILocale = NULL; OF_DESTRUCTOR() { if (ILocale != NULL) DropInterface(ILocale); if (LocaleBase != NULL) CloseLibrary(LocaleBase); if (IDOS != NULL) DropInterface(IDOS); if (DOSBase != NULL) CloseLibrary(DOSBase); } #endif static int of_stat(OFString *path, of_stat_t *buffer) { #if defined(OF_WINDOWS) return _wstat64([path UTF16String], buffer); #elif defined(OF_AMIGAOS) |
︙ | |||
412 413 414 415 416 417 418 419 420 421 422 423 424 425 | 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 | + + + + + + + + + + + + + + + + + + + + | return; /* * Make sure OFFile is initialized. * On some systems, this is needed to initialize the file system driver. */ [OFFile class]; #ifdef OF_AMIGAOS4 if ((DOSBase = OpenLibrary("dos.library", 36)) == NULL) @throw [OFInitializationFailedException exceptionWithClass: self]; if ((IDOS = (struct DOSIFace *) GetInterface(DOSBase, "main", 1, NULL)) == NULL) @throw [OFInitializationFailedException exceptionWithClass: self]; if ((LocaleBase = OpenLibrary("locale.library", 38)) == NULL) @throw [OFInitializationFailedException exceptionWithClass: self]; if ((ILocale = (struct LocaleIFace *) GetInterface(LocaleBase, "main", 1, NULL)) == NULL) @throw [OFInitializationFailedException exceptionWithClass: self]; #endif #if defined(OF_HAVE_CHOWN) && defined(OF_HAVE_THREADS) passwdMutex = [[OFMutex alloc] init]; #endif #if !defined(HAVE_READDIR_R) && !defined(OF_WINDOWS) && defined(OF_HAVE_THREADS) readdirMutex = [[OFMutex alloc] init]; #endif |
︙ |
Modified tests/TestsAppDelegate.m from [53045fdaad] to [97e67aa7ba].
︙ | |||
81 82 83 84 85 86 87 | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | - - + + + + + + + | int main(int argc, char *argv[]) { #ifdef OF_PSP int tid; #endif |
︙ |