Differences From Artifact [e0b880f183]:
- File src/amiga-library.h — part of check-in [f822adb905] at 2020-06-07 16:03:16 on branch amiga-library — Add libc symbols needed by the runtime to of_libc (user: js, size: 2615) [annotate] [blame] [check-ins using]
To Artifact [5676e5d650]:
- File
src/amiga-library.h
— part of check-in
[514944f1ea]
at
2020-06-07 16:34:48
on branch amiga-library
— Pass __sF around instead of std* individually
This avoids needing to #undef std{in,out,err} and then providing a new
symbol. (user: js, size: 2862) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "macros.h" #if defined(OF_COMPILING_AMIGA_LIBRARY) || defined(OF_COMPILING_AMIGA_LINKLIB) struct of_libc { /* * Needed by the runtime. Some of them are also used by ObjFW, but we * need all of them to pass them along to the runtime. */ void *_Nullable (*_Nonnull malloc)(size_t); void *_Nullable (*_Nonnull calloc)(size_t, size_t); | > > > > > > > > > | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "macros.h" #if defined(OF_COMPILING_AMIGA_LIBRARY) || defined(OF_COMPILING_AMIGA_LINKLIB) # if defined(__MORPHOS__) # include <ppcinline/macros.h> # define OF_M68K_ARG(type, name, reg) type name = (type)REG_##reg; # else # define OF_M68K_ARG(type, name, reg) \ register type reg_##name __asm__(#reg); \ type name = reg_##name; # endif struct of_libc { /* * Needed by the runtime. Some of them are also used by ObjFW, but we * need all of them to pass them along to the runtime. */ void *_Nullable (*_Nonnull malloc)(size_t); void *_Nullable (*_Nonnull calloc)(size_t, size_t); |
︙ | ︙ | |||
59 60 61 62 63 64 65 | /* Needed only by ObjFW. */ int (*_Nonnull vsnprintf)(const char *_Nonnull restrict, size_t, const char *_Nonnull restrict, va_list); void (*_Nonnull exit)(int); char *_Nullable (*_Nonnull setlocale)(int, const char *_Nullable); }; | | | 68 69 70 71 72 73 74 75 76 | /* Needed only by ObjFW. */ int (*_Nonnull vsnprintf)(const char *_Nonnull restrict, size_t, const char *_Nonnull restrict, va_list); void (*_Nonnull exit)(int); char *_Nullable (*_Nonnull setlocale)(int, const char *_Nullable); }; extern bool of_init(unsigned int version, struct of_libc *libc, FILE **sF); #endif |