Index: src/runtime/amiga-library.m ================================================================== --- src/runtime/amiga-library.m +++ src/runtime/amiga-library.m @@ -574,16 +574,10 @@ { libc._Unwind_Resume(ex); } #endif -int * -objc_get_errno(void) -{ - return libc.get_errno(); -} - #ifdef OF_AMIGAOS_M68K int snprintf(char *restrict str, size_t size, const char *restrict fmt, ...) { va_list args; Index: src/runtime/linklib/linklib.m ================================================================== --- src/runtime/linklib/linklib.m +++ src/runtime/linklib/linklib.m @@ -26,11 +26,10 @@ struct ObjFWRTBase; #import "inline.h" -#include #include #include #if defined(OF_AMIGAOS_M68K) # include @@ -69,16 +68,10 @@ #endif struct Library *ObjFWRTBase; 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); @@ -134,11 +127,10 @@ #endif #ifdef OF_MORPHOS .__register_frame = __register_frame, .__deregister_frame = __deregister_frame, #endif - .get_errno = get_errno, #ifdef OF_AMIGAOS_M68K .vsnprintf = vsnprintf, #endif .atexit = atexit, .exit = exit, Index: src/runtime/private.h ================================================================== --- src/runtime/private.h +++ src/runtime/private.h @@ -252,11 +252,10 @@ # endif # ifdef OF_MORPHOS void (*_Nonnull __register_frame)(void *_Nonnull); void (*_Nonnull __deregister_frame)(void *_Nonnull); # endif - int *_Nonnull (*_Nonnull get_errno)(void); # ifdef OF_AMIGAOS_M68K int (*_Nonnull vsnprintf)(char *restrict _Nonnull str, size_t size, const char *_Nonnull restrict fmt, va_list args); # endif int (*_Nonnull atexit)(void (*_Nonnull)(void)); @@ -273,14 +272,11 @@ register type reg_##name __asm__(#reg); \ type name = reg_##name; # endif # undef stdout # undef stderr -# undef errno extern FILE *_Nonnull stdout, *_Nonnull stderr; -extern int *_Nonnull objc_get_errno(void); -# define errno (*objc_get_errno()) #endif extern void objc_register_all_categories(struct objc_symtab *_Nonnull); extern struct objc_category *_Nullable *_Nullable objc_categories_for_class(Class _Nonnull);