Differences From Artifact [cc71dd731d]:
- File
src/runtime/linklib/linklib.m
— part of check-in
[169832c303]
at
2020-12-20 03:32:34
on branch trunk
— runtime: Use exit(1) instead of abort() on AmigaOS
This prevents leaking resources like open files. (user: js, size: 15122) [annotate] [blame] [check-ins using]
To Artifact [9c6b8d5e96]:
- File src/runtime/linklib/linklib.m — part of check-in [e9b359a922] at 2020-12-20 03:50:36 on branch trunk — runtime/linklib: Show errors with requester (user: js, size: 15561) [annotate] [blame] [check-ins using]
︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | + | #include "config.h" #import "ObjFWRT.h" #import "private.h" #import "macros.h" #include <proto/exec.h> #include <proto/intuition.h> struct ObjFWRTBase; #import "inline.h" #include <errno.h> #include <stdio.h> |
︙ | |||
71 72 73 74 75 76 77 78 79 80 81 82 83 84 | 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 99 100 101 102 103 104 105 106 107 | + + + + + + + + + + + + + + + + + + + + + + | void *__objc_class_name_Protocol; static int * get_errno(void) { return &errno; } static void error(const char *string, ULONG arg) { struct Library *IntuitionBase = OpenLibrary("intuition.library", 0); if (IntuitionBase != NULL) { struct EasyStruct easy = { .es_StructSize = sizeof(easy), .es_Flags = 0, .es_Title = (UBYTE *)NULL, .es_TextFormat = (UBYTE *)string, (UBYTE *)"OK" }; EasyRequest(NULL, &easy, NULL, arg); CloseLibrary(IntuitionBase); } exit(EXIT_FAILURE); } static void __attribute__((__used__)) ctor(void) { static bool initialized = false; struct objc_libc libc = { .malloc = malloc, |
︙ | |||
121 122 123 124 125 126 127 | 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | - - - - + + + + - - - + + - - | .exit = exit, }; if (initialized) return; if ((ObjFWRTBase = OpenLibrary(OBJFWRT_AMIGA_LIB, |
︙ |