Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch amiga-library Excluding Merge-Ins
This is equivalent to a diff from 943df0748b to 06f90bdd29
|
2025-04-30
| ||
| 17:22 | Use m instead of ppc as version suffix for MorphOS check-in: c1e657df0c user: js tags: trunk | |
| 14:00 | Remove Amiga library except for MorphOS check-in: fb61ec81a1 user: js tags: morphos-library | |
| 13:26 | configure: Remove obsolete extra check Leaf check-in: 06f90bdd29 user: js tags: amiga-library | |
| 13:24 | Merge trunk into branch "amiga-library" check-in: 3a3134b465 user: js tags: amiga-library | |
| 13:13 | Rename a few Amiga library related files check-in: 943df0748b user: js tags: trunk | |
| 12:02 | Use CopyMem instead of memcpy in Amiga library check-in: 9cea4bb495 user: js tags: trunk | |
Changes to .github/workflows/amiga-gcc.yml.
1 2 3 4 5 6 7 8 9 10 11 |
name: amiga-gcc
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
container: amigadev/crosstools:m68k-amigaos
steps:
- uses: actions/checkout@v4
- name: autogen.sh
run: ./autogen.sh
- name: configure
| > > > > > | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
name: amiga-gcc
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
container: amigadev/crosstools:m68k-amigaos
strategy:
matrix:
configure_flags:
-
- --disable-amiga-lib
steps:
- uses: actions/checkout@v4
- name: autogen.sh
run: ./autogen.sh
- name: configure
run: ./configure --host=m68k-amigaos ${{ matrix.configure_flags }}
- name: make
run: make -j$(nproc)
- name: make install
run: make install
|
Changes to configure.ac.
| ︙ | ︙ | |||
50 51 52 53 54 55 56 57 58 59 60 61 62 63 | OBJFW_LDFLAGS="$OBJFW_LDFLAGS -noixemul" LIBS="-ldebug $LIBS" OBJFW_LIBS="-ldebug $OBJFW_LIBS" enable_files="yes" # Required for reading ENV: enable_shared="no" with_tls="no" ;; powerpc-*-amigaos*) CPPFLAGS="$CPPFLAGS -D__USE_INLINE__" enable_files="yes" # Required for reading ENV: enable_shared="no" with_tls="no" | > > > > > > > > > > > > > > > > > | 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 |
OBJFW_LDFLAGS="$OBJFW_LDFLAGS -noixemul"
LIBS="-ldebug $LIBS"
OBJFW_LIBS="-ldebug $OBJFW_LIBS"
enable_files="yes" # Required for reading ENV:
enable_shared="no"
with_tls="no"
supports_amiga_lib="yes"
AS_IF([test x"$enable_amiga_lib" != x"no"], [
AC_SUBST(OBJFW_AMIGA_LIB, 'objfw${OBJFW_LIB_MAJOR}.library')
AC_SUBST(OBJFWRT_AMIGA_LIB,
['objfwrt${OBJFWRT_LIB_MAJOR}.library'])
dnl For 68000, GCC emits calls to helper functions that
dnl do not work properly in a library.
t="-mcpu=68020 -fbaserel32 -noixemul -ffreestanding"
AC_SUBST(AMIGA_LIB_CFLAGS, $t)
t="$t -resident32 -nostartfiles -nodefaultlibs -ldebug -lc"
AC_SUBST(AMIGA_LIB_LDFLAGS, $t)
AC_SUBST(AMIGA_LIBRARY_GLUE_AMIGALIB_O,
["amiga-library-glue.amigalib.o"])
])
AC_SUBST(LIBBASES_M, libbases.m)
;;
powerpc-*-amigaos*)
CPPFLAGS="$CPPFLAGS -D__USE_INLINE__"
enable_files="yes" # Required for reading ENV:
enable_shared="no"
with_tls="no"
|
| ︙ | ︙ | |||
74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
OBJFW_LIBS="-ldebug $OBJFW_LIBS"
enable_files="yes" # Required for reading ENV:
enable_shared="no"
supports_amiga_lib="yes"
AS_IF([test x"$enable_amiga_lib" != x"no"], [
AC_SUBST(OBJFWRT_AMIGA_LIB,
['objfwrt${OBJFWRT_LIB_MAJOR}ppc.library'])
t="-mresident32 -ffreestanding -noixemul"
AC_SUBST(AMIGA_LIB_CFLAGS, $t)
t="-mresident32 -nostartfiles -nodefaultlibs -noixemul"
t="$t -laboxstubs -labox -lmath -ldebug -lc"
AC_SUBST(AMIGA_LIB_LDFLAGS, $t)
| > > | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
OBJFW_LIBS="-ldebug $OBJFW_LIBS"
enable_files="yes" # Required for reading ENV:
enable_shared="no"
supports_amiga_lib="yes"
AS_IF([test x"$enable_amiga_lib" != x"no"], [
AC_SUBST(OBJFW_AMIGA_LIB,
['objfw${OBJFW_LIB_MAJOR}ppc.library'])
AC_SUBST(OBJFWRT_AMIGA_LIB,
['objfwrt${OBJFWRT_LIB_MAJOR}ppc.library'])
t="-mresident32 -ffreestanding -noixemul"
AC_SUBST(AMIGA_LIB_CFLAGS, $t)
t="-mresident32 -nostartfiles -nodefaultlibs -noixemul"
t="$t -laboxstubs -labox -lmath -ldebug -lc"
AC_SUBST(AMIGA_LIB_LDFLAGS, $t)
|
| ︙ | ︙ | |||
493 494 495 496 497 498 499 |
BUILDSYS_SHARED_LIB
BUILDSYS_PLUGIN
BUILDSYS_PIE
AC_SUBST(OBJFW_SHARED_LIB, '${LIB_PREFIX}objfw${LIB_SUFFIX}')
AC_SUBST(EXCEPTIONS_LIB_A, "exceptions.lib.a")
AC_SUBST(FORWARDING_LIB_A, "forwarding.lib.a")
| < > > > > | > > > > | | > > > > | < | > | > | 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 |
BUILDSYS_SHARED_LIB
BUILDSYS_PLUGIN
BUILDSYS_PIE
AC_SUBST(OBJFW_SHARED_LIB, '${LIB_PREFIX}objfw${LIB_SUFFIX}')
AC_SUBST(EXCEPTIONS_LIB_A, "exceptions.lib.a")
AC_SUBST(FORWARDING_LIB_A, "forwarding.lib.a")
AC_SUBST(OBJFWHID_SHARED_LIB, '${LIB_PREFIX}objfwhid${LIB_SUFFIX}')
BUILDSYS_FRAMEWORK([
AC_SUBST(OBJFW_FRAMEWORK, "ObjFW.framework")
AC_SUBST(OBJFWHID_FRAMEWORK, "ObjFWHID.framework")
build_framework="yes"
])
BUILDSYS_BUNDLE([
AC_SUBST(TESTPLUGIN_BUNDLE, "TestPlugin.bundle")
], [
AC_SUBST(TESTPLUGIN_PLUGIN, 'TestPlugin${PLUGIN_SUFFIX}')
])
AC_SUBST(OBJFW_LIB, "-lobjfw")
], [
AS_IF([test x"$enable_amiga_lib" != x"no"], [
AC_SUBST(OBJFW_LIB, "-lobjfw.library")
tmp="../src/linklib/libobjfw.library.a"
AC_SUBST(LIBOBJFW_DEP, "$tmp")
AC_SUBST(LIBOBJFW_DEP_LVL2, "../$tmp")
], [
AC_SUBST(OBJFW_LIB, "-lobjfw")
AC_SUBST(LIBOBJFW_DEP, "../src/libobjfw.a")
AC_SUBST(LIBOBJFW_DEP_LVL2, "../../src/libobjfw.a")
AC_DEFINE(OF_NO_SHARED, 1, [Whether no shared library is built])
])
AC_SUBST(LIBOBJFWHID_DEP, "../src/hid/libobjfwhid.a")
AC_SUBST(LIBOBJFWHID_DEP_LVL2, "../../src/hid/libobjfwhid.a")
])
AS_IF([test x"$build_framework" = x"yes"], [
TESTS_LIBS="-framework ObjFW \${RUNTIME_FRAMEWORK_LIBS} $TESTS_LIBS"
TESTS_LIBS="-framework ObjFWHID \${HID_FRAMEWORK_LIBS} $TESTS_LIBS"
TESTS_LIBS="-F../src/hid -F../src/bridge $TESTS_LIBS"
TESTS_LIBS="-F../src -F../src/runtime $TESTS_LIBS"
], [
TESTS_LIBS="-lobjfw \${RUNTIME_LIBS} $TESTS_LIBS"
TESTS_LIBS="-lobjfwhid \${HID_LIBS} $TESTS_LIBS"
TESTS_LIBS="-L../src/hid -L../src/bridge $TESTS_LIBS"
TESTS_LIBS="-L../src/runtime -L../src/runtime/linklib $TESTS_LIBS"
TESTS_LIBS="-L../src $TESTS_LIBS"
])
AC_ARG_ENABLE(static, AS_HELP_STRING([--enable-static], [build static library]))
AS_IF([test x"$enable_shared" = x"no" -a x"$enable_amiga_lib" = x"no"], [
enable_static="yes"
AC_SUBST(OBJFW_STATIC_LIB, "libobjfw.a")
AC_SUBST(EXCEPTIONS_A, "exceptions.a")
AC_SUBST(FORWARDING_A, "forwarding.a")
])
AS_IF([test x"$enable_static" = x"yes" -o x"$enable_amiga_lib" != x"no"], [
AC_SUBST(OBJFWHID_STATIC_LIB, "libobjfwhid.a")
])
AS_IF([test x"$enable_amiga_lib" != x"no"], [
AC_SUBST(EXCEPTIONS_AMIGALIB_A, "exceptions.amigalib.a")
AC_SUBST(FORWARDING_AMIGALIB_A, "forwarding.amigalib.a")
])
AC_DEFINE_UNQUOTED(PLUGIN_SUFFIX, "$PLUGIN_SUFFIX", [Suffix for plugins])
AS_IF([test x"$enable_files" != x"no" -a x"$PLUGIN_SUFFIX" != x""], [
AC_SUBST(USE_SRCS_MODULES, '${SRCS_MODULES}')
AC_SUBST(TESTPLUGIN, "plugin")
AC_DEFINE(OF_HAVE_MODULES, 1, [Whether we have support for modules])
|
| ︙ | ︙ | |||
671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 |
OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS -fgnu-runtime"
AC_MSG_RESULT(no)
old_compiler="yes"
])
AC_SUBST(RUNTIME, "runtime")
AC_CONFIG_FILES(src/runtime/Info.plist)
AS_IF([test x"$enable_shared" != x"no"], [
AC_SUBST(OBJFWRT_SHARED_LIB,
'${LIB_PREFIX}objfwrt${LIB_SUFFIX}')
])
AS_IF([test x"$enable_static" = x"yes"], [
AC_SUBST(OBJFWRT_STATIC_LIB, "libobjfwrt.a")
AC_SUBST(LOOKUP_ASM_A, "lookup-asm.a")
])
AS_IF([test x"$build_framework" = x"yes"], [
AC_SUBST(OBJFWRT_FRAMEWORK, "ObjFWRT.framework")
AC_SUBST(RUNTIME_FRAMEWORK_LIBS, "-framework ObjFWRT")
])
AS_IF([test x"$enable_amiga_lib" != x"no"], [
AC_SUBST(RUNTIME_LIBS, "-lobjfwrt.library")
tmp="../src/runtime/linklib/libobjfwrt.library.a"
AC_SUBST(LIBOBJFWRT_DEP, "$tmp")
AC_SUBST(LIBOBJFWRT_DEP_LVL2, "../$tmp")
], [
AC_SUBST(RUNTIME_LIBS, "-lobjfwrt")
])
AC_SUBST(RUNTIME_STATIC_LIBS, '${libdir}/libobjfwrt.a')
| > > > > > | 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 |
OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS -fgnu-runtime"
AC_MSG_RESULT(no)
old_compiler="yes"
])
AC_SUBST(RUNTIME, "runtime")
AC_CONFIG_FILES(src/runtime/Info.plist)
AS_IF([test x"$enable_shared" != x"no"], [
AC_SUBST(LOOKUP_ASM_LIB_A, "lookup-asm.lib.a")
])
AS_IF([test x"$enable_shared" != x"no"], [
AC_SUBST(OBJFWRT_SHARED_LIB,
'${LIB_PREFIX}objfwrt${LIB_SUFFIX}')
])
AS_IF([test x"$enable_static" = x"yes"], [
AC_SUBST(OBJFWRT_STATIC_LIB, "libobjfwrt.a")
AC_SUBST(LOOKUP_ASM_A, "lookup-asm.a")
])
AS_IF([test x"$build_framework" = x"yes"], [
AC_SUBST(OBJFWRT_FRAMEWORK, "ObjFWRT.framework")
AC_SUBST(RUNTIME_FRAMEWORK_LIBS, "-framework ObjFWRT")
])
AS_IF([test x"$enable_amiga_lib" != x"no"], [
AC_SUBST(RUNTIME_LIBS, "-lobjfwrt.library")
tmp="../src/runtime/linklib/libobjfwrt.library.a"
AC_SUBST(LOOKUP_ASM_AMIGALIB_A, "lookup-asm.amigalib.a")
AC_SUBST(LIBOBJFWRT_DEP, "$tmp")
AC_SUBST(LIBOBJFWRT_DEP_LVL2, "../$tmp")
], [
AC_SUBST(RUNTIME_LIBS, "-lobjfwrt")
])
AC_SUBST(RUNTIME_STATIC_LIBS, '${libdir}/libobjfwrt.a')
|
| ︙ | ︙ | |||
1067 1068 1069 1070 1071 1072 1073 | AS_IF([test x"$ENCODINGS_SRCS" = x""], [ ENCODINGS_SRCS="dummy.m" ]) AC_SUBST(ENCODINGS_SRCS) AS_IF([test x"$enable_shared" != x"no"], [ AC_SUBST(ENCODINGS_LIB_A, "encodings.lib.a") ]) | > > > | | 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 | AS_IF([test x"$ENCODINGS_SRCS" = x""], [ ENCODINGS_SRCS="dummy.m" ]) AC_SUBST(ENCODINGS_SRCS) AS_IF([test x"$enable_shared" != x"no"], [ AC_SUBST(ENCODINGS_LIB_A, "encodings.lib.a") ]) AS_IF([test x"$enable_amiga_lib" != x"no"], [ AC_SUBST(ENCODINGS_AMIGALIB_A, "encodings.amigalib.a") ]) AS_IF([test x"$enable_static" = x"yes"], [ AC_SUBST(ENCODINGS_A, "encodings.a") ]) AC_CHECK_FUNCS(arc4random arc4random_buf getrandom random, break) AS_IF([test x"$host_os" != x"morphos"], [ AC_CHECK_LIB(dl, dlopen, [ |
| ︙ | ︙ |
Changes to extra.mk.in.
1 2 3 4 5 6 7 8 9 10 |
OBJFW_SHARED_LIB = @OBJFW_SHARED_LIB@
OBJFW_STATIC_LIB = @OBJFW_STATIC_LIB@
OBJFW_FRAMEWORK = @OBJFW_FRAMEWORK@
OBJFW_LIB_MAJOR = 1
OBJFW_LIB_MINOR = 3
OBJFW_LIB_PATCH = 0
OBJFW_LIB_MAJOR_MINOR = ${OBJFW_LIB_MAJOR}.${OBJFW_LIB_MINOR}
OBJFWRT_SHARED_LIB = @OBJFWRT_SHARED_LIB@
OBJFWRT_STATIC_LIB = @OBJFWRT_STATIC_LIB@
| > | 1 2 3 4 5 6 7 8 9 10 11 |
OBJFW_SHARED_LIB = @OBJFW_SHARED_LIB@
OBJFW_STATIC_LIB = @OBJFW_STATIC_LIB@
OBJFW_FRAMEWORK = @OBJFW_FRAMEWORK@
OBJFW_AMIGA_LIB = @OBJFW_AMIGA_LIB@
OBJFW_LIB_MAJOR = 1
OBJFW_LIB_MINOR = 3
OBJFW_LIB_PATCH = 0
OBJFW_LIB_MAJOR_MINOR = ${OBJFW_LIB_MAJOR}.${OBJFW_LIB_MINOR}
OBJFWRT_SHARED_LIB = @OBJFWRT_SHARED_LIB@
OBJFWRT_STATIC_LIB = @OBJFWRT_STATIC_LIB@
|
| ︙ | ︙ | |||
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 | AMIGA_LIBRARY_GLUE_AMIGALIB_O = @AMIGA_LIBRARY_GLUE_AMIGALIB_O@ AUTORELEASE_FOUNDATION_M = @AUTORELEASE_FOUNDATION_M@ BIN_PREFIX = @BIN_PREFIX@ BRIDGE = @BRIDGE@ CVINCLUDE_INLINE_H = @CVINCLUDE_INLINE_H@ ENCODINGS_A = @ENCODINGS_A@ ENCODINGS_LIB_A = @ENCODINGS_LIB_A@ ENCODINGS_SRCS = @ENCODINGS_SRCS@ EXCEPTIONS_A = @EXCEPTIONS_A@ EXCEPTIONS_LIB_A = @EXCEPTIONS_LIB_A@ FORWARDING_A = @FORWARDING_A@ FORWARDING_LIB_A = @FORWARDING_LIB_A@ HID_FRAMEWORK_LIBS = @HID_FRAMEWORK_LIBS@ HID_LIBS = @HID_LIBS@ LIBBASES_M = @LIBBASES_M@ LIBOBJFWHID_DEP = @LIBOBJFWHID_DEP@ LIBOBJFWHID_DEP_LVL2 = @LIBOBJFWHID_DEP_LVL2@ LIBOBJFWRT_DEP = @LIBOBJFWRT_DEP@ LIBOBJFWRT_DEP_LVL2 = @LIBOBJFWRT_DEP_LVL2@ LIBOBJFW_DEP = @LIBOBJFW_DEP@ LIBOBJFW_DEP_LVL2 = @LIBOBJFW_DEP_LVL2@ LINKLIB = @LINKLIB@ LOOKUP_ASM_A = @LOOKUP_ASM_A@ LOOKUP_ASM_AMIGALIB_A = @LOOKUP_ASM_AMIGALIB_A@ LOOKUP_ASM_LIB_A = @LOOKUP_ASM_LIB_A@ MAP_LDFLAGS = @MAP_LDFLAGS@ OBJC_SYNC = @OBJC_SYNC@ OBJFW_NEW = @OBJFW_NEW@ OFARC = @OFARC@ OFARC_LIBS = @OFARC_LIBS@ OFDNS = @OFDNS@ OFHASH = @OFHASH@ OFHASH_LIBS = @OFHTTP_LIBS@ OFHTTP = @OFHTTP@ | > > > > > | 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 | AMIGA_LIBRARY_GLUE_AMIGALIB_O = @AMIGA_LIBRARY_GLUE_AMIGALIB_O@ AUTORELEASE_FOUNDATION_M = @AUTORELEASE_FOUNDATION_M@ BIN_PREFIX = @BIN_PREFIX@ BRIDGE = @BRIDGE@ CVINCLUDE_INLINE_H = @CVINCLUDE_INLINE_H@ ENCODINGS_A = @ENCODINGS_A@ ENCODINGS_AMIGALIB_A = @ENCODINGS_AMIGALIB_A@ ENCODINGS_LIB_A = @ENCODINGS_LIB_A@ ENCODINGS_SRCS = @ENCODINGS_SRCS@ EXCEPTIONS_A = @EXCEPTIONS_A@ EXCEPTIONS_AMIGALIB_A = @EXCEPTIONS_AMIGALIB_A@ EXCEPTIONS_LIB_A = @EXCEPTIONS_LIB_A@ FORWARDING_A = @FORWARDING_A@ FORWARDING_AMIGALIB_A = @FORWARDING_AMIGALIB_A@ FORWARDING_LIB_A = @FORWARDING_LIB_A@ HID_FRAMEWORK_LIBS = @HID_FRAMEWORK_LIBS@ HID_LIBS = @HID_LIBS@ LIBBASES_M = @LIBBASES_M@ LIBOBJFWHID_DEP = @LIBOBJFWHID_DEP@ LIBOBJFWHID_DEP_LVL2 = @LIBOBJFWHID_DEP_LVL2@ LIBOBJFWRT_DEP = @LIBOBJFWRT_DEP@ LIBOBJFWRT_DEP_LVL2 = @LIBOBJFWRT_DEP_LVL2@ LIBOBJFW_DEP = @LIBOBJFW_DEP@ LIBOBJFW_DEP_LVL2 = @LIBOBJFW_DEP_LVL2@ LINKLIB = @LINKLIB@ LOOKUP_ASM_A = @LOOKUP_ASM_A@ LOOKUP_ASM_AMIGALIB_A = @LOOKUP_ASM_AMIGALIB_A@ LOOKUP_ASM_LIB_A = @LOOKUP_ASM_LIB_A@ MAP_LDFLAGS = @MAP_LDFLAGS@ OBJC_SYNC = @OBJC_SYNC@ OBJFW_LIB = @OBJFW_LIB@ OBJFW_LIBS = @OBJFW_LIBS@ OBJFW_NEW = @OBJFW_NEW@ OFARC = @OFARC@ OFARC_LIBS = @OFARC_LIBS@ OFDNS = @OFDNS@ OFHASH = @OFHASH@ OFHASH_LIBS = @OFHTTP_LIBS@ OFHTTP = @OFHTTP@ |
| ︙ | ︙ |
Changes to generators/library/FuncArrayGenerator.m.
| ︙ | ︙ | |||
70 71 72 73 74 75 76 |
- (void)generate
{
[_include writeString: COPYRIGHT];
[_include writeString:
@"/* This file is automatically generated from amiga-library.xml */"
@"\n\n"];
| | > > > > > > > > > > > | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
- (void)generate
{
[_include writeString: COPYRIGHT];
[_include writeString:
@"/* This file is automatically generated from amiga-library.xml */"
@"\n\n"];
for (OFXMLElement *function in
[_library elementsForName: @"function"]) {
OFString *condition =
[function attributeForName: @"condition"].stringValue;
if (condition != nil)
[_include writeFormat: @"#if %@\n", condition];
[_include writeFormat:
@"(CONST_APTR)glue_%@,\n",
[function attributeForName: @"name"].stringValue];
if (condition != nil)
[_include writeString: @"#endif\n"];
}
}
@end
|
Changes to generators/library/GlueGenerator.h.
| ︙ | ︙ | |||
21 22 23 24 25 26 27 |
#import "OFStream.h"
#import "OFXMLElement.h"
@interface GlueGenerator: OFObject
{
OFXMLElement *_library;
| | > | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
#import "OFStream.h"
#import "OFXMLElement.h"
@interface GlueGenerator: OFObject
{
OFXMLElement *_library;
OFStream *_header, *_impl, *_morphOSImpl;
}
- (instancetype)initWithLibrary: (OFXMLElement *)library
header: (OFStream *)header
implementation: (OFStream *)implementation
morphOSImplementation: (OFStream *)morphOSImplementation;
- (void)generate;
@end
|
Changes to generators/library/GlueGenerator.m.
| ︙ | ︙ | |||
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 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 108 109 110 111 112 113 114 115 116 117 118 119 |
#import "OFUnsupportedVersionException.h"
#import "copyright.h"
@implementation GlueGenerator
- (instancetype)initWithLibrary: (OFXMLElement *)library
header: (OFStream *)header
morphOSImplementation: (OFStream *)morphOSImpl
{
self = [super init];
@try {
OFXMLAttribute *version;
if (![library.name isEqual: @"amiga-library"] ||
library.namespace != nil)
@throw [OFInvalidFormatException exception];
if ((version = [library attributeForName: @"version"]) == nil)
@throw [OFInvalidFormatException exception];
if (![version.stringValue isEqual: @"1.0"])
@throw [OFUnsupportedVersionException
exceptionWithVersion: version.stringValue];
_library = [library retain];
_header = [header retain];
_morphOSImpl = [morphOSImpl retain];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- (void)dealloc
{
[_library release];
[_header release];
[_morphOSImpl release];
[super dealloc];
}
- (void)generate
{
size_t includes = 0;
[_header writeString: COPYRIGHT];
[_morphOSImpl writeString: COPYRIGHT];
[_header writeString:
@"/* This file is automatically generated from amiga-library.xml */"
@"\n\n"];
[_morphOSImpl writeString:
@"/* This file is automatically generated from amiga-library.xml */"
@"\n\n"
@"#include \"config.h\"\n"
@"\n"
@".section .text\n"];
for (OFXMLElement *include in [_library elementsForName: @"include"]) {
[_header writeFormat: @"#import \"%@\"\n",
include.stringValue];
includes++;
}
if (includes > 0)
[_header writeString: @"\n"];
for (OFXMLElement *function in
[_library elementsForName: @"function"]) {
OFString *name =
[function attributeForName: @"name"].stringValue;
OFString *returnType =
[function attributeForName: @"return-type"].stringValue;
OFArray OF_GENERIC(OFXMLElement *) *arguments =
[function elementsForName: @"argument"];
size_t argumentIndex;
if (returnType == nil)
returnType = @"void";
[_header writeFormat:
@"extern %@%@glue_%@",
returnType,
(![returnType hasSuffix: @"*"] ? @" " : @""),
name];
if (arguments.count > 0)
| > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > > > > > > > > | > | | | | | | > > > > | > > | 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 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 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 142 143 144 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 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 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 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 |
#import "OFUnsupportedVersionException.h"
#import "copyright.h"
@implementation GlueGenerator
- (instancetype)initWithLibrary: (OFXMLElement *)library
header: (OFStream *)header
implementation: (OFStream *)impl
morphOSImplementation: (OFStream *)morphOSImpl
{
self = [super init];
@try {
OFXMLAttribute *version;
if (![library.name isEqual: @"amiga-library"] ||
library.namespace != nil)
@throw [OFInvalidFormatException exception];
if ((version = [library attributeForName: @"version"]) == nil)
@throw [OFInvalidFormatException exception];
if (![version.stringValue isEqual: @"1.0"])
@throw [OFUnsupportedVersionException
exceptionWithVersion: version.stringValue];
_library = [library retain];
_header = [header retain];
_impl = [impl retain];
_morphOSImpl = [morphOSImpl retain];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- (void)dealloc
{
[_library release];
[_header release];
[_impl release];
[_morphOSImpl release];
[super dealloc];
}
- (void)generate
{
size_t includes = 0;
[_header writeString: COPYRIGHT];
[_impl writeString: COPYRIGHT];
[_morphOSImpl writeString: COPYRIGHT];
[_header writeString:
@"/* This file is automatically generated from amiga-library.xml */"
@"\n\n"];
[_impl writeString:
@"/* This file is automatically generated from amiga-library.xml */"
@"\n\n"
@"#include \"config.h\"\n"
@"\n"
@"#import \"amiga-glue.h\"\n"
@"\n"];
[_morphOSImpl writeString:
@"/* This file is automatically generated from amiga-library.xml */"
@"\n\n"
@"#include \"config.h\"\n"
@"\n"
@".section .text\n"];
for (OFXMLElement *include in [_library elementsForName: @"include"]) {
[_header writeFormat: @"#import \"%@\"\n",
include.stringValue];
includes++;
}
if (includes > 0)
[_header writeString: @"\n"];
[_header writeString:
@"#ifdef OF_AMIGAOS_M68K\n"
@"# define PPC_PARAMS(...) (void)\n"
@"# define M68K_ARG(type, name, reg)\t\t\\\n"
@"\tregister type reg##name __asm__(#reg);\t\\\n"
@"\ttype name = reg##name;\n"
@"#else\n"
@"# define PPC_PARAMS(...) (__VA_ARGS__)\n"
@"# define M68K_ARG(...)\n"
@"#endif\n"
@"\n"];
for (OFXMLElement *function in
[_library elementsForName: @"function"]) {
OFString *name =
[function attributeForName: @"name"].stringValue;
OFString *returnType =
[function attributeForName: @"return-type"].stringValue;
OFString *condition =
[function attributeForName: @"condition"].stringValue;
OFArray OF_GENERIC(OFXMLElement *) *arguments =
[function elementsForName: @"argument"];
size_t argumentIndex;
[_impl writeString: @"\n"];
[_morphOSImpl writeString: @"\n"];
if (condition != nil) {
[_header writeFormat: @"#if %@\n", condition];
[_impl writeFormat: @"#if %@\n", condition];
[_morphOSImpl writeFormat: @"#if %@\n", condition];
}
if (returnType == nil)
returnType = @"void";
[_header writeFormat:
@"extern %@%@glue_%@",
returnType,
(![returnType hasSuffix: @"*"] ? @" " : @""),
name];
[_impl writeFormat: @"%@ __saveds\n"
@"glue_%@",
returnType, name];
if (arguments.count > 0)
[_header writeString: @" PPC_PARAMS("];
else
[_header writeString: @"(void"];
[_impl writeString: @"(void)\n"];
argumentIndex = 0;
for (OFXMLElement *argument in arguments) {
OFString *argName =
[argument attributeForName: @"name"].stringValue;
OFString *argType =
[argument attributeForName: @"type"].stringValue;
if (argumentIndex++ > 0)
[_header writeString: @", "];
[_header writeString: argType];
if (![argType hasSuffix: @"*"])
[_header writeString: @" "];
[_header writeString: argName];
}
[_header writeString: @");\n"];
[_impl writeString: @"{\n"];
for (OFXMLElement *argument in arguments) {
OFString *argName =
[argument attributeForName: @"name"].stringValue;
OFString *argType =
[argument attributeForName: @"type"].stringValue;
OFString *m68kReg = [argument
attributeForName: @"m68k-reg"].stringValue;
[_impl writeFormat: @"\tM68K_ARG(%@, %@, %@)\n",
argType, argName, m68kReg];
}
if (arguments.count > 0)
[_impl writeString: @"\n"];
if (![returnType isEqual: @"void"])
[_impl writeString: @"\treturn "];
else
[_impl writeString: @"\t"];
[_impl writeFormat: @"%@(", name];
argumentIndex = 0;
for (OFXMLElement *argument in arguments) {
OFString *argName =
[argument attributeForName: @"name"].stringValue;
if (argumentIndex++ > 0)
[_impl writeString: @", "];
[_impl writeString: argName];
}
[_impl writeString: @");\n"
@"}\n"];
[_morphOSImpl writeFormat: @".globl glue_%@\n"
@"glue_%@:\n"
@" lwz %%r13, 44(%%r12)\n"
@" b %@\n",
name, name, name];
if (condition != nil) {
[_header writeString: @"#endif\n"];
[_impl writeString: @"#endif\n"];
[_morphOSImpl writeString: @"#endif\n"];
}
}
}
@end
|
Changes to generators/library/LibraryGenerator.m.
| ︙ | ︙ | |||
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 |
IRIByAppendingPathComponent: directory];
OFIRI *libraryIRI = [sourcesIRI
IRIByAppendingPathComponent: @"amiga-library.xml"];
OFIRI *linkLibIRI = [sourcesIRI
IRIByAppendingPathComponent: @"linklib/linklib.m"];
OFIRI *glueHeaderIRI = [sourcesIRI
IRIByAppendingPathComponent: @"amiga-library-glue.h"];
OFIRI *morphOSGlueIRI = [sourcesIRI
IRIByAppendingPathComponent: @"amiga-library-glue-morphos.S"];
OFIRI *funcArrayIRI = [sourcesIRI
IRIByAppendingPathComponent: @"amiga-library-funcarray.inc"];
OFXMLElement *library = [OFXMLElement elementWithStream:
[OFFile fileWithPath: libraryIRI.fileSystemRepresentation
mode: @"r"]];
OFFile *linkLib =
[OFFile fileWithPath: linkLibIRI.fileSystemRepresentation
mode: @"w"];
OFFile *glueHeader =
[OFFile fileWithPath: glueHeaderIRI.fileSystemRepresentation
mode: @"w"];
OFFile *morphOSGlue =
[OFFile fileWithPath: morphOSGlueIRI.fileSystemRepresentation
mode: @"w"];
OFFile *funcArray =
[OFFile fileWithPath: funcArrayIRI.fileSystemRepresentation
mode: @"w"];
LinkLibGenerator *linkLibGenerator = [[[LinkLibGenerator alloc]
initWithLibrary: library
implementation: linkLib] autorelease];
GlueGenerator *glueGenerator = [[[GlueGenerator alloc]
initWithLibrary: library
header: glueHeader
morphOSImplementation: morphOSGlue] autorelease];
FuncArrayGenerator *funcArrayGenerator = [[[FuncArrayGenerator alloc]
initWithLibrary: library
include: funcArray] autorelease];
[linkLibGenerator generate];
[glueGenerator generate];
[funcArrayGenerator generate];
}
- (void)applicationDidFinishLaunching: (OFNotification *)notification
{
[self generateInDirectory: @"../../src/runtime"];
[OFApplication terminate];
}
@end
| > > > > > > > | 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 95 96 |
IRIByAppendingPathComponent: directory];
OFIRI *libraryIRI = [sourcesIRI
IRIByAppendingPathComponent: @"amiga-library.xml"];
OFIRI *linkLibIRI = [sourcesIRI
IRIByAppendingPathComponent: @"linklib/linklib.m"];
OFIRI *glueHeaderIRI = [sourcesIRI
IRIByAppendingPathComponent: @"amiga-library-glue.h"];
OFIRI *glueIRI = [sourcesIRI
IRIByAppendingPathComponent: @"amiga-library-glue.m"];
OFIRI *morphOSGlueIRI = [sourcesIRI
IRIByAppendingPathComponent: @"amiga-library-glue-morphos.S"];
OFIRI *funcArrayIRI = [sourcesIRI
IRIByAppendingPathComponent: @"amiga-library-funcarray.inc"];
OFXMLElement *library = [OFXMLElement elementWithStream:
[OFFile fileWithPath: libraryIRI.fileSystemRepresentation
mode: @"r"]];
OFFile *linkLib =
[OFFile fileWithPath: linkLibIRI.fileSystemRepresentation
mode: @"w"];
OFFile *glueHeader =
[OFFile fileWithPath: glueHeaderIRI.fileSystemRepresentation
mode: @"w"];
OFFile *glue =
[OFFile fileWithPath: glueIRI.fileSystemRepresentation
mode: @"w"];
OFFile *morphOSGlue =
[OFFile fileWithPath: morphOSGlueIRI.fileSystemRepresentation
mode: @"w"];
OFFile *funcArray =
[OFFile fileWithPath: funcArrayIRI.fileSystemRepresentation
mode: @"w"];
LinkLibGenerator *linkLibGenerator = [[[LinkLibGenerator alloc]
initWithLibrary: library
implementation: linkLib] autorelease];
GlueGenerator *glueGenerator = [[[GlueGenerator alloc]
initWithLibrary: library
header: glueHeader
implementation: glue
morphOSImplementation: morphOSGlue] autorelease];
FuncArrayGenerator *funcArrayGenerator = [[[FuncArrayGenerator alloc]
initWithLibrary: library
include: funcArray] autorelease];
[linkLibGenerator generate];
[glueGenerator generate];
[funcArrayGenerator generate];
}
- (void)applicationDidFinishLaunching: (OFNotification *)notification
{
[self generateInDirectory: @"../../src"];
[self generateInDirectory: @"../../src/runtime"];
[OFApplication terminate];
}
@end
|
Changes to generators/library/LinkLibGenerator.m.
| ︙ | ︙ | |||
123 124 125 126 127 128 129 | [_impl writeString: argType]; if (![argType hasSuffix: @"*"]) [_impl writeString: @" "]; [_impl writeString: argName]; } | | > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
[_impl writeString: argType];
if (![argType hasSuffix: @"*"])
[_impl writeString: @" "];
[_impl writeString: argName];
}
[_impl writeFormat:
@")\n"
@"{\n"
@"#if defined(OF_AMIGAOS_M68K)\n"
@"\tregister struct Library *a6 __asm__(\"a6\") = %@;\n"
@"\t(void)a6;\n"
@"\t", libBase];
if (![returnType isEqual: @"void"])
[_impl writeString: @"return "];
[_impl writeString: @"(("];
[_impl writeString: returnType];
if (![returnType hasSuffix: @"*"])
[_impl writeString: @" "];
[_impl writeString: @"(*)("];
argumentIndex = 0;
for (OFXMLElement *argument in arguments) {
OFString *argType =
[argument attributeForName: @"type"].stringValue;
OFString *m68kReg = [argument
attributeForName: @"m68k-reg"].stringValue;
if (argumentIndex++ > 0)
[_impl writeString: @", "];
[_impl writeString: argType];
if (![argType hasSuffix: @"*"])
[_impl writeString: @" "];
[_impl writeFormat: @"__asm__(\"%@\")", m68kReg];
}
[_impl writeFormat: @"))(((uintptr_t)%@) - %zu))(",
libBase, 30 + funcIndex * 6];
argumentIndex = 0;
for (OFXMLElement *argument in
[function elementsForName: @"argument"]) {
OFString *argName =
[argument attributeForName: @"name"].stringValue;
if (argumentIndex++ > 0)
[_impl writeString: @", "];
[_impl writeString: argName];
}
[_impl writeFormat: @");\n"
@"#elif defined(OF_MORPHOS)\n"
@"\t__asm__ __volatile__ (\n"
@"\t \"mr\t\t%%%%r12, %%0\"\n"
@"\t :: \"r\"(%@) : \"r12\"\n"
@"\t);\n"
@"\n"
@"\t",
libBase, libBase];
|
| ︙ | ︙ | |||
168 169 170 171 172 173 174 | if (argumentIndex++ > 0) [_impl writeString: @", "]; [_impl writeString: argName]; } | | > | 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | if (argumentIndex++ > 0) [_impl writeString: @", "]; [_impl writeString: argName]; } [_impl writeString: @");\n" @"#endif\n"]; if ([function attributeForName: @"noreturn"] != nil) [_impl writeString: @"\n\tOF_UNREACHABLE\n"]; [_impl writeString: @"}\n"]; if (++funcIndex < functions.count) [_impl writeString: @"\n"]; } } @end |
Changes to src/Makefile.
1 2 3 |
include ../extra.mk
SUBDIRS = ${RUNTIME} exceptions encodings forwarding
| | > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
include ../extra.mk
SUBDIRS = ${RUNTIME} exceptions encodings forwarding
SUBDIRS_AFTER = ${LINKLIB} ${BRIDGE} ${TLS} hid test
CLEAN = amiga-end.amigalib.dep \
amiga-end.amigalib.o \
amiga-glue.amigalib.dep \
amiga-glue.amigalib.o \
amiga-library-functable.inc \
amiga-library.amigalib.dep \
amiga-library.amigalib.o
DISTCLEAN = Info.plist objfw-defs.h
SHARED_LIB = ${OBJFW_SHARED_LIB}
STATIC_LIB = ${OBJFW_STATIC_LIB}
FRAMEWORK = ${OBJFW_FRAMEWORK}
AMIGA_LIB = ${OBJFW_AMIGA_LIB}
LIB_MAJOR = ${OBJFW_LIB_MAJOR}
LIB_MINOR = ${OBJFW_LIB_MINOR}
LIB_PATCH = ${OBJFW_LIB_PATCH}
SRCS = OFApplication.m \
OFArray.m \
OFBlock.m \
|
| ︙ | ︙ | |||
258 259 260 261 262 263 264 265 266 267 268 269 |
OBJS_EXTRA = exceptions/exceptions.a \
encodings/encodings.a \
forwarding/forwarding.a
LIB_OBJS_EXTRA = exceptions/exceptions.lib.a \
encodings/encodings.lib.a \
forwarding/forwarding.lib.a
include ../buildsys.mk
${TLS} hid: ${BRIDGE}
| > > > > > > | > > > > > | 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 |
OBJS_EXTRA = exceptions/exceptions.a \
encodings/encodings.a \
forwarding/forwarding.a
LIB_OBJS_EXTRA = exceptions/exceptions.lib.a \
encodings/encodings.lib.a \
forwarding/forwarding.lib.a
AMIGA_LIB_OBJS_START = amiga-library.amigalib.o
AMIGA_LIB_OBJS_EXTRA = ${AMIGA_LIBRARY_GLUE_AMIGALIB_O} \
exceptions/exceptions.amigalib.a \
encodings/encodings.amigalib.a \
forwarding/forwarding.amigalib.a \
amiga-library-end.amigalib.o
include ../buildsys.mk
${TLS} hid: ${BRIDGE}
CPPFLAGS += -I. -I.. -Iexceptions -Iruntime \
-DOBJFW_AMIGA_LIB=\"${OBJFW_AMIGA_LIB}\" \
-DOBJFW_LIB_MAJOR=${OBJFW_LIB_MAJOR} \
-DOBJFW_LIB_MINOR=${OBJFW_LIB_MINOR}
AMIGA_LIB_CFLAGS += -DOF_COMPILING_AMIGA_LIBRARY
LD = ${OBJC}
FRAMEWORK_LIBS := -Fruntime \
${RUNTIME_FRAMEWORK_LIBS} \
${REEXPORT_RUNTIME_FRAMEWORK} \
${LIBS}
AMIGA_LIB_LIBS := -Lruntime -Lruntime/linklib -lobjfwrt.library.amigalib ${LIBS}
LIBS := -Lruntime -Lruntime/linklib ${RUNTIME_LIBS} ${REEXPORT_RUNTIME} ${LIBS}
RCFLAGS = --use-temp-file \
-DOBJFW_LIB_MAJOR=${OBJFW_LIB_MAJOR} \
-DOBJFW_LIB_MINOR=${OBJFW_LIB_MINOR} \
-DOBJFW_LIB_VERSION=\"${OBJFW_LIB_MAJOR}.${OBJFW_LIB_MINOR}\" \
-DOBJFW_SHARED_LIB=\"${OBJFW_SHARED_LIB}\"
|
| ︙ | ︙ |
Changes to src/OFObject.m.
| ︙ | ︙ | |||
80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
#endif
static struct {
Class isa;
} allocFailedException;
unsigned long OFHashSeed;
void *
OFAllocMemory(size_t count, size_t size)
{
void *pointer;
if OF_UNLIKELY (count == 0 || size == 0)
| > > > > > > > > | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
#endif
static struct {
Class isa;
} allocFailedException;
unsigned long OFHashSeed;
#ifdef OF_AMIGAOS
unsigned long *
OFHashSeedRef(void)
{
return &OFHashSeed;
}
#endif
void *
OFAllocMemory(size_t count, size_t size)
{
void *pointer;
if OF_UNLIKELY (count == 0 || size == 0)
|
| ︙ | ︙ |
Changes to src/OFStdIOStream.h.
| ︙ | ︙ | |||
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
@end
#ifdef __cplusplus
extern "C" {
#endif
/** @file */
/**
* @brief The standard input as an OFStream.
*/
extern OFStdIOStream *_Nullable OFStdIn;
/**
* @brief The standard output as an OFStream.
*/
extern OFStdIOStream *_Nullable OFStdOut;
/**
* @brief The standard error as an OFStream.
*/
extern OFStdIOStream *_Nullable OFStdErr;
/**
* @brief Logs the specified printf-style format to @ref OFStdErr.
*
* This prefixes the output with the date, timestamp, process name and PID.
*
* @param format The format for the line to log. See @ref OFStream#writeFormat:.
| > > > > > > > > > | 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
@end
#ifdef __cplusplus
extern "C" {
#endif
/** @file */
#ifndef OF_AMIGAOS
/**
* @brief The standard input as an OFStream.
*/
extern OFStdIOStream *_Nullable OFStdIn;
/**
* @brief The standard output as an OFStream.
*/
extern OFStdIOStream *_Nullable OFStdOut;
/**
* @brief The standard error as an OFStream.
*/
extern OFStdIOStream *_Nullable OFStdErr;
#else
extern OFStdIOStream *_Nonnull *_Nullable OFStdInRef(void);
extern OFStdIOStream *_Nonnull *_Nullable OFStdOutRef(void);
extern OFStdIOStream *_Nonnull *_Nullable OFStdErrRef(void);
# define OFStdIn (*OFStdInRef())
# define OFStdOut (*OFStdOutRef())
# define OFStdErr (*OFStdErrRef())
#endif
/**
* @brief Logs the specified printf-style format to @ref OFStdErr.
*
* This prefixes the output with the date, timestamp, process name and PID.
*
* @param format The format for the line to log. See @ref OFStream#writeFormat:.
|
| ︙ | ︙ |
Changes to src/OFStdIOStream.m.
| ︙ | ︙ | |||
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
#ifdef OF_WINDOWS
void
_reference_to_OFWin32ConsoleStdIOStream(void)
{
[OFWin32ConsoleStdIOStream class];
}
#endif
OFStdIOStream *OFStdIn = nil;
OFStdIOStream *OFStdOut = nil;
OFStdIOStream *OFStdErr = nil;
#ifdef OF_AMIGAOS
OF_DESTRUCTOR()
{
[OFStdIn dealloc];
[OFStdOut dealloc];
[OFStdErr dealloc];
| > > > > > > > > > > > > > > > > > > > > > > > > > > | 93 94 95 96 97 98 99 100 101 102 103 104 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 |
#ifdef OF_WINDOWS
void
_reference_to_OFWin32ConsoleStdIOStream(void)
{
[OFWin32ConsoleStdIOStream class];
}
#endif
#ifdef OF_AMIGAOS
# undef OFStdIn
# undef OFStdOut
# undef OFStdErr
#endif
OFStdIOStream *OFStdIn = nil;
OFStdIOStream *OFStdOut = nil;
OFStdIOStream *OFStdErr = nil;
#ifdef OF_AMIGAOS
OFStdIOStream **
OFStdInRef(void)
{
return &OFStdIn;
}
OFStdIOStream **
OFStdOutRef(void)
{
return &OFStdOut;
}
OFStdIOStream **
OFStdErrRef(void)
{
return &OFStdErr;
}
#endif
#ifdef OF_AMIGAOS
OF_DESTRUCTOR()
{
[OFStdIn dealloc];
[OFStdOut dealloc];
[OFStdErr dealloc];
|
| ︙ | ︙ |
Changes to src/OFTLSStream.h.
| ︙ | ︙ | |||
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | /** * @brief The implementation for OFTLSStream to use. * * This can be set to a class that is always used for OFTLSStream. This is * useful to either force a specific implementation or to use one that ObjFW * does not know about. */ extern Class OFTLSStreamImplementation; /** * @brief Returns a string description for the TLS stream error code. * * @param errorCode The error code to return the description for * @return A string description for the TLS stream error code */ | > > > > > | 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | /** * @brief The implementation for OFTLSStream to use. * * This can be set to a class that is always used for OFTLSStream. This is * useful to either force a specific implementation or to use one that ObjFW * does not know about. */ #ifndef OF_AMIGAOS extern Class OFTLSStreamImplementation; #else extern Class _Nonnull *_Nullable OFTLSStreamImplementationRef(void); # define OFTLSStreamImplementation (*OFTLSStreamImplementationRef()) #endif /** * @brief Returns a string description for the TLS stream error code. * * @param errorCode The error code to return the description for * @return A string description for the TLS stream error code */ |
| ︙ | ︙ |
Changes to src/OFTLSStream.m.
| ︙ | ︙ | |||
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
@interface OFTLSStreamHandshakeDelegate: OFObject <OFTLSStreamDelegate>
{
@public
bool _done;
id _exception;
}
@end
Class OFTLSStreamImplementation = Nil;
static const OFRunLoopMode handshakeRunLoopMode =
@"OFTLSStreamHandshakeRunLoopMode";
/*
* References to exceptions. This is needed because they are only used by
* subclasses that are in a different library.
*/
| > > > > > > > > > > > > > | 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 |
@interface OFTLSStreamHandshakeDelegate: OFObject <OFTLSStreamDelegate>
{
@public
bool _done;
id _exception;
}
@end
#ifdef OF_AMIGAOS
# undef OFTLSStreamImplementation
#endif
Class OFTLSStreamImplementation = Nil;
#ifdef OF_AMIGAOS
Class *
OFTLSStreamImplementationRef(void)
{
return &OFTLSStreamImplementation;
}
#endif
static const OFRunLoopMode handshakeRunLoopMode =
@"OFTLSStreamHandshakeRunLoopMode";
/*
* References to exceptions. This is needed because they are only used by
* subclasses that are in a different library.
*/
|
| ︙ | ︙ |
Added src/amiga-library-end.S.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | /* * Copyright (c) 2008-2025 Jonathan Schleifer <js@nil.im> * * All rights reserved. * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License version 3.0 only, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * version 3.0 for more details. * * You should have received a copy of the GNU Lesser General Public License * version 3.0 along with this program. If not, see * <https://www.gnu.org/licenses/>. */ #include "config.h" #if defined(OF_MORPHOS) .section .eh_frame, "aw" .long 0 .section .ctors, "aw" .long 0 #else .section .list___EH_FRAME_BEGINS__, "aw" .long 0 .section .dlist___EH_FRAME_OBJECTS__, "aw" .long 0 .section .list___CTOR_LIST__, "aw" .long 0 #endif |
Added src/amiga-library-funcarray.inc.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 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 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | /* * Copyright (c) 2008-2025 Jonathan Schleifer <js@nil.im> * * All rights reserved. * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License version 3.0 only, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * version 3.0 for more details. * * You should have received a copy of the GNU Lesser General Public License * version 3.0 along with this program. If not, see * <https://www.gnu.org/licenses/>. */ /* This file is automatically generated from amiga-library.xml */ (CONST_APTR)glue_OFInit, (CONST_APTR)glue_OFAllocMemory, (CONST_APTR)glue_OFAllocZeroedMemory, (CONST_APTR)glue_OFResizeMemory, (CONST_APTR)glue_OFFreeMemory, (CONST_APTR)glue_OFHashInit, (CONST_APTR)glue_OFRandom16, (CONST_APTR)glue_OFRandom32, (CONST_APTR)glue_OFRandom64, (CONST_APTR)glue_OFHashSeedRef, (CONST_APTR)glue_OFStdInRef, (CONST_APTR)glue_OFStdOutRef, (CONST_APTR)glue_OFStdErrRef, (CONST_APTR)glue_OFLogV, (CONST_APTR)glue_OFApplicationMain, (CONST_APTR)glue__Block_copy, (CONST_APTR)glue__Block_release, (CONST_APTR)glue_OFDNSClassName, (CONST_APTR)glue_OFDNSRecordTypeName, (CONST_APTR)glue_OFDNSClassParseName, (CONST_APTR)glue_OFDNSRecordTypeParseName, (CONST_APTR)glue_OFRegisterEmbeddedFile, (CONST_APTR)glue_OFHTTPRequestMethodString, (CONST_APTR)glue_OFHTTPRequestMethodParseString, (CONST_APTR)glue_OFHTTPStatusCodeString, (CONST_APTR)glue_OFListItemNext, (CONST_APTR)glue_OFListItemPrevious, (CONST_APTR)glue_OFListItemObject, (CONST_APTR)glue_OFSizeOfTypeEncoding, (CONST_APTR)glue_OFAlignmentOfTypeEncoding, (CONST_APTR)glue_OFOnce, (CONST_APTR)glue_OFPBKDF2Wrapper, (CONST_APTR)glue_OFScryptWrapper, (CONST_APTR)glue__OFSalsa20_8Core, (CONST_APTR)glue__OFScryptBlockMix, (CONST_APTR)glue__OFScryptROMix, (CONST_APTR)glue_OFSocketAddressParseIP, (CONST_APTR)glue_OFSocketAddressParseIPv4, (CONST_APTR)glue_OFSocketAddressParseIPv6, (CONST_APTR)glue_OFSocketAddressMakeUNIX, (CONST_APTR)glue_OFSocketAddressMakeIPX, (CONST_APTR)glue_OFSocketAddressMakeAppleTalk, (CONST_APTR)glue_OFSocketAddressEqual, (CONST_APTR)glue_OFSocketAddressHash, (CONST_APTR)glue_OFSocketAddressString, (CONST_APTR)glue_OFSocketAddressSetIPPort, (CONST_APTR)glue_OFSocketAddressIPPort, (CONST_APTR)glue_OFSocketAddressUNIXPath, (CONST_APTR)glue_OFSocketAddressSetIPXNetwork, (CONST_APTR)glue_OFSocketAddressIPXNetwork, (CONST_APTR)glue_OFSocketAddressSetIPXNode, (CONST_APTR)glue_OFSocketAddressGetIPXNode, (CONST_APTR)glue_OFSocketAddressSetIPXPort, (CONST_APTR)glue_OFSocketAddressIPXPort, (CONST_APTR)glue_OFSocketAddressSetAppleTalkNetwork, (CONST_APTR)glue_OFSocketAddressAppleTalkNetwork, (CONST_APTR)glue_OFSocketAddressSetAppleTalkNode, (CONST_APTR)glue_OFSocketAddressAppleTalkNode, (CONST_APTR)glue_OFSocketAddressSetAppleTalkPort, (CONST_APTR)glue_OFSocketAddressAppleTalkPort, (CONST_APTR)glue_OFTLSStreamErrorCodeDescription, (CONST_APTR)glue_OFTLSStreamImplementationRef, (CONST_APTR)glue__OFStrPTime, (CONST_APTR)glue_OFStringEncodingParseName, (CONST_APTR)glue_OFStringEncodingName, (CONST_APTR)glue_OFUTF16StringLength, (CONST_APTR)glue_OFUTF32StringLength, (CONST_APTR)glue_OFZIPArchiveEntryVersionToString, (CONST_APTR)glue_OFZIPArchiveEntryCompressionMethodName, (CONST_APTR)glue_OFZIPArchiveEntryExtraFieldFind, |
Added src/amiga-library-glue-morphos.S.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 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 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 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 142 143 144 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 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 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 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 | /* * Copyright (c) 2008-2025 Jonathan Schleifer <js@nil.im> * * All rights reserved. * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License version 3.0 only, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * version 3.0 for more details. * * You should have received a copy of the GNU Lesser General Public License * version 3.0 along with this program. If not, see * <https://www.gnu.org/licenses/>. */ /* This file is automatically generated from amiga-library.xml */ #include "config.h" .section .text .globl glue_OFInit glue_OFInit: lwz %r13, 44(%r12) b OFInit .globl glue_OFAllocMemory glue_OFAllocMemory: lwz %r13, 44(%r12) b OFAllocMemory .globl glue_OFAllocZeroedMemory glue_OFAllocZeroedMemory: lwz %r13, 44(%r12) b OFAllocZeroedMemory .globl glue_OFResizeMemory glue_OFResizeMemory: lwz %r13, 44(%r12) b OFResizeMemory .globl glue_OFFreeMemory glue_OFFreeMemory: lwz %r13, 44(%r12) b OFFreeMemory .globl glue_OFHashInit glue_OFHashInit: lwz %r13, 44(%r12) b OFHashInit .globl glue_OFRandom16 glue_OFRandom16: lwz %r13, 44(%r12) b OFRandom16 .globl glue_OFRandom32 glue_OFRandom32: lwz %r13, 44(%r12) b OFRandom32 .globl glue_OFRandom64 glue_OFRandom64: lwz %r13, 44(%r12) b OFRandom64 .globl glue_OFHashSeedRef glue_OFHashSeedRef: lwz %r13, 44(%r12) b OFHashSeedRef .globl glue_OFStdInRef glue_OFStdInRef: lwz %r13, 44(%r12) b OFStdInRef .globl glue_OFStdOutRef glue_OFStdOutRef: lwz %r13, 44(%r12) b OFStdOutRef .globl glue_OFStdErrRef glue_OFStdErrRef: lwz %r13, 44(%r12) b OFStdErrRef .globl glue_OFLogV glue_OFLogV: lwz %r13, 44(%r12) b OFLogV .globl glue_OFApplicationMain glue_OFApplicationMain: lwz %r13, 44(%r12) b OFApplicationMain .globl glue__Block_copy glue__Block_copy: lwz %r13, 44(%r12) b _Block_copy .globl glue__Block_release glue__Block_release: lwz %r13, 44(%r12) b _Block_release .globl glue_OFDNSClassName glue_OFDNSClassName: lwz %r13, 44(%r12) b OFDNSClassName .globl glue_OFDNSRecordTypeName glue_OFDNSRecordTypeName: lwz %r13, 44(%r12) b OFDNSRecordTypeName .globl glue_OFDNSClassParseName glue_OFDNSClassParseName: lwz %r13, 44(%r12) b OFDNSClassParseName .globl glue_OFDNSRecordTypeParseName glue_OFDNSRecordTypeParseName: lwz %r13, 44(%r12) b OFDNSRecordTypeParseName .globl glue_OFRegisterEmbeddedFile glue_OFRegisterEmbeddedFile: lwz %r13, 44(%r12) b OFRegisterEmbeddedFile .globl glue_OFHTTPRequestMethodString glue_OFHTTPRequestMethodString: lwz %r13, 44(%r12) b OFHTTPRequestMethodString .globl glue_OFHTTPRequestMethodParseString glue_OFHTTPRequestMethodParseString: lwz %r13, 44(%r12) b OFHTTPRequestMethodParseString .globl glue_OFHTTPStatusCodeString glue_OFHTTPStatusCodeString: lwz %r13, 44(%r12) b OFHTTPStatusCodeString .globl glue_OFListItemNext glue_OFListItemNext: lwz %r13, 44(%r12) b OFListItemNext .globl glue_OFListItemPrevious glue_OFListItemPrevious: lwz %r13, 44(%r12) b OFListItemPrevious .globl glue_OFListItemObject glue_OFListItemObject: lwz %r13, 44(%r12) b OFListItemObject .globl glue_OFSizeOfTypeEncoding glue_OFSizeOfTypeEncoding: lwz %r13, 44(%r12) b OFSizeOfTypeEncoding .globl glue_OFAlignmentOfTypeEncoding glue_OFAlignmentOfTypeEncoding: lwz %r13, 44(%r12) b OFAlignmentOfTypeEncoding .globl glue_OFOnce glue_OFOnce: lwz %r13, 44(%r12) b OFOnce .globl glue_OFPBKDF2Wrapper glue_OFPBKDF2Wrapper: lwz %r13, 44(%r12) b OFPBKDF2Wrapper .globl glue_OFScryptWrapper glue_OFScryptWrapper: lwz %r13, 44(%r12) b OFScryptWrapper .globl glue__OFSalsa20_8Core glue__OFSalsa20_8Core: lwz %r13, 44(%r12) b _OFSalsa20_8Core .globl glue__OFScryptBlockMix glue__OFScryptBlockMix: lwz %r13, 44(%r12) b _OFScryptBlockMix .globl glue__OFScryptROMix glue__OFScryptROMix: lwz %r13, 44(%r12) b _OFScryptROMix .globl glue_OFSocketAddressParseIP glue_OFSocketAddressParseIP: lwz %r13, 44(%r12) b OFSocketAddressParseIP .globl glue_OFSocketAddressParseIPv4 glue_OFSocketAddressParseIPv4: lwz %r13, 44(%r12) b OFSocketAddressParseIPv4 .globl glue_OFSocketAddressParseIPv6 glue_OFSocketAddressParseIPv6: lwz %r13, 44(%r12) b OFSocketAddressParseIPv6 .globl glue_OFSocketAddressMakeUNIX glue_OFSocketAddressMakeUNIX: lwz %r13, 44(%r12) b OFSocketAddressMakeUNIX .globl glue_OFSocketAddressMakeIPX glue_OFSocketAddressMakeIPX: lwz %r13, 44(%r12) b OFSocketAddressMakeIPX .globl glue_OFSocketAddressMakeAppleTalk glue_OFSocketAddressMakeAppleTalk: lwz %r13, 44(%r12) b OFSocketAddressMakeAppleTalk .globl glue_OFSocketAddressEqual glue_OFSocketAddressEqual: lwz %r13, 44(%r12) b OFSocketAddressEqual .globl glue_OFSocketAddressHash glue_OFSocketAddressHash: lwz %r13, 44(%r12) b OFSocketAddressHash .globl glue_OFSocketAddressString glue_OFSocketAddressString: lwz %r13, 44(%r12) b OFSocketAddressString .globl glue_OFSocketAddressSetIPPort glue_OFSocketAddressSetIPPort: lwz %r13, 44(%r12) b OFSocketAddressSetIPPort .globl glue_OFSocketAddressIPPort glue_OFSocketAddressIPPort: lwz %r13, 44(%r12) b OFSocketAddressIPPort .globl glue_OFSocketAddressUNIXPath glue_OFSocketAddressUNIXPath: lwz %r13, 44(%r12) b OFSocketAddressUNIXPath .globl glue_OFSocketAddressSetIPXNetwork glue_OFSocketAddressSetIPXNetwork: lwz %r13, 44(%r12) b OFSocketAddressSetIPXNetwork .globl glue_OFSocketAddressIPXNetwork glue_OFSocketAddressIPXNetwork: lwz %r13, 44(%r12) b OFSocketAddressIPXNetwork .globl glue_OFSocketAddressSetIPXNode glue_OFSocketAddressSetIPXNode: lwz %r13, 44(%r12) b OFSocketAddressSetIPXNode .globl glue_OFSocketAddressGetIPXNode glue_OFSocketAddressGetIPXNode: lwz %r13, 44(%r12) b OFSocketAddressGetIPXNode .globl glue_OFSocketAddressSetIPXPort glue_OFSocketAddressSetIPXPort: lwz %r13, 44(%r12) b OFSocketAddressSetIPXPort .globl glue_OFSocketAddressIPXPort glue_OFSocketAddressIPXPort: lwz %r13, 44(%r12) b OFSocketAddressIPXPort .globl glue_OFSocketAddressSetAppleTalkNetwork glue_OFSocketAddressSetAppleTalkNetwork: lwz %r13, 44(%r12) b OFSocketAddressSetAppleTalkNetwork .globl glue_OFSocketAddressAppleTalkNetwork glue_OFSocketAddressAppleTalkNetwork: lwz %r13, 44(%r12) b OFSocketAddressAppleTalkNetwork .globl glue_OFSocketAddressSetAppleTalkNode glue_OFSocketAddressSetAppleTalkNode: lwz %r13, 44(%r12) b OFSocketAddressSetAppleTalkNode .globl glue_OFSocketAddressAppleTalkNode glue_OFSocketAddressAppleTalkNode: lwz %r13, 44(%r12) b OFSocketAddressAppleTalkNode .globl glue_OFSocketAddressSetAppleTalkPort glue_OFSocketAddressSetAppleTalkPort: lwz %r13, 44(%r12) b OFSocketAddressSetAppleTalkPort .globl glue_OFSocketAddressAppleTalkPort glue_OFSocketAddressAppleTalkPort: lwz %r13, 44(%r12) b OFSocketAddressAppleTalkPort .globl glue_OFTLSStreamErrorCodeDescription glue_OFTLSStreamErrorCodeDescription: lwz %r13, 44(%r12) b OFTLSStreamErrorCodeDescription .globl glue_OFTLSStreamImplementationRef glue_OFTLSStreamImplementationRef: lwz %r13, 44(%r12) b OFTLSStreamImplementationRef .globl glue__OFStrPTime glue__OFStrPTime: lwz %r13, 44(%r12) b _OFStrPTime .globl glue_OFStringEncodingParseName glue_OFStringEncodingParseName: lwz %r13, 44(%r12) b OFStringEncodingParseName .globl glue_OFStringEncodingName glue_OFStringEncodingName: lwz %r13, 44(%r12) b OFStringEncodingName .globl glue_OFUTF16StringLength glue_OFUTF16StringLength: lwz %r13, 44(%r12) b OFUTF16StringLength .globl glue_OFUTF32StringLength glue_OFUTF32StringLength: lwz %r13, 44(%r12) b OFUTF32StringLength .globl glue_OFZIPArchiveEntryVersionToString glue_OFZIPArchiveEntryVersionToString: lwz %r13, 44(%r12) b OFZIPArchiveEntryVersionToString .globl glue_OFZIPArchiveEntryCompressionMethodName glue_OFZIPArchiveEntryCompressionMethodName: lwz %r13, 44(%r12) b OFZIPArchiveEntryCompressionMethodName .globl glue_OFZIPArchiveEntryExtraFieldFind glue_OFZIPArchiveEntryExtraFieldFind: lwz %r13, 44(%r12) b OFZIPArchiveEntryExtraFieldFind |
Added src/amiga-library-glue.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 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 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 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | /* * Copyright (c) 2008-2025 Jonathan Schleifer <js@nil.im> * * All rights reserved. * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License version 3.0 only, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * version 3.0 for more details. * * You should have received a copy of the GNU Lesser General Public License * version 3.0 along with this program. If not, see * <https://www.gnu.org/licenses/>. */ /* This file is automatically generated from amiga-library.xml */ #import "amiga-library.h" #import "OFObject.h" #import "OFStdIOStream.h" #import "OFApplication.h" #import "OFBlock.h" #import "OFDNSResourceRecord.h" #import "OFEmbeddedIRIHandler.h" #import "OFHTTPRequest.h" #import "OFHTTPResponse.h" #import "OFList.h" #import "OFMethodSignature.h" #import "OFOnce.h" #import "OFPBKDF2.h" #import "OFScrypt.h" #import "OFSocket.h" #import "OFTLSStream.h" #import "OFStrPTime.h" #import "OFString.h" #import "OFZIPArchiveEntry.h" #ifdef OF_AMIGAOS_M68K # define PPC_PARAMS(...) (void) # define M68K_ARG(type, name, reg) \ register type reg##name __asm__(#reg); \ type name = reg##name; #else # define PPC_PARAMS(...) (__VA_ARGS__) # define M68K_ARG(...) #endif extern bool glue_OFInit PPC_PARAMS(unsigned int version, struct OFLibC *_Nonnull libc, struct Library *_Nonnull RTBase); extern void *_Nullable glue_OFAllocMemory PPC_PARAMS(size_t count, size_t size); extern void *_Nullable glue_OFAllocZeroedMemory PPC_PARAMS(size_t count, size_t size); extern void *_Nullable glue_OFResizeMemory PPC_PARAMS(void *_Nullable pointer, size_t count, size_t size); extern void glue_OFFreeMemory PPC_PARAMS(void *_Nullable pointer); extern void glue_OFHashInit PPC_PARAMS(unsigned long *_Nonnull hash); extern uint16_t glue_OFRandom16(void); extern uint32_t glue_OFRandom32(void); extern uint64_t glue_OFRandom64(void); extern unsigned long *_Nonnull glue_OFHashSeedRef(void); extern OFStdIOStream *_Nonnull *_Nullable glue_OFStdInRef(void); extern OFStdIOStream *_Nonnull *_Nullable glue_OFStdOutRef(void); extern OFStdIOStream *_Nonnull *_Nullable glue_OFStdErrRef(void); extern void glue_OFLogV PPC_PARAMS(OFConstantString *format, va_list arguments); extern int glue_OFApplicationMain PPC_PARAMS(int *_Nonnull argc, char *_Nullable *_Nonnull *_Nonnull argv, id <OFApplicationDelegate> delegate); extern void *_Nullable glue__Block_copy PPC_PARAMS(const void *_Nullable block); extern void glue__Block_release PPC_PARAMS(const void *_Nullable block); extern OFString *_Nonnull glue_OFDNSClassName PPC_PARAMS(OFDNSClass DNSClass); extern OFString *_Nonnull glue_OFDNSRecordTypeName PPC_PARAMS(OFDNSRecordType recordType); extern OFDNSClass glue_OFDNSClassParseName PPC_PARAMS(OFString *_Nonnull string); extern OFDNSRecordType glue_OFDNSRecordTypeParseName PPC_PARAMS(OFString *_Nonnull string); extern void glue_OFRegisterEmbeddedFile PPC_PARAMS(OFString *_Nonnull name, const uint8_t *_Nonnull bytes, size_t size); extern OFString *_Nullable glue_OFHTTPRequestMethodString PPC_PARAMS(OFHTTPRequestMethod method); extern OFHTTPRequestMethod glue_OFHTTPRequestMethodParseString PPC_PARAMS(OFString *string); extern OFString *_Nonnull glue_OFHTTPStatusCodeString PPC_PARAMS(short code); extern OFListItem _Nullable glue_OFListItemNext PPC_PARAMS(OFListItem _Nonnull listItem); extern OFListItem _Nullable glue_OFListItemPrevious PPC_PARAMS(OFListItem _Nonnull listItem); extern id _Nonnull glue_OFListItemObject PPC_PARAMS(OFListItem _Nonnull listItem); extern size_t glue_OFSizeOfTypeEncoding PPC_PARAMS(const char *type); extern size_t glue_OFAlignmentOfTypeEncoding PPC_PARAMS(const char *type); extern void glue_OFOnce PPC_PARAMS(OFOnceControl *_Nonnull control, OFOnceFunction _Nonnull func); extern void glue_OFPBKDF2Wrapper PPC_PARAMS(const OFPBKDF2Parameters *_Nonnull parameters); extern void glue_OFScryptWrapper PPC_PARAMS(const OFScryptParameters *_Nonnull parameters); extern void glue__OFSalsa20_8Core PPC_PARAMS(uint32_t *_Nonnull buffer); extern void glue__OFScryptBlockMix PPC_PARAMS(uint32_t *_Nonnull output, const uint32_t *_Nonnull input, size_t blockSize); extern void glue__OFScryptROMix PPC_PARAMS(uint32_t *buffer, size_t blockSize, size_t costFactor, uint32_t *tmp); extern OFSocketAddress glue_OFSocketAddressParseIP PPC_PARAMS(OFString *IP, uint16_t port); extern OFSocketAddress glue_OFSocketAddressParseIPv4 PPC_PARAMS(OFString *IP, uint16_t port); extern OFSocketAddress glue_OFSocketAddressParseIPv6 PPC_PARAMS(OFString *IP, uint16_t port); extern OFSocketAddress glue_OFSocketAddressMakeUNIX PPC_PARAMS(OFString *path); extern OFSocketAddress glue_OFSocketAddressMakeIPX PPC_PARAMS(uint32_t network, const unsigned char *node, uint16_t port); extern OFSocketAddress glue_OFSocketAddressMakeAppleTalk PPC_PARAMS(uint16_t network, uint8_t node, uint8_t port); extern bool glue_OFSocketAddressEqual PPC_PARAMS(const OFSocketAddress *address1, const OFSocketAddress *address2); extern unsigned long glue_OFSocketAddressHash PPC_PARAMS(const OFSocketAddress *address); extern OFString *_Nonnull glue_OFSocketAddressString PPC_PARAMS(const OFSocketAddress *address); extern void glue_OFSocketAddressSetIPPort PPC_PARAMS(OFSocketAddress *address, uint16_t port); extern uint16_t glue_OFSocketAddressIPPort PPC_PARAMS(const OFSocketAddress *address); extern OFString *glue_OFSocketAddressUNIXPath PPC_PARAMS(const OFSocketAddress *address); extern void glue_OFSocketAddressSetIPXNetwork PPC_PARAMS(OFSocketAddress *address, uint32_t network); extern uint32_t glue_OFSocketAddressIPXNetwork PPC_PARAMS(const OFSocketAddress *address); extern void glue_OFSocketAddressSetIPXNode PPC_PARAMS(OFSocketAddress *address, const unsigned char *node); extern void glue_OFSocketAddressGetIPXNode PPC_PARAMS(const OFSocketAddress *address, unsigned char *_Nonnull node); extern void glue_OFSocketAddressSetIPXPort PPC_PARAMS(OFSocketAddress *address, uint16_t port); extern uint16_t glue_OFSocketAddressIPXPort PPC_PARAMS(const OFSocketAddress *address); extern void glue_OFSocketAddressSetAppleTalkNetwork PPC_PARAMS(OFSocketAddress *address, uint16_t network); extern uint16_t glue_OFSocketAddressAppleTalkNetwork PPC_PARAMS(const OFSocketAddress *address); extern void glue_OFSocketAddressSetAppleTalkNode PPC_PARAMS(OFSocketAddress *address, uint8_t node); extern uint8_t glue_OFSocketAddressAppleTalkNode PPC_PARAMS(const OFSocketAddress *address); extern void glue_OFSocketAddressSetAppleTalkPort PPC_PARAMS(OFSocketAddress *address, uint8_t port); extern uint8_t glue_OFSocketAddressAppleTalkPort PPC_PARAMS(const OFSocketAddress *address); extern OFString *glue_OFTLSStreamErrorCodeDescription PPC_PARAMS(OFTLSStreamErrorCode errorCode); extern Class _Nonnull *_Nullable glue_OFTLSStreamImplementationRef(void); extern const char *_Nullable glue__OFStrPTime PPC_PARAMS(const char *buffer, const char *format, struct tm *tm, int16_t *_Nullable tz); extern OFStringEncoding glue_OFStringEncodingParseName PPC_PARAMS(OFString *string); extern OFString *_Nullable glue_OFStringEncodingName PPC_PARAMS(OFStringEncoding encoding); extern size_t glue_OFUTF16StringLength PPC_PARAMS(const OFChar16 *string); extern size_t glue_OFUTF32StringLength PPC_PARAMS(const OFChar32 *string); extern OFString *_Nonnull glue_OFZIPArchiveEntryVersionToString PPC_PARAMS(uint16_t version); extern OFString *_Nonnull glue_OFZIPArchiveEntryCompressionMethodName PPC_PARAMS(OFZIPArchiveEntryCompressionMethod compressionMethod); extern size_t glue_OFZIPArchiveEntryExtraFieldFind PPC_PARAMS(OFData *extraField, OFZIPArchiveEntryExtraFieldTag tag, uint16_t *size); |
Added src/amiga-library-glue.m.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 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 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 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 142 143 144 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 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 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 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 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 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 |
/*
* Copyright (c) 2008-2025 Jonathan Schleifer <js@nil.im>
*
* All rights reserved.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License version 3.0 only,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* version 3.0 for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* version 3.0 along with this program. If not, see
* <https://www.gnu.org/licenses/>.
*/
/* This file is automatically generated from amiga-library.xml */
#include "config.h"
#import "amiga-glue.h"
bool __saveds
glue_OFInit(void)
{
M68K_ARG(unsigned int, version, d0)
M68K_ARG(struct OFLibC *_Nonnull, libc, a0)
M68K_ARG(struct Library *_Nonnull, RTBase, a1)
return OFInit(version, libc, RTBase);
}
void *_Nullable __saveds
glue_OFAllocMemory(void)
{
M68K_ARG(size_t, count, d0)
M68K_ARG(size_t, size, d1)
return OFAllocMemory(count, size);
}
void *_Nullable __saveds
glue_OFAllocZeroedMemory(void)
{
M68K_ARG(size_t, count, d0)
M68K_ARG(size_t, size, d1)
return OFAllocZeroedMemory(count, size);
}
void *_Nullable __saveds
glue_OFResizeMemory(void)
{
M68K_ARG(void *_Nullable, pointer, a0)
M68K_ARG(size_t, count, d0)
M68K_ARG(size_t, size, d1)
return OFResizeMemory(pointer, count, size);
}
void __saveds
glue_OFFreeMemory(void)
{
M68K_ARG(void *_Nullable, pointer, a0)
OFFreeMemory(pointer);
}
void __saveds
glue_OFHashInit(void)
{
M68K_ARG(unsigned long *_Nonnull, hash, a0)
OFHashInit(hash);
}
uint16_t __saveds
glue_OFRandom16(void)
{
return OFRandom16();
}
uint32_t __saveds
glue_OFRandom32(void)
{
return OFRandom32();
}
uint64_t __saveds
glue_OFRandom64(void)
{
return OFRandom64();
}
unsigned long *_Nonnull __saveds
glue_OFHashSeedRef(void)
{
return OFHashSeedRef();
}
OFStdIOStream *_Nonnull *_Nullable __saveds
glue_OFStdInRef(void)
{
return OFStdInRef();
}
OFStdIOStream *_Nonnull *_Nullable __saveds
glue_OFStdOutRef(void)
{
return OFStdOutRef();
}
OFStdIOStream *_Nonnull *_Nullable __saveds
glue_OFStdErrRef(void)
{
return OFStdErrRef();
}
void __saveds
glue_OFLogV(void)
{
M68K_ARG(OFConstantString *, format, a0)
M68K_ARG(va_list, arguments, a1)
OFLogV(format, arguments);
}
int __saveds
glue_OFApplicationMain(void)
{
M68K_ARG(int *_Nonnull, argc, a0)
M68K_ARG(char *_Nullable *_Nonnull *_Nonnull, argv, a1)
M68K_ARG(id <OFApplicationDelegate>, delegate, a2)
return OFApplicationMain(argc, argv, delegate);
}
void *_Nullable __saveds
glue__Block_copy(void)
{
M68K_ARG(const void *_Nullable, block, a0)
return _Block_copy(block);
}
void __saveds
glue__Block_release(void)
{
M68K_ARG(const void *_Nullable, block, a0)
_Block_release(block);
}
OFString *_Nonnull __saveds
glue_OFDNSClassName(void)
{
M68K_ARG(OFDNSClass, DNSClass, d0)
return OFDNSClassName(DNSClass);
}
OFString *_Nonnull __saveds
glue_OFDNSRecordTypeName(void)
{
M68K_ARG(OFDNSRecordType, recordType, d0)
return OFDNSRecordTypeName(recordType);
}
OFDNSClass __saveds
glue_OFDNSClassParseName(void)
{
M68K_ARG(OFString *_Nonnull, string, a0)
return OFDNSClassParseName(string);
}
OFDNSRecordType __saveds
glue_OFDNSRecordTypeParseName(void)
{
M68K_ARG(OFString *_Nonnull, string, a0)
return OFDNSRecordTypeParseName(string);
}
void __saveds
glue_OFRegisterEmbeddedFile(void)
{
M68K_ARG(OFString *_Nonnull, name, a0)
M68K_ARG(const uint8_t *_Nonnull, bytes, a1)
M68K_ARG(size_t, size, d0)
OFRegisterEmbeddedFile(name, bytes, size);
}
OFString *_Nullable __saveds
glue_OFHTTPRequestMethodString(void)
{
M68K_ARG(OFHTTPRequestMethod, method, d0)
return OFHTTPRequestMethodString(method);
}
OFHTTPRequestMethod __saveds
glue_OFHTTPRequestMethodParseString(void)
{
M68K_ARG(OFString *, string, a0)
return OFHTTPRequestMethodParseString(string);
}
OFString *_Nonnull __saveds
glue_OFHTTPStatusCodeString(void)
{
M68K_ARG(short, code, d0)
return OFHTTPStatusCodeString(code);
}
OFListItem _Nullable __saveds
glue_OFListItemNext(void)
{
M68K_ARG(OFListItem _Nonnull, listItem, a0)
return OFListItemNext(listItem);
}
OFListItem _Nullable __saveds
glue_OFListItemPrevious(void)
{
M68K_ARG(OFListItem _Nonnull, listItem, a0)
return OFListItemPrevious(listItem);
}
id _Nonnull __saveds
glue_OFListItemObject(void)
{
M68K_ARG(OFListItem _Nonnull, listItem, a0)
return OFListItemObject(listItem);
}
size_t __saveds
glue_OFSizeOfTypeEncoding(void)
{
M68K_ARG(const char *, type, a0)
return OFSizeOfTypeEncoding(type);
}
size_t __saveds
glue_OFAlignmentOfTypeEncoding(void)
{
M68K_ARG(const char *, type, a0)
return OFAlignmentOfTypeEncoding(type);
}
void __saveds
glue_OFOnce(void)
{
M68K_ARG(OFOnceControl *_Nonnull, control, a0)
M68K_ARG(OFOnceFunction _Nonnull, func, a1)
OFOnce(control, func);
}
void __saveds
glue_OFPBKDF2Wrapper(void)
{
M68K_ARG(const OFPBKDF2Parameters *_Nonnull, parameters, a0)
OFPBKDF2Wrapper(parameters);
}
void __saveds
glue_OFScryptWrapper(void)
{
M68K_ARG(const OFScryptParameters *_Nonnull, parameters, a0)
OFScryptWrapper(parameters);
}
void __saveds
glue__OFSalsa20_8Core(void)
{
M68K_ARG(uint32_t *_Nonnull, buffer, a0)
_OFSalsa20_8Core(buffer);
}
void __saveds
glue__OFScryptBlockMix(void)
{
M68K_ARG(uint32_t *_Nonnull, output, a0)
M68K_ARG(const uint32_t *_Nonnull, input, a1)
M68K_ARG(size_t, blockSize, d0)
_OFScryptBlockMix(output, input, blockSize);
}
void __saveds
glue__OFScryptROMix(void)
{
M68K_ARG(uint32_t *, buffer, a0)
M68K_ARG(size_t, blockSize, d0)
M68K_ARG(size_t, costFactor, d1)
M68K_ARG(uint32_t *, tmp, a1)
_OFScryptROMix(buffer, blockSize, costFactor, tmp);
}
OFSocketAddress __saveds
glue_OFSocketAddressParseIP(void)
{
M68K_ARG(OFString *, IP, a0)
M68K_ARG(uint16_t, port, d0)
return OFSocketAddressParseIP(IP, port);
}
OFSocketAddress __saveds
glue_OFSocketAddressParseIPv4(void)
{
M68K_ARG(OFString *, IP, a0)
M68K_ARG(uint16_t, port, d0)
return OFSocketAddressParseIPv4(IP, port);
}
OFSocketAddress __saveds
glue_OFSocketAddressParseIPv6(void)
{
M68K_ARG(OFString *, IP, a0)
M68K_ARG(uint16_t, port, d0)
return OFSocketAddressParseIPv6(IP, port);
}
OFSocketAddress __saveds
glue_OFSocketAddressMakeUNIX(void)
{
M68K_ARG(OFString *, path, a0)
return OFSocketAddressMakeUNIX(path);
}
OFSocketAddress __saveds
glue_OFSocketAddressMakeIPX(void)
{
M68K_ARG(uint32_t, network, d0)
M68K_ARG(const unsigned char *, node, a0)
M68K_ARG(uint16_t, port, d1)
return OFSocketAddressMakeIPX(network, node, port);
}
OFSocketAddress __saveds
glue_OFSocketAddressMakeAppleTalk(void)
{
M68K_ARG(uint16_t, network, d0)
M68K_ARG(uint8_t, node, d1)
M68K_ARG(uint8_t, port, d2)
return OFSocketAddressMakeAppleTalk(network, node, port);
}
bool __saveds
glue_OFSocketAddressEqual(void)
{
M68K_ARG(const OFSocketAddress *, address1, a0)
M68K_ARG(const OFSocketAddress *, address2, a1)
return OFSocketAddressEqual(address1, address2);
}
unsigned long __saveds
glue_OFSocketAddressHash(void)
{
M68K_ARG(const OFSocketAddress *, address, a0)
return OFSocketAddressHash(address);
}
OFString *_Nonnull __saveds
glue_OFSocketAddressString(void)
{
M68K_ARG(const OFSocketAddress *, address, a0)
return OFSocketAddressString(address);
}
void __saveds
glue_OFSocketAddressSetIPPort(void)
{
M68K_ARG(OFSocketAddress *, address, a0)
M68K_ARG(uint16_t, port, d0)
OFSocketAddressSetIPPort(address, port);
}
uint16_t __saveds
glue_OFSocketAddressIPPort(void)
{
M68K_ARG(const OFSocketAddress *, address, a0)
return OFSocketAddressIPPort(address);
}
OFString * __saveds
glue_OFSocketAddressUNIXPath(void)
{
M68K_ARG(const OFSocketAddress *, address, a0)
return OFSocketAddressUNIXPath(address);
}
void __saveds
glue_OFSocketAddressSetIPXNetwork(void)
{
M68K_ARG(OFSocketAddress *, address, a0)
M68K_ARG(uint32_t, network, d0)
OFSocketAddressSetIPXNetwork(address, network);
}
uint32_t __saveds
glue_OFSocketAddressIPXNetwork(void)
{
M68K_ARG(const OFSocketAddress *, address, a0)
return OFSocketAddressIPXNetwork(address);
}
void __saveds
glue_OFSocketAddressSetIPXNode(void)
{
M68K_ARG(OFSocketAddress *, address, a0)
M68K_ARG(const unsigned char *, node, a1)
OFSocketAddressSetIPXNode(address, node);
}
void __saveds
glue_OFSocketAddressGetIPXNode(void)
{
M68K_ARG(const OFSocketAddress *, address, a0)
M68K_ARG(unsigned char *_Nonnull, node, a1)
OFSocketAddressGetIPXNode(address, node);
}
void __saveds
glue_OFSocketAddressSetIPXPort(void)
{
M68K_ARG(OFSocketAddress *, address, a0)
M68K_ARG(uint16_t, port, d0)
OFSocketAddressSetIPXPort(address, port);
}
uint16_t __saveds
glue_OFSocketAddressIPXPort(void)
{
M68K_ARG(const OFSocketAddress *, address, a0)
return OFSocketAddressIPXPort(address);
}
void __saveds
glue_OFSocketAddressSetAppleTalkNetwork(void)
{
M68K_ARG(OFSocketAddress *, address, a0)
M68K_ARG(uint16_t, network, d0)
OFSocketAddressSetAppleTalkNetwork(address, network);
}
uint16_t __saveds
glue_OFSocketAddressAppleTalkNetwork(void)
{
M68K_ARG(const OFSocketAddress *, address, a0)
return OFSocketAddressAppleTalkNetwork(address);
}
void __saveds
glue_OFSocketAddressSetAppleTalkNode(void)
{
M68K_ARG(OFSocketAddress *, address, a0)
M68K_ARG(uint8_t, node, d0)
OFSocketAddressSetAppleTalkNode(address, node);
}
uint8_t __saveds
glue_OFSocketAddressAppleTalkNode(void)
{
M68K_ARG(const OFSocketAddress *, address, a0)
return OFSocketAddressAppleTalkNode(address);
}
void __saveds
glue_OFSocketAddressSetAppleTalkPort(void)
{
M68K_ARG(OFSocketAddress *, address, a0)
M68K_ARG(uint8_t, port, d0)
OFSocketAddressSetAppleTalkPort(address, port);
}
uint8_t __saveds
glue_OFSocketAddressAppleTalkPort(void)
{
M68K_ARG(const OFSocketAddress *, address, a0)
return OFSocketAddressAppleTalkPort(address);
}
OFString * __saveds
glue_OFTLSStreamErrorCodeDescription(void)
{
M68K_ARG(OFTLSStreamErrorCode, errorCode, d0)
return OFTLSStreamErrorCodeDescription(errorCode);
}
Class _Nonnull *_Nullable __saveds
glue_OFTLSStreamImplementationRef(void)
{
return OFTLSStreamImplementationRef();
}
const char *_Nullable __saveds
glue__OFStrPTime(void)
{
M68K_ARG(const char *, buffer, a0)
M68K_ARG(const char *, format, a1)
M68K_ARG(struct tm *, tm, a2)
M68K_ARG(int16_t *_Nullable, tz, a3)
return _OFStrPTime(buffer, format, tm, tz);
}
OFStringEncoding __saveds
glue_OFStringEncodingParseName(void)
{
M68K_ARG(OFString *, string, a0)
return OFStringEncodingParseName(string);
}
OFString *_Nullable __saveds
glue_OFStringEncodingName(void)
{
M68K_ARG(OFStringEncoding, encoding, d0)
return OFStringEncodingName(encoding);
}
size_t __saveds
glue_OFUTF16StringLength(void)
{
M68K_ARG(const OFChar16 *, string, a0)
return OFUTF16StringLength(string);
}
size_t __saveds
glue_OFUTF32StringLength(void)
{
M68K_ARG(const OFChar32 *, string, a0)
return OFUTF32StringLength(string);
}
OFString *_Nonnull __saveds
glue_OFZIPArchiveEntryVersionToString(void)
{
M68K_ARG(uint16_t, version, d0)
return OFZIPArchiveEntryVersionToString(version);
}
OFString *_Nonnull __saveds
glue_OFZIPArchiveEntryCompressionMethodName(void)
{
M68K_ARG(OFZIPArchiveEntryCompressionMethod, compressionMethod, d0)
return OFZIPArchiveEntryCompressionMethodName(compressionMethod);
}
size_t __saveds
glue_OFZIPArchiveEntryExtraFieldFind(void)
{
M68K_ARG(OFData *, extraField, a0)
M68K_ARG(OFZIPArchiveEntryExtraFieldTag, tag, d0)
M68K_ARG(uint16_t *, size, a1)
return OFZIPArchiveEntryExtraFieldFind(extraField, tag, size);
}
|
Added src/amiga-library.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 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 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 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
/*
* Copyright (c) 2008-2025 Jonathan Schleifer <js@nil.im>
*
* All rights reserved.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License version 3.0 only,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* version 3.0 for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* version 3.0 along with this program. If not, see
* <https://www.gnu.org/licenses/>.
*/
#import "macros.h"
#import "OFPBKDF2.h"
#import "OFScrypt.h"
#include <exec/libraries.h>
#ifdef OF_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
#ifdef OF_MORPHOS
# include <setjmp.h>
#endif
typedef void (*OFSignalHandler)(int);
struct OFLibC {
/*
* 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);
void *_Nullable (*_Nonnull realloc)(void *_Nullable, size_t);
void (*_Nonnull free)(void *_Nullable);
void (*_Nonnull abort)(void);
#ifdef HAVE_SJLJ_EXCEPTIONS
int (*_Nonnull _Unwind_SjLj_RaiseException)(void *_Nonnull);
#else
int (*_Nonnull _Unwind_RaiseException)(void *_Nonnull);
#endif
void (*_Nonnull _Unwind_DeleteException)(void *_Nonnull);
void *_Nullable (*_Nonnull _Unwind_GetLanguageSpecificData)(
void *_Nonnull);
uintptr_t (*_Nonnull _Unwind_GetRegionStart)(void *_Nonnull);
uintptr_t (*_Nonnull _Unwind_GetDataRelBase)(void *_Nonnull);
uintptr_t (*_Nonnull _Unwind_GetTextRelBase)(void *_Nonnull);
uintptr_t (*_Nonnull _Unwind_GetIP)(void *_Nonnull);
uintptr_t (*_Nonnull _Unwind_GetGR)(void *_Nonnull, int);
void (*_Nonnull _Unwind_SetIP)(void *_Nonnull, uintptr_t);
void (*_Nonnull _Unwind_SetGR)(void *_Nonnull, int, uintptr_t);
#ifdef HAVE_SJLJ_EXCEPTIONS
void (*_Nonnull _Unwind_SjLj_Resume)(void *_Nonnull);
#else
void (*_Nonnull _Unwind_Resume)(void *_Nonnull);
#endif
#ifdef OF_AMIGAOS_M68K
void (*_Nonnull __register_frame_info)(const void *_Nonnull,
void *_Nonnull);
void *_Nullable (*_Nonnull __deregister_frame_info)(
const void *_Nonnull);
#endif
#ifdef OF_MORPHOS
void (*_Nonnull __register_frame)(void *_Nonnull);
void (*_Nonnull __deregister_frame)(void *_Nonnull);
#endif
int *_Nonnull (*_Nonnull errNo)(void);
/* Needed only by ObjFW. */
#ifdef OF_MORPHOS
int (*_Nonnull vasprintf)(char *_Nonnull *_Nullable restrict,
const char *_Nonnull restrict, va_list);
#else
int (*_Nonnull vsnprintf)(char *_Nonnull restrict, size_t,
const char *_Nonnull restrict, va_list);
#endif
float (*_Nonnull strtof)(const char *_Nonnull,
char *_Nullable *_Nullable);
double (*_Nonnull strtod)(const char *_Nonnull,
char *_Nullable *_Nullable);
#ifdef OF_MORPHOS
struct tm *(*_Nonnull gmtime_r)(const time_t *_Nonnull,
struct tm *_Nonnull);
struct tm *(*_Nonnull localtime_r)(const time_t *_Nonnull,
struct tm *_Nonnull);
#endif
time_t (*_Nonnull mktime)(struct tm *_Nonnull);
int (*_Nonnull gettimeofday)(struct timeval *_Nonnull,
struct timezone *_Nullable);
size_t (*_Nonnull strftime)(char *_Nonnull, size_t,
const char *_Nonnull, const struct tm *_Nonnull);
void (*_Nonnull exit)(int);
int (*_Nonnull atexit)(void (*_Nonnull)(void));
OFSignalHandler _Nullable (*_Nonnull signal)(int, OFSignalHandler _Nullable);
char *_Nullable (*_Nonnull setlocale)(int, const char *_Nullable);
int (*_Nonnull _Unwind_Backtrace)(int (*_Nonnull)(void *_Nonnull,
void *_Null_unspecified), void *_Null_unspecified);
#ifdef OF_MORPHOS
int (*_Nonnull setjmp)(jmp_buf);
void __dead2 (*_Nonnull longjmp)(jmp_buf, int);
#endif
};
extern bool OFInit(unsigned int version, struct OFLibC *_Nonnull libC,
struct Library *_Nonnull RTBase);
extern unsigned long *OFHashSeedRef(void);
extern void OFPBKDF2Wrapper(const OFPBKDF2Parameters *_Nonnull parameters);
extern void OFScryptWrapper(const OFScryptParameters *_Nonnull parameters);
|
Added src/amiga-library.m.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 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 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 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 142 143 144 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 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 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 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 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 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 |
/*
* Copyright (c) 2008-2025 Jonathan Schleifer <js@nil.im>
*
* All rights reserved.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License version 3.0 only,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* version 3.0 for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* version 3.0 along with this program. If not, see
* <https://www.gnu.org/licenses/>.
*/
#include "config.h"
#import "OFDNSResourceRecord.h"
#import "OFHTTPRequest.h"
#import "OFSocket.h"
#import "OFStdIOStream.h"
#import "OFString.h"
#import "macros.h"
#import "amiga-glue.h"
#import "amiga-library.h"
#define Class IntuitionClass
#include <exec/libraries.h>
#include <exec/nodes.h>
#include <exec/resident.h>
#include <proto/exec.h>
#undef Class
#define CONCAT_VERSION2(major, minor) #major "." #minor
#define CONCAT_VERSION(major, minor) CONCAT_VERSION2(major, minor)
#define VERSION_STRING CONCAT_VERSION(OBJFW_LIB_MAJOR, OBJFW_LIB_MINOR)
#if defined(OF_AMIGAOS_M68K)
# define DATA_OFFSET 0x7FFE
#elif defined(OF_MORPHOS)
# define DATA_OFFSET 0x8000
#endif
#ifdef OF_AMIGAOS_M68K
# define OF_M68K_REG(reg) __asm__(#reg)
#else
# define OF_M68K_REG(reg)
#endif
/* This always needs to be the first thing in the file. */
int
_start(void)
{
return -1;
}
#ifdef OF_AMIGAOS_M68K
void
__init_eh(void)
{
/* Taken care of by OFInit() */
}
#endif
struct ObjFWBase {
struct Library library;
void *segList;
struct ObjFWBase *parent;
char *dataSeg;
bool initialized;
};
#ifdef OF_AMIGAOS_M68K
extern uintptr_t __CTOR_LIST__[];
extern const void *_EH_FRAME_BEGINS__;
extern void *_EH_FRAME_OBJECTS__;
#endif
#ifdef OF_MORPHOS
const ULONG __abox__ = 1;
#endif
struct ExecBase *SysBase;
struct OFLibC libC;
struct Library *ObjFWRTBase;
#if defined(OF_AMIGAOS_M68K)
__asm__ (
".text\n"
".globl ___restore_a4\n"
".align 1\n"
"___restore_a4:\n"
" movea.l 42(a6), a4\n"
" rts"
);
#elif defined(OF_MORPHOS)
/* All __saveds functions in this file need to use the M68K ABI */
__asm__ (
".section .text\n"
".align 2\n"
"__restore_r13:\n"
" lwz %r13, 56(%r2)\n"
" lwz %r13, 44(%r13)\n"
" blr\n"
);
#endif
static OF_INLINE char *
getDataSeg(void)
{
char *dataSeg;
#if defined(OF_AMIGAOS_M68K)
__asm__ (
"move.l #___a4_init, %0"
: "=r"(dataSeg)
);
#elif defined(OF_MORPHOS)
__asm__ (
"lis %0, __r13_init@ha\n\t"
"la %0, __r13_init@l(%0)"
: "=r"(dataSeg)
);
#endif
return dataSeg;
}
static OF_INLINE size_t
getDataSize(void)
{
size_t dataSize;
#if defined(OF_AMIGAOS_M68K)
__asm__ (
"move.l #___data_size, %0\n\t"
"add.l #___bss_size, %0"
: "=r"(dataSize)
);
#elif defined(OF_MORPHOS)
__asm__ (
"lis %0, __sdata_size@ha\n\t"
"la %0, __sdata_size@l(%0)\n\t"
"lis %%r9, __sbss_size@ha\n\t"
"la %%r9, __sbss_size@l(%%r9)\n\t"
"add %0, %0, %%r9"
: "=r"(dataSize)
:: "r9"
);
#endif
return dataSize;
}
static OF_INLINE size_t *
getDataDataRelocs(void)
{
size_t *dataDataRelocs;
#if defined(OF_AMIGAOS_M68K)
__asm__ (
"move.l #___datadata_relocs, %0"
: "=r"(dataDataRelocs)
);
#elif defined(OF_MORPHOS)
__asm__ (
"lis %0, __datadata_relocs@ha\n\t"
"la %0, __datadata_relocs@l(%0)\n\t"
: "=r"(dataDataRelocs)
);
#endif
return dataDataRelocs;
}
static struct Library *
libInit(struct ObjFWBase *base OF_M68K_REG(d0),
void *segList OF_M68K_REG(a0), struct ExecBase *sysBase OF_M68K_REG(a6))
{
#if defined(OF_AMIGAOS_M68K)
__asm__ __volatile__ (
"move.l a6, _SysBase"
:: "a"(sysBase)
);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"lis %%r9, SysBase@ha\n\t"
"stw %0, SysBase@l(%%r9)"
:: "r"(sysBase) : "r9"
);
#endif
base->segList = segList;
base->parent = NULL;
base->dataSeg = getDataSeg();
return &base->library;
}
struct Library *__saveds
libOpen(void)
{
OF_M68K_ARG(struct ObjFWBase *, base, a6)
struct ObjFWBase *child;
size_t dataSize, *dataDataRelocs;
ptrdiff_t displacement;
if (base->parent != NULL)
return NULL;
base->library.lib_OpenCnt++;
base->library.lib_Flags &= ~LIBF_DELEXP;
/*
* We cannot use malloc here, as that depends on the libC passed from
* the application.
*/
if ((child = AllocMem(base->library.lib_NegSize +
base->library.lib_PosSize, MEMF_ANY)) == NULL) {
base->library.lib_OpenCnt--;
return NULL;
}
memcpy(child, (char *)base - base->library.lib_NegSize,
base->library.lib_NegSize + base->library.lib_PosSize);
child = (struct ObjFWBase *)((char *)child + base->library.lib_NegSize);
child->library.lib_OpenCnt = 1;
child->parent = base;
dataSize = getDataSize();
if ((child->dataSeg = AllocMem(dataSize, MEMF_ANY)) == NULL) {
FreeMem((char *)child - child->library.lib_NegSize,
child->library.lib_NegSize + child->library.lib_PosSize);
base->library.lib_OpenCnt--;
return NULL;
}
memcpy(child->dataSeg, base->dataSeg - DATA_OFFSET, dataSize);
dataDataRelocs = getDataDataRelocs();
displacement = child->dataSeg - (base->dataSeg - DATA_OFFSET);
for (size_t i = 1; i <= dataDataRelocs[0]; i++)
*(long *)(child->dataSeg + dataDataRelocs[i]) += displacement;
child->dataSeg += DATA_OFFSET;
return &child->library;
}
static void *
expunge(struct ObjFWBase *base, struct ExecBase *sysBase)
{
#define SysBase sysBase
void *segList;
if (base->parent != NULL) {
base->parent->library.lib_Flags |= LIBF_DELEXP;
return 0;
}
if (base->library.lib_OpenCnt > 0) {
base->library.lib_Flags |= LIBF_DELEXP;
return 0;
}
segList = base->segList;
Remove(&base->library.lib_Node);
FreeMem((char *)base - base->library.lib_NegSize,
base->library.lib_NegSize + base->library.lib_PosSize);
return segList;
#undef SysBase
}
static void *__saveds
libExpunge(void)
{
OF_M68K_ARG(struct ObjFWBase *, base, a6)
return expunge(base, SysBase);
}
static void *__saveds
libClose(void)
{
/*
* SysBase becomes invalid during this function, so we store it in
* sysBase and add a define to make the inlines use the right one.
*/
struct ExecBase *sysBase = SysBase;
#define SysBase sysBase
OF_M68K_ARG(struct ObjFWBase *, base, a6)
if (base->parent != NULL) {
struct ObjFWBase *parent;
#ifdef OF_AMIGAOS_M68K
if (base->initialized)
for (void *const *frame = _EH_FRAME_BEGINS__;
*frame != NULL;)
libC.__deregister_frame_info(*frame++);
#endif
parent = base->parent;
FreeMem(base->dataSeg - DATA_OFFSET, getDataSize());
FreeMem((char *)base - base->library.lib_NegSize,
base->library.lib_NegSize + base->library.lib_PosSize);
base = parent;
}
if (--base->library.lib_OpenCnt == 0 &&
(base->library.lib_Flags & LIBF_DELEXP))
return expunge(base, sysBase);
return NULL;
#undef SysBase
}
static void *
libNull(void)
{
return NULL;
}
static void __saveds
OFInitPart2(uintptr_t *iter0, struct Library *RTBase)
{
uintptr_t *iter;
ObjFWRTBase = RTBase;
for (iter = iter0; *iter != 0; iter++);
while (iter > iter0) {
void (*ctor)(void) = (void (*)(void))*--iter;
ctor();
}
}
bool
OFInit(unsigned int version, struct OFLibC *libC_, struct Library *RTBase)
{
#ifdef OF_AMIGAOS_M68K
OF_M68K_ARG(struct ObjFWBase *, base, a6)
#else
register struct ObjFWBase *r12 __asm__("r12");
struct ObjFWBase *base = r12;
#endif
#ifdef OF_MORPHOS
void *frame;
#endif
uintptr_t *iter0;
if (version > 1)
return false;
if (base->initialized)
return true;
memcpy(&libC, libC_, sizeof(libC));
#ifdef OF_AMIGAOS_M68K
for (void *const *frame = _EH_FRAME_BEGINS__,
**object = _EH_FRAME_OBJECTS__; *frame != NULL;)
libC.__register_frame_info(*frame++, *object++);
iter0 = &__CTOR_LIST__[1];
#elif defined(OF_MORPHOS)
__asm__ (
"lis %0, __EH_FRAME_BEGIN__@ha\n\t"
"la %0, __EH_FRAME_BEGIN__@l(%0)\n\t"
"lis %1, __CTOR_LIST__@ha\n\t"
"la %1, __CTOR_LIST__@l(%1)\n\t"
: "=r"(frame), "=r"(iter0)
);
libC.__register_frame(frame);
#endif
OFInitPart2(iter0, RTBase);
base->initialized = true;
return true;
}
void *
malloc(size_t size)
{
return libC.malloc(size);
}
void *
calloc(size_t count, size_t size)
{
return libC.calloc(count, size);
}
void *
realloc(void *ptr, size_t size)
{
return libC.realloc(ptr, size);
}
void
free(void *ptr)
{
libC.free(ptr);
}
void
abort(void)
{
libC.abort();
OF_UNREACHABLE
}
#ifdef HAVE_SJLJ_EXCEPTIONS
int
_Unwind_SjLj_RaiseException(void *ex)
{
return libC._Unwind_SjLj_RaiseException(ex);
}
#else
int
_Unwind_RaiseException(void *ex)
{
return libC._Unwind_RaiseException(ex);
}
#endif
void
_Unwind_DeleteException(void *ex)
{
libC._Unwind_DeleteException(ex);
}
void *
_Unwind_GetLanguageSpecificData(void *ctx)
{
return libC._Unwind_GetLanguageSpecificData(ctx);
}
uintptr_t
_Unwind_GetRegionStart(void *ctx)
{
return libC._Unwind_GetRegionStart(ctx);
}
uintptr_t
_Unwind_GetDataRelBase(void *ctx)
{
return libC._Unwind_GetDataRelBase(ctx);
}
uintptr_t
_Unwind_GetTextRelBase(void *ctx)
{
return libC._Unwind_GetTextRelBase(ctx);
}
uintptr_t
_Unwind_GetIP(void *ctx)
{
return libC._Unwind_GetIP(ctx);
}
uintptr_t
_Unwind_GetGR(void *ctx, int gr)
{
return libC._Unwind_GetGR(ctx, gr);
}
void
_Unwind_SetIP(void *ctx, uintptr_t ip)
{
libC._Unwind_SetIP(ctx, ip);
}
void
_Unwind_SetGR(void *ctx, int gr, uintptr_t value)
{
libC._Unwind_SetGR(ctx, gr, value);
}
#ifdef HAVE_SJLJ_EXCEPTIONS
void
_Unwind_SjLj_Resume(void *ex)
{
libC._Unwind_SjLj_Resume(ex);
}
#else
void
_Unwind_Resume(void *ex)
{
libC._Unwind_Resume(ex);
}
#endif
#ifdef OF_AMIGAOS_M68K
void
__register_frame_info(const void *begin, void *object)
{
libC.__register_frame_info(begin, object);
}
void
*__deregister_frame_info(const void *begin)
{
return libC.__deregister_frame_info(begin);
}
#endif
#ifdef OF_MORPHOS
void __register_frame(void *frame)
{
libC.__register_frame(frame);
}
void __deregister_frame(void *frame)
{
libC.__deregister_frame(frame);
}
#endif
int *
OFErrNo(void)
{
return libC.errNo();
}
#ifdef OF_MORPHOS
int
vasprintf(char **restrict strp, const char *restrict fmt, va_list args)
{
return libC.vasprintf(strp, fmt, args);
}
int
asprintf(char **restrict strp, const char *restrict fmt, ...)
{
va_list args;
int ret;
va_start(args, fmt);
ret = vasprintf(strp, fmt, args);
va_end(args);
return ret;
}
#else
int
vsnprintf(char *restrict str, size_t size, const char *restrict fmt,
va_list args)
{
return libC.vsnprintf(str, size, fmt, args);
}
#endif
float
strtof(const char *str, char **endptr)
{
return libC.strtof(str, endptr);
}
double
strtod(const char *str, char **endptr)
{
return libC.strtod(str, endptr);
}
#ifdef OF_MORPHOS
struct tm *
gmtime_r(const time_t *time, struct tm *tm)
{
return libC.gmtime_r(time, tm);
}
struct tm *
localtime_r(const time_t *time, struct tm *tm)
{
return libC.localtime_r(time, tm);
}
#endif
int
gettimeofday(struct timeval *tv, struct timezone *tz)
{
return libC.gettimeofday(tv, tz);
}
time_t
mktime(struct tm *tm)
{
return libC.mktime(tm);
}
size_t
strftime(char *str, size_t len, const char *fmt, const struct tm *tm)
{
return libC.strftime(str, len, fmt, tm);
}
void
exit(int status)
{
libC.exit(status);
OF_UNREACHABLE
}
int
atexit(void (*function)(void))
{
return libC.atexit(function);
}
OFSignalHandler
signal(int sig, OFSignalHandler func)
{
return libC.signal(sig, func);
}
char *
setlocale(int category, const char *locale)
{
return libC.setlocale(category, locale);
}
int
_Unwind_Backtrace(int (*callback)(void *, void *), void *data)
{
return libC._Unwind_Backtrace(callback, data);
}
#ifdef OF_MORPHOS
int
setjmp(jmp_buf env)
{
return libC.setjmp(env);
}
void
longjmp(jmp_buf env, int val)
{
libC.longjmp(env, val);
}
#endif
void
OFPBKDF2Wrapper(const OFPBKDF2Parameters *parameters)
{
OFPBKDF2(*parameters);
}
void
OFScryptWrapper(const OFScryptParameters *parameters)
{
OFScrypt(*parameters);
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
static CONST_APTR functionTable[] = {
#ifdef OF_MORPHOS
(CONST_APTR)FUNCARRAY_BEGIN,
(CONST_APTR)FUNCARRAY_32BIT_NATIVE,
#endif
(CONST_APTR)libOpen,
(CONST_APTR)libClose,
(CONST_APTR)libExpunge,
(CONST_APTR)libNull,
#ifdef OF_MORPHOS
(CONST_APTR)-1,
(CONST_APTR)FUNCARRAY_32BIT_SYSTEMV,
#endif
#include "amiga-funcarray.inc"
(CONST_APTR)-1,
#ifdef OF_MORPHOS
(CONST_APTR)FUNCARRAY_END
#endif
};
#pragma GCC diagnostic pop
static struct {
ULONG dataSize;
CONST_APTR *functionTable;
ULONG *dataTable;
struct Library *(*initFunc)(
struct ObjFWBase *base OF_M68K_REG(d0),
void *segList OF_M68K_REG(a0),
struct ExecBase *execBase OF_M68K_REG(a6));
} init_table = {
sizeof(struct ObjFWBase),
functionTable,
NULL,
libInit
};
struct Resident resident = {
.rt_MatchWord = RTC_MATCHWORD,
.rt_MatchTag = &resident,
.rt_EndSkip = &resident + 1,
.rt_Flags = RTF_AUTOINIT
#ifdef OF_MORPHOS
| RTF_PPC | RTF_EXTENDED
#endif
,
.rt_Version = OBJFW_LIB_MAJOR,
.rt_Type = NT_LIBRARY,
.rt_Pri = 0,
.rt_Name = (char *)OBJFW_AMIGA_LIB,
.rt_IdString = (char *)"ObjFW " VERSION_STRING
" \xA9 2008-2023 Jonathan Schleifer",
.rt_Init = &init_table,
#ifdef OF_MORPHOS
.rt_Revision = OBJFW_LIB_MINOR,
.rt_Tags = NULL,
#endif
};
#if defined(OF_MORPHOS)
__asm__ (
".section .eh_frame, \"aw\"\n"
".globl __EH_FRAME_BEGIN__\n"
".type __EH_FRAME_BEGIN__, @object\n"
"__EH_FRAME_BEGIN__:\n"
".section .ctors, \"aw\"\n"
".globl __CTOR_LIST__\n"
".type __CTOR_LIST__, @object\n"
"__CTOR_LIST__:\n"
".section .text"
);
#elif defined(OF_AMIGAOS_M68K)
__asm__ (
".section .list___EH_FRAME_BEGINS__, \"aw\"\n"
".globl __EH_FRAME_BEGIN__\n"
".type __EH_FRAME_BEGIN__, @object\n"
"__EH_FRAME_BEGINS__:\n"
".section .dlist___EH_FRAME_OBJECTS__, \"aw\"\n"
".globl __EH_FRAME_OBJECTS__\n"
".type __EH_FRAME_OBJECTS__, @object\n"
"__EH_FRAME_OBJECTS__:\n"
".section .list___CTOR_LIST__, \"aw\"\n"
".globl ___CTOR_LIST__\n"
".type ___CTOR_LIST__, @object\n"
"___CTOR_LIST__:\n"
".section .text"
);
#endif
|
Added src/amiga-library.xml.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 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 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 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 142 143 144 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 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 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 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 |
<amiga-library version='1.0' base='ObjFWBase'>
<include>amiga-library.h</include>
<!-- The following function is only for the linklib. -->
<function name='OFInit' return-type='bool'>
<argument name='version' type='unsigned int' m68k-reg='d0'/>
<argument name='libc' type='struct OFLibC *_Nonnull' m68k-reg='a0'/>
<argument name='RTBase' type='struct Library *_Nonnull' m68k-reg='a1'/>
</function>
<include>OFObject.h</include>
<function name='OFAllocMemory' return-type='void *_Nullable'>
<argument name='count' type='size_t' m68k-reg='d0'/>
<argument name='size' type='size_t' m68k-reg='d1'/>
</function>
<function name='OFAllocZeroedMemory' return-type='void *_Nullable'>
<argument name='count' type='size_t' m68k-reg='d0'/>
<argument name='size' type='size_t' m68k-reg='d1'/>
</function>
<function name='OFResizeMemory' return-type='void *_Nullable'>
<argument name='pointer' type='void *_Nullable' m68k-reg='a0'/>
<argument name='count' type='size_t' m68k-reg='d0'/>
<argument name='size' type='size_t' m68k-reg='d1'/>
</function>
<function name='OFFreeMemory'>
<argument name='pointer' type='void *_Nullable' m68k-reg='a0'/>
</function>
<function name='OFHashInit'>
<argument name='hash' type='unsigned long *_Nonnull' m68k-reg='a0'/>
</function>
<function name='OFRandom16' return-type='uint16_t'/>
<function name='OFRandom32' return-type='uint32_t'/>
<function name='OFRandom64' return-type='uint64_t'/>
<function name='OFHashSeedRef' return-type='unsigned long *_Nonnull'/>
<include>OFStdIOStream.h</include>
<function name='OFStdInRef'
return-type='OFStdIOStream *_Nonnull *_Nullable'/>
<function name='OFStdOutRef'
return-type='OFStdIOStream *_Nonnull *_Nullable'/>
<function name='OFStdErrRef'
return-type='OFStdIOStream *_Nonnull *_Nullable'/>
<function name='OFLogV'>
<argument name='format' type='OFConstantString *' m68k-reg='a0'/>
<argument name='arguments' type='va_list' m68k-reg='a1'/>
</function>
<include>OFApplication.h</include>
<function name='OFApplicationMain' return-type='int'>
<argument name='argc' type='int *_Nonnull' m68k-reg='a0'/>
<argument name='argv' type='char *_Nullable *_Nonnull *_Nonnull'
m68k-reg='a1'/>
<argument name='delegate' type='id <OFApplicationDelegate>' m68k-reg='a2'/>
</function>
<include>OFBlock.h</include>
<function name='_Block_copy' return-type='void *_Nullable'>
<argument name='block' type='const void *_Nullable' m68k-reg='a0'/>
</function>
<function name='_Block_release'>
<argument name='block' type='const void *_Nullable' m68k-reg='a0'/>
</function>
<include>OFDNSResourceRecord.h</include>
<function name='OFDNSClassName' return-type='OFString *_Nonnull'>
<argument name='DNSClass' type='OFDNSClass' m68k-reg='d0'/>
</function>
<function name='OFDNSRecordTypeName' return-type='OFString *_Nonnull'>
<argument name='recordType' type='OFDNSRecordType' m68k-reg='d0'/>
</function>
<function name='OFDNSClassParseName' return-type='OFDNSClass'>
<argument name='string' type='OFString *_Nonnull' m68k-reg='a0'/>
</function>
<function name='OFDNSRecordTypeParseName' return-type='OFDNSRecordType'>
<argument name='string' type='OFString *_Nonnull' m68k-reg='a0'/>
</function>
<include>OFEmbeddedIRIHandler.h</include>
<function name='OFRegisterEmbeddedFile'>
<argument name='name' type='OFString *_Nonnull' m68k-reg='a0'/>
<argument name='bytes' type='const uint8_t *_Nonnull' m68k-reg='a1'/>
<argument name='size' type='size_t' m68k-reg='d0'/>
</function>
<include>OFHTTPRequest.h</include>
<function name='OFHTTPRequestMethodString' return-type='OFString *_Nullable'>
<argument name='method' type='OFHTTPRequestMethod' m68k-reg='d0'/>
</function>
<function name='OFHTTPRequestMethodParseString'
return-type='OFHTTPRequestMethod'>
<argument name='string' type='OFString *' m68k-reg='a0'/>
</function>
<include>OFHTTPResponse.h</include>
<function name='OFHTTPStatusCodeString' return-type='OFString *_Nonnull'>
<argument name='code' type='short' m68k-reg='d0'/>
</function>
<include>OFList.h</include>
<function name='OFListItemNext' return-type='OFListItem _Nullable'>
<argument name='listItem' type='OFListItem _Nonnull' m68k-reg='a0'/>
</function>
<function name='OFListItemPrevious' return-type='OFListItem _Nullable'>
<argument name='listItem' type='OFListItem _Nonnull' m68k-reg='a0'/>
</function>
<function name='OFListItemObject' return-type='id _Nonnull'>
<argument name='listItem' type='OFListItem _Nonnull' m68k-reg='a0'/>
</function>
<include>OFMethodSignature.h</include>
<function name='OFSizeOfTypeEncoding' return-type='size_t'>
<argument name='type' type='const char *' m68k-reg='a0'/>
</function>
<function name='OFAlignmentOfTypeEncoding' return-type='size_t'>
<argument name='type' type='const char *' m68k-reg='a0'/>
</function>
<include>OFOnce.h</include>
<function name='OFOnce'>
<argument name='control' type='OFOnceControl *_Nonnull' m68k-reg='a0'/>
<argument name='func' type='OFOnceFunction _Nonnull' m68k-reg='a1'/>
</function>
<include>OFPBKDF2.h</include>
<function name='OFPBKDF2Wrapper'>
<argument name='parameters' type='const OFPBKDF2Parameters *_Nonnull'
m68k-reg='a0'/>
</function>
<include>OFScrypt.h</include>
<function name='OFScryptWrapper'>
<argument name='parameters' type='const OFScryptParameters *_Nonnull'
m68k-reg='a0'/>
</function>
<!-- The following scrypt functions are only for tests. -->
<function name='_OFSalsa20_8Core'>
<argument name='buffer' type='uint32_t *_Nonnull' m68k-reg='a0'/>
</function>
<function name='_OFScryptBlockMix'>
<argument name='output' type='uint32_t *_Nonnull' m68k-reg='a0'/>
<argument name='input' type='const uint32_t *_Nonnull' m68k-reg='a1'/>
<argument name='blockSize' type='size_t' m68k-reg='d0'/>
</function>
<function name='_OFScryptROMix'>
<argument name='buffer' type='uint32_t *' m68k-reg='a0'/>
<argument name='blockSize' type='size_t' m68k-reg='d0'/>
<argument name='costFactor' type='size_t' m68k-reg='d1'/>
<argument name='tmp' type='uint32_t *' m68k-reg='a1'/>
</function>
<include>OFSocket.h</include>
<function name='OFSocketAddressParseIP' return-type='OFSocketAddress'>
<argument name='IP' type='OFString *' m68k-reg='a0'/>
<argument name='port' type='uint16_t' m68k-reg='d0'/>
</function>
<function name='OFSocketAddressParseIPv4' return-type='OFSocketAddress'>
<argument name='IP' type='OFString *' m68k-reg='a0'/>
<argument name='port' type='uint16_t' m68k-reg='d0'/>
</function>
<function name='OFSocketAddressParseIPv6' return-type='OFSocketAddress'>
<argument name='IP' type='OFString *' m68k-reg='a0'/>
<argument name='port' type='uint16_t' m68k-reg='d0'/>
</function>
<function name='OFSocketAddressMakeUNIX' return-type='OFSocketAddress'>
<argument name='path' type='OFString *' m68k-reg='a0'/>
</function>
<function name='OFSocketAddressMakeIPX' return-type='OFSocketAddress'>
<argument name='network' type='uint32_t' m68k-reg='d0'/>
<argument name='node' type='const unsigned char *' m68k-reg='a0'/>
<argument name='port' type='uint16_t' m68k-reg='d1'/>
</function>
<function name='OFSocketAddressMakeAppleTalk' return-type='OFSocketAddress'>
<argument name='network' type='uint16_t' m68k-reg='d0'/>
<argument name='node' type='uint8_t' m68k-reg='d1'/>
<argument name='port' type='uint8_t' m68k-reg='d2'/>
</function>
<function name='OFSocketAddressEqual' return-type='bool'>
<argument name='address1' type='const OFSocketAddress *' m68k-reg='a0'/>
<argument name='address2' type='const OFSocketAddress *' m68k-reg='a1'/>
</function>
<function name='OFSocketAddressHash' return-type='unsigned long'>
<argument name='address' type='const OFSocketAddress *' m68k-reg='a0'/>
</function>
<function name='OFSocketAddressString' return-type='OFString *_Nonnull'>
<argument name='address' type='const OFSocketAddress *' m68k-reg='a0'/>
</function>
<function name='OFSocketAddressSetIPPort'>
<argument name='address' type='OFSocketAddress *' m68k-reg='a0'/>
<argument name='port' type='uint16_t' m68k-reg='d0'/>
</function>
<function name='OFSocketAddressIPPort' return-type='uint16_t'>
<argument name='address' type='const OFSocketAddress *' m68k-reg='a0'/>
</function>
<function name='OFSocketAddressUNIXPath' return-type='OFString *'>
<argument name='address' type='const OFSocketAddress *' m68k-reg='a0'/>
</function>
<function name='OFSocketAddressSetIPXNetwork'>
<argument name='address' type='OFSocketAddress *' m68k-reg='a0'/>
<argument name='network' type='uint32_t' m68k-reg='d0'/>
</function>
<function name='OFSocketAddressIPXNetwork' return-type='uint32_t'>
<argument name='address' type='const OFSocketAddress *' m68k-reg='a0'/>
</function>
<function name='OFSocketAddressSetIPXNode'>
<argument name='address' type='OFSocketAddress *' m68k-reg='a0'/>
<argument name='node' type='const unsigned char *' m68k-reg='a1'/>
</function>
<function name='OFSocketAddressGetIPXNode'>
<argument name='address' type='const OFSocketAddress *' m68k-reg='a0'/>
<argument name='node' type='unsigned char *_Nonnull' m68k-reg='a1'/>
</function>
<function name='OFSocketAddressSetIPXPort'>
<argument name='address' type='OFSocketAddress *' m68k-reg='a0'/>
<argument name='port' type='uint16_t' m68k-reg='d0'/>
</function>
<function name='OFSocketAddressIPXPort' return-type='uint16_t'>
<argument name='address' type='const OFSocketAddress *' m68k-reg='a0'/>
</function>
<function name='OFSocketAddressSetAppleTalkNetwork'>
<argument name='address' type='OFSocketAddress *' m68k-reg='a0'/>
<argument name='network' type='uint16_t' m68k-reg='d0'/>
</function>
<function name='OFSocketAddressAppleTalkNetwork' return-type='uint16_t'>
<argument name='address' type='const OFSocketAddress *' m68k-reg='a0'/>
</function>
<function name='OFSocketAddressSetAppleTalkNode'>
<argument name='address' type='OFSocketAddress *' m68k-reg='a0'/>
<argument name='node' type='uint8_t' m68k-reg='d0'/>
</function>
<function name='OFSocketAddressAppleTalkNode' return-type='uint8_t'>
<argument name='address' type='const OFSocketAddress *' m68k-reg='a0'/>
</function>
<function name='OFSocketAddressSetAppleTalkPort'>
<argument name='address' type='OFSocketAddress *' m68k-reg='a0'/>
<argument name='port' type='uint8_t' m68k-reg='d0'/>
</function>
<function name='OFSocketAddressAppleTalkPort' return-type='uint8_t'>
<argument name='address' type='const OFSocketAddress *' m68k-reg='a0'/>
</function>
<include>OFTLSStream.h</include>
<function name='OFTLSStreamErrorCodeDescription' return-type='OFString *'>
<argument name='errorCode' type='OFTLSStreamErrorCode' m68k-reg='d0'/>
</function>
<function name='OFTLSStreamImplementationRef'
return-type='Class _Nonnull *_Nullable'/>
<!-- Only for tests. -->
<include>OFStrPTime.h</include>
<function name='_OFStrPTime' return-type='const char *_Nullable'>
<argument name='buffer' type='const char *' m68k-reg='a0'/>
<argument name='format' type='const char *' m68k-reg='a1'/>
<argument name='tm' type='struct tm *' m68k-reg='a2'/>
<argument name='tz' type='int16_t *_Nullable' m68k-reg='a3'/>
</function>
<include>OFString.h</include>
<function name='OFStringEncodingParseName' return-type='OFStringEncoding'>
<argument name='string' type='OFString *' m68k-reg='a0'/>
</function>
<function name='OFStringEncodingName' return-type='OFString *_Nullable'>
<argument name='encoding' type='OFStringEncoding' m68k-reg='d0'/>
</function>
<function name='OFUTF16StringLength' return-type='size_t'>
<argument name='string' type='const OFChar16 *' m68k-reg='a0'/>
</function>
<function name='OFUTF32StringLength' return-type='size_t'>
<argument name='string' type='const OFChar32 *' m68k-reg='a0'/>
</function>
<include>OFZIPArchiveEntry.h</include>
<function name='OFZIPArchiveEntryVersionToString'
return-type='OFString *_Nonnull'>
<argument name='version' type='uint16_t' m68k-reg='d0'/>
</function>
<function name='OFZIPArchiveEntryCompressionMethodName'
return-type='OFString *_Nonnull'>
<argument name='compressionMethod' type='OFZIPArchiveEntryCompressionMethod'
m68k-reg='d0'/>
</function>
<function name='OFZIPArchiveEntryExtraFieldFind' return-type='size_t'>
<argument name='extraField' type='OFData *' m68k-reg='a0'/>
<argument name='tag' type='OFZIPArchiveEntryExtraFieldTag' m68k-reg='d0'/>
<argument name='size' type='uint16_t *' m68k-reg='a1'/>
</function>
</amiga-library>
|
Changes to src/encodings/Makefile.
1 2 3 4 5 6 7 8 9 10 |
include ../../extra.mk
STATIC_PIC_LIB_NOINST = ${ENCODINGS_LIB_A}
STATIC_LIB_NOINST = ${ENCODINGS_A}
SRCS = ${ENCODINGS_SRCS}
include ../../buildsys.mk
CPPFLAGS += -I. -I.. -I../.. -I../runtime -I../exceptions
| > | 1 2 3 4 5 6 7 8 9 10 11 |
include ../../extra.mk
STATIC_PIC_LIB_NOINST = ${ENCODINGS_LIB_A}
STATIC_LIB_NOINST = ${ENCODINGS_A}
STATIC_AMIGA_LIB_NOINST = ${ENCODINGS_AMIGALIB_A}
SRCS = ${ENCODINGS_SRCS}
include ../../buildsys.mk
CPPFLAGS += -I. -I.. -I../.. -I../runtime -I../exceptions
|
Changes to src/exceptions/Makefile.
1 2 3 4 5 6 7 8 9 10 11 |
include ../../extra.mk
STATIC_PIC_LIB_NOINST = ${EXCEPTIONS_LIB_A}
STATIC_LIB_NOINST = ${EXCEPTIONS_A}
SRCS = OFAllocFailedException.m \
OFAlreadyOpenException.m \
OFChecksumMismatchException.m \
OFCopyItemFailedException.m \
OFCreateDirectoryFailedException.m \
OFCreateSymbolicLinkFailedException.m \
| > | 1 2 3 4 5 6 7 8 9 10 11 12 |
include ../../extra.mk
STATIC_PIC_LIB_NOINST = ${EXCEPTIONS_LIB_A}
STATIC_LIB_NOINST = ${EXCEPTIONS_A}
STATIC_AMIGA_LIB_NOINST = ${EXCEPTIONS_AMIGALIB_A}
SRCS = OFAllocFailedException.m \
OFAlreadyOpenException.m \
OFChecksumMismatchException.m \
OFCopyItemFailedException.m \
OFCreateDirectoryFailedException.m \
OFCreateSymbolicLinkFailedException.m \
|
| ︙ | ︙ |
Changes to src/forwarding/Makefile.
1 2 3 4 5 6 7 8 9 10 |
include ../../extra.mk
STATIC_PIC_LIB_NOINST = ${FORWARDING_LIB_A}
STATIC_LIB_NOINST = ${FORWARDING_A}
SRCS = forwarding.S
include ../../buildsys.mk
ASFLAGS += -I../.. -I..
| > | 1 2 3 4 5 6 7 8 9 10 11 |
include ../../extra.mk
STATIC_PIC_LIB_NOINST = ${FORWARDING_LIB_A}
STATIC_LIB_NOINST = ${FORWARDING_A}
STATIC_AMIGA_LIB_NOINST = ${FORWARDING_AMIGALIB_A}
SRCS = forwarding.S
include ../../buildsys.mk
ASFLAGS += -I../.. -I..
|
Changes to src/libbases.m.
| ︙ | ︙ | |||
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
#include <proto/exec.h>
#undef Class
#import "OFInitializationFailedException.h"
#import "macros.h"
#ifdef OF_AMIGAOS4
extern struct Library *DOSBase;
extern struct DOSIFace *IDOS;
#endif
struct Library *LocaleBase;
#ifdef OF_AMIGAOS4
struct LocaleIFace *ILocale;
#endif
OF_CONSTRUCTOR()
{
| > > > | > > | 23 24 25 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 |
#include <proto/exec.h>
#undef Class
#import "OFInitializationFailedException.h"
#import "macros.h"
#ifdef OF_COMPILING_AMIGA_LIBRARY
struct Library *DOSBase;
#endif
#ifdef OF_AMIGAOS4
extern struct Library *DOSBase;
extern struct DOSIFace *IDOS;
#endif
struct Library *LocaleBase;
#ifdef OF_AMIGAOS4
struct LocaleIFace *ILocale;
#endif
OF_CONSTRUCTOR()
{
#if defined(OF_COMPILING_AMIGA_LIBRARY) || defined(OF_AMIGAOS4)
if ((DOSBase = OpenLibrary("dos.library", 36)) == NULL)
@throw [OFInitializationFailedException exception];
#endif
#ifdef OF_AMIGAOS4
if ((IDOS = (struct DOSIFace *)
GetInterface(DOSBase, "main", 1, NULL)) == NULL)
@throw [OFInitializationFailedException exception];
#endif
if ((LocaleBase = OpenLibrary("locale.library", 38)) == NULL)
@throw [OFInitializationFailedException exception];
|
| ︙ | ︙ | |||
64 65 66 67 68 69 70 | DropInterface((struct Interface *)ILocale); #endif if (LocaleBase != NULL) CloseLibrary(LocaleBase); #ifdef OF_AMIGAOS4 | < < < | > > > > > | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | DropInterface((struct Interface *)ILocale); #endif if (LocaleBase != NULL) CloseLibrary(LocaleBase); #ifdef OF_AMIGAOS4 if (IDOS != NULL) DropInterface((struct Interface *)IDOS); #endif #if defined(OF_COMPILING_AMIGA_LIBRARY) || defined(OF_AMIGAOS4) if (DOSBase != NULL) CloseLibrary(DOSBase); #endif } |
Added src/linklib/Makefile.
> > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 |
include ../../extra.mk
STATIC_LIB = libobjfw.library.a
STATIC_AMIGA_LIB = libobjfw.library.amigalib.a
SRCS = init.m \
linklib.m
include ../../buildsys.mk
CPPFLAGS += -I.. -I../.. -I../exceptions -I../runtime \
-DOBJFW_AMIGA_LIB=\"${OBJFW_AMIGA_LIB}\" \
-DOBJFW_LIB_MINOR=${OBJFW_LIB_MINOR}
AMIGA_LIB_CFLAGS += -DOF_AMIGA_LIB
|
Added src/linklib/init.m.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 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 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 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 142 143 144 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 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 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 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 |
/*
* Copyright (c) 2008-2025 Jonathan Schleifer <js@nil.im>
*
* All rights reserved.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License version 3.0 only,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* version 3.0 for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* version 3.0 along with this program. If not, see
* <https://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <errno.h>
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <signal.h>
#import "OFFileManager.h"
#import "OFRunLoop.h"
#import "OFStdIOStream.h"
#import "macros.h"
#import "amiga-library.h"
#define USE_INLINE_STDARG
#include <proto/exec.h>
#include <proto/intuition.h>
#if defined(OF_AMIGAOS_M68K)
# include <stabs.h>
#elif defined(OF_MORPHOS)
# include <constructor.h>
#endif
extern struct Library *ObjFWRTBase;
#ifdef HAVE_SJLJ_EXCEPTIONS
extern int _Unwind_SjLj_RaiseException(void *);
#else
extern int _Unwind_RaiseException(void *);
#endif
extern void _Unwind_DeleteException(void *);
extern void *_Unwind_GetLanguageSpecificData(void *);
extern uintptr_t _Unwind_GetRegionStart(void *);
extern uintptr_t _Unwind_GetDataRelBase(void *);
extern uintptr_t _Unwind_GetTextRelBase(void *);
extern uintptr_t _Unwind_GetIP(void *);
extern uintptr_t _Unwind_GetGR(void *, int);
extern void _Unwind_SetIP(void *, uintptr_t);
extern void _Unwind_SetGR(void *, int, uintptr_t);
#ifdef HAVE_SJLJ_EXCEPTIONS
extern void _Unwind_SjLj_Resume(void *);
#else
extern void _Unwind_Resume(void *);
#endif
#ifdef OF_AMIGAOS_M68K
extern void __register_frame_info(const void *, void *);
extern void *__deregister_frame_info(const void *);
#endif
#ifdef OF_MORPHOS
extern void __register_frame(void *);
extern void __deregister_frame(void *);
#endif
extern int _Unwind_Backtrace(int (*)(void *, void *), void *);
struct Library *ObjFWBase;
void *__objc_class_name_OFApplication;
void *__objc_class_name_OFArray;
void *__objc_class_name_OFBlock;
void *__objc_class_name_OFCharacterSet;
void *__objc_class_name_OFColor;
void *__objc_class_name_OFConstantString;
void *__objc_class_name_OFCountedSet;
void *__objc_class_name_OFData;
void *__objc_class_name_OFDate;
void *__objc_class_name_OFDictionary;
void *__objc_class_name_OFEnumerator;
void *__objc_class_name_OFFileManager;
void *__objc_class_name_OFGZIPStream;
void *__objc_class_name_OFHMAC;
void *__objc_class_name_OFINICategory;
void *__objc_class_name_OFINIFile;
void *__objc_class_name_OFIRI;
void *__objc_class_name_OFIRIHandler;
void *__objc_class_name_OFInflate64Stream;
void *__objc_class_name_OFInflateStream;
void *__objc_class_name_OFInvocation;
void *__objc_class_name_OFLHAArchive;
void *__objc_class_name_OFLHAArchiveEntry;
void *__objc_class_name_OFList;
void *__objc_class_name_OFLocale;
void *__objc_class_name_OFMD5Hash;
void *__objc_class_name_OFMapTable;
void *__objc_class_name_OFMapTableEnumerator;
void *__objc_class_name_OFMatrix4x4;
void *__objc_class_name_OFMemoryStream;
void *__objc_class_name_OFMessagePackExtension;
void *__objc_class_name_OFMethodSignature;
void *__objc_class_name_OFMutableArray;
void *__objc_class_name_OFMutableData;
void *__objc_class_name_OFMutableDictionary;
void *__objc_class_name_OFMutableIRI;
void *__objc_class_name_OFMutableLHAArchiveEntry;
void *__objc_class_name_OFMutablePair;
void *__objc_class_name_OFMutableSet;
void *__objc_class_name_OFMutableString;
void *__objc_class_name_OFMutableTarArchiveEntry;
void *__objc_class_name_OFMutableTriple;
void *__objc_class_name_OFMutableZIPArchiveEntry;
void *__objc_class_name_OFNotification;
void *__objc_class_name_OFNotificationCenter;
void *__objc_class_name_OFNull;
void *__objc_class_name_OFNumber;
void *__objc_class_name_OFObject;
void *__objc_class_name_OFOptionsParser;
void *__objc_class_name_OFPair;
void *__objc_class_name_OFRIPEMD160Hash;
void *__objc_class_name_OFRunLoop;
void *__objc_class_name_OFSHA1Hash;
void *__objc_class_name_OFSHA224Hash;
void *__objc_class_name_OFSHA224Or256Hash;
void *__objc_class_name_OFSHA256Hash;
void *__objc_class_name_OFSHA384Hash;
void *__objc_class_name_OFSHA384Or512Hash;
void *__objc_class_name_OFSHA512Hash;
void *__objc_class_name_OFSecureData;
void *__objc_class_name_OFSeekableStream;
void *__objc_class_name_OFSet;
void *__objc_class_name_OFSettings;
void *__objc_class_name_OFSortedList;
void *__objc_class_name_OFStdIOStream;
void *__objc_class_name_OFStream;
void *__objc_class_name_OFString;
void *__objc_class_name_OFSystemInfo;
void *__objc_class_name_OFTarArchive;
void *__objc_class_name_OFTarArchiveEntry;
void *__objc_class_name_OFThread;
void *__objc_class_name_OFTimer;
void *__objc_class_name_OFTriple;
void *__objc_class_name_OFUUID;
void *__objc_class_name_OFValue;
void *__objc_class_name_OFXMLAttribute;
void *__objc_class_name_OFXMLCDATA;
void *__objc_class_name_OFXMLCharacters;
void *__objc_class_name_OFXMLComment;
void *__objc_class_name_OFXMLElement;
void *__objc_class_name_OFXMLElementBuilder;
void *__objc_class_name_OFXMLNode;
void *__objc_class_name_OFXMLParser;
void *__objc_class_name_OFXMLProcessingInstructions;
void *__objc_class_name_OFZIPArchive;
void *__objc_class_name_OFZIPArchiveEntry;
#ifdef OF_HAVE_FILES
void *__objc_class_name_OFFile;
#endif
#ifdef OF_HAVE_SOCKETS
void *__objc_class_name_OFAAAADNSResourceRecord;
void *__objc_class_name_OFADNSResourceRecord;
void *__objc_class_name_OFCNAMEDNSResourceRecord;
void *__objc_class_name_OFDNSQuery;
void *__objc_class_name_OFDNSResolver;
void *__objc_class_name_OFDNSResourceRecord;
void *__objc_class_name_OFDNSResponse;
void *__objc_class_name_OFDatagramSocket;
void *__objc_class_name_OFHINFODNSResourceRecord;
void *__objc_class_name_OFHTTPClient;
void *__objc_class_name_OFHTTPCookie;
void *__objc_class_name_OFHTTPCookieManager;
void *__objc_class_name_OFHTTPRequest;
void *__objc_class_name_OFHTTPResponse;
void *__objc_class_name_OFHTTPServer;
void *__objc_class_name_OFKernelEventObserver;
void *__objc_class_name_OFMXDNSResourceRecord;
void *__objc_class_name_OFNSDNSResourceRecord;
void *__objc_class_name_OFPTRDNSResourceRecord;
void *__objc_class_name_OFRPDNSResourceRecord;
void *__objc_class_name_OFSOADNSResourceRecord;
void *__objc_class_name_OFSRVDNSResourceRecord;
void *__objc_class_name_OFSequencedPacketSocket;
void *__objc_class_name_OFStreamSocket;
void *__objc_class_name_OFTCPSocket;
void *__objc_class_name_OFTLSStream;
void *__objc_class_name_OFTXTDNSResourceRecord;
void *__objc_class_name_OFUDPSocket;
#endif
#ifdef OF_HAVE_THREADS
void *__objc_class_name_OFCondition;
void *__objc_class_name_OFMutex;
void *__objc_class_name_OFRecursiveMutex;
#endif
void *__objc_class_name_OFAllocFailedException;
void *__objc_class_name_OFAlreadyOpenException;
void *__objc_class_name_OFChecksumMismatchException;
void *__objc_class_name_OFCopyItemFailedException;
void *__objc_class_name_OFCreateDirectoryFailedException;
void *__objc_class_name_OFCreateSymbolicLinkFailedException;
void *__objc_class_name_OFEnumerationMutationException;
void *__objc_class_name_OFException;
void *__objc_class_name_OFGetItemAttributesFailedException;
void *__objc_class_name_OFGetOptionFailedException;
void *__objc_class_name_OFHashAlreadyCalculatedException;
void *__objc_class_name_OFHashNotCalculatedException;
void *__objc_class_name_OFInitializationFailedException;
void *__objc_class_name_OFInvalidArgumentException;
void *__objc_class_name_OFInvalidEncodingException;
void *__objc_class_name_OFInvalidFormatException;
void *__objc_class_name_OFInvalidJSONException;
void *__objc_class_name_OFInvalidServerResponseException;
void *__objc_class_name_OFLinkItemFailedException;
void *__objc_class_name_OFLockFailedException;
void *__objc_class_name_OFMalformedXMLException;
void *__objc_class_name_OFMoveItemFailedException;
void *__objc_class_name_OFNotImplementedException;
void *__objc_class_name_OFNotOpenException;
void *__objc_class_name_OFOpenItemFailedException;
void *__objc_class_name_OFOutOfMemoryException;
void *__objc_class_name_OFOutOfRangeException;
void *__objc_class_name_OFReadFailedException;
void *__objc_class_name_OFReadOrWriteFailedException;
void *__objc_class_name_OFRemoveItemFailedException;
void *__objc_class_name_OFSeekFailedException;
void *__objc_class_name_OFSetItemAttributesFailedException;
void *__objc_class_name_OFSetOptionFailedException;
void *__objc_class_name_OFStillLockedException;
void *__objc_class_name_OFTruncatedDataException;
void *__objc_class_name_OFUnboundNamespaceException;
void *__objc_class_name_OFUnboundPrefixException;
void *__objc_class_name_OFUndefinedKeyException;
void *__objc_class_name_OFUnknownXMLEntityException;
void *__objc_class_name_OFUnlockFailedException;
void *__objc_class_name_OFUnsupportedProtocolException;
void *__objc_class_name_OFUnsupportedVersionException;
void *__objc_class_name_OFWriteFailedException;
#ifdef OF_HAVE_FILES
void *__objc_class_name_OFChangeCurrentDirectoryFailedException;
void *__objc_class_name_OFGetCurrentDirectoryFailedException;
#endif
#ifdef OF_HAVE_SOCKETS
void *__objc_class_name_OFAcceptSocketFailedException;
void *__objc_class_name_OFBindIPSocketFailedException;
void *__objc_class_name_OFBindSocketFailedException;
void *__objc_class_name_OFConnectIPSocketFailedException;
void *__objc_class_name_OFConnectSocketFailedException;
void *__objc_class_name_OFDNSQueryFailedException;
void *__objc_class_name_OFHTTPRequestFailedException;
void *__objc_class_name_OFListenOnSocketFailedException;
void *__objc_class_name_OFObserveKernelEventsFailedException;
void *__objc_class_name_OFResolveHostFailedException;
void *__objc_class_name_OFTLSHandshakeFailedException;
#endif
#ifdef OF_HAVE_THREADS
void *__objc_class_name_OFBroadcastConditionFailedException;
void *__objc_class_name_OFConditionStillWaitingException;
void *__objc_class_name_OFJoinThreadFailedException;
void *__objc_class_name_OFSignalConditionFailedException;
void *__objc_class_name_OFStartThreadFailedException;
void *__objc_class_name_OFThreadStillRunningException;
void *__objc_class_name_OFWaitForConditionFailedException;
#endif
#include "OFFileManagerConstants.inc"
#include "OFRunLoopConstants.inc"
#ifdef OF_HAVE_SOCKETS
# include "OFSystemInfo+NetworkInterfacesConstants.inc"
#endif
/* The following __objc_class_name_* are only for the tests. */
void *__objc_class_name_OFBitSetCharacterSet;
void *__objc_class_name_OFConcreteMutableSet;
void *__objc_class_name_OFConcreteSet;
void *__objc_class_name_OFMutableUTF8String;
void *__objc_class_name_OFRangeCharacterSet;
void *__objc_class_name_OFSelectKernelEventObserver;
void *__objc_class_name_OFUTF8String;
#ifndef OF_AMIGA_LIB
struct Library *ObjFWBase;
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 int *
errNo(void)
{
return &errno;
}
static void __attribute__((__used__))
ctor(void)
{
static bool initialized = false;
struct OFLibC libC = {
.malloc = malloc,
.calloc = calloc,
.realloc = realloc,
.free = free,
.abort = abort,
#ifdef HAVE_SJLJ_EXCEPTIONS
._Unwind_SjLj_RaiseException = _Unwind_SjLj_RaiseException,
#else
._Unwind_RaiseException = _Unwind_RaiseException,
#endif
._Unwind_DeleteException = _Unwind_DeleteException,
._Unwind_GetLanguageSpecificData =
_Unwind_GetLanguageSpecificData,
._Unwind_GetRegionStart = _Unwind_GetRegionStart,
._Unwind_GetDataRelBase = _Unwind_GetDataRelBase,
._Unwind_GetTextRelBase = _Unwind_GetTextRelBase,
._Unwind_GetIP = _Unwind_GetIP,
._Unwind_GetGR = _Unwind_GetGR,
._Unwind_SetIP = _Unwind_SetIP,
._Unwind_SetGR = _Unwind_SetGR,
#ifdef HAVE_SJLJ_EXCEPTIONS
._Unwind_SjLj_Resume = _Unwind_SjLj_Resume,
#else
._Unwind_Resume = _Unwind_Resume,
#endif
#ifdef OF_AMIGAOS_M68K
.__register_frame_info = __register_frame_info,
.__deregister_frame_info = __deregister_frame_info,
#endif
#ifdef OF_MORPHOS
.__register_frame = __register_frame,
.__deregister_frame = __deregister_frame,
#endif
.errNo = errNo,
#ifdef OF_MORPHOS
.vasprintf = vasprintf,
#else
.vsnprintf = vsnprintf,
#endif
.strtof = strtof,
.strtod = strtod,
#ifdef OF_MORPHOS
.gmtime_r = gmtime_r,
.localtime_r = localtime_r,
#endif
.mktime = mktime,
.gettimeofday = gettimeofday,
.strftime = strftime,
.exit = exit,
.atexit = atexit,
.signal = signal,
.setlocale = setlocale,
._Unwind_Backtrace = _Unwind_Backtrace
};
if (initialized)
return;
if ((ObjFWBase = OpenLibrary(OBJFW_AMIGA_LIB, OBJFW_LIB_MINOR)) == NULL)
error("Failed to open " OBJFW_AMIGA_LIB " version %lu!",
OBJFW_LIB_MINOR);
if (!OFInit(1, &libC, ObjFWRTBase))
error("Failed to initialize " OBJFW_AMIGA_LIB "!", 0);
initialized = true;
}
static void __attribute__((__used__))
dtor(void)
{
CloseLibrary(ObjFWBase);
}
# if defined(OF_AMIGAOS_M68K)
ADD2INIT(ctor, -2);
ADD2EXIT(dtor, -2);
# elif defined(OF_MORPHOS)
CONSTRUCTOR_P(ObjFW, 5000)
{
ctor();
return 0;
}
DESTRUCTOR_P(ObjFW, 5000)
{
dtor();
}
# endif
#endif
extern void OFPBKDF2Wrapper(const OFPBKDF2Parameters *parameters);
extern void OFScryptWrapper(const OFScryptParameters *parameters);
void
OFLog(OFConstantString *format, ...)
{
va_list arguments;
va_start(arguments, format);
OFLogV(format, arguments);
va_end(arguments);
}
void
OFPBKDF2(OFPBKDF2Parameters parameters)
{
OFPBKDF2Wrapper(¶meters);
}
void
OFScrypt(OFScryptParameters parameters)
{
OFScryptWrapper(¶meters);
}
|
Added src/linklib/linklib.m.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 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 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 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 142 143 144 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 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 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 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 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 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 |
/*
* Copyright (c) 2008-2025 Jonathan Schleifer <js@nil.im>
*
* All rights reserved.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License version 3.0 only,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* version 3.0 for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* version 3.0 along with this program. If not, see
* <https://www.gnu.org/licenses/>.
*/
/* This file is automatically generated from amiga-library.xml */
#include "config.h"
#import "amiga-library.h"
#import "OFObject.h"
#import "OFStdIOStream.h"
#import "OFApplication.h"
#import "OFBlock.h"
#import "OFDNSResourceRecord.h"
#import "OFEmbeddedIRIHandler.h"
#import "OFHTTPRequest.h"
#import "OFHTTPResponse.h"
#import "OFList.h"
#import "OFMethodSignature.h"
#import "OFOnce.h"
#import "OFPBKDF2.h"
#import "OFScrypt.h"
#import "OFSocket.h"
#import "OFTLSStream.h"
#import "OFStrPTime.h"
#import "OFString.h"
#import "OFZIPArchiveEntry.h"
extern struct Library *ObjFWBase;
#if OF_GCC_VERSION >= 1100
# pragma GCC diagnostic ignored "-Warray-parameter"
#endif
bool
OFInit(unsigned int version, struct OFLibC *_Nonnull libc, struct Library *_Nonnull RTBase)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((bool (*)(unsigned int __asm__("d0"), struct OFLibC *_Nonnull __asm__("a0"), struct Library *_Nonnull __asm__("a1")))(((uintptr_t)ObjFWBase) - 30))(version, libc, RTBase);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((bool (*)(unsigned int, struct OFLibC *_Nonnull, struct Library *_Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 28))(version, libc, RTBase);
#endif
}
void *_Nullable
OFAllocMemory(size_t count, size_t size)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((void *_Nullable (*)(size_t __asm__("d0"), size_t __asm__("d1")))(((uintptr_t)ObjFWBase) - 36))(count, size);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((void *_Nullable (*)(size_t, size_t))*(void **)(((uintptr_t)ObjFWBase) - 34))(count, size);
#endif
}
void *_Nullable
OFAllocZeroedMemory(size_t count, size_t size)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((void *_Nullable (*)(size_t __asm__("d0"), size_t __asm__("d1")))(((uintptr_t)ObjFWBase) - 42))(count, size);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((void *_Nullable (*)(size_t, size_t))*(void **)(((uintptr_t)ObjFWBase) - 40))(count, size);
#endif
}
void *_Nullable
OFResizeMemory(void *_Nullable pointer, size_t count, size_t size)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((void *_Nullable (*)(void *_Nullable __asm__("a0"), size_t __asm__("d0"), size_t __asm__("d1")))(((uintptr_t)ObjFWBase) - 48))(pointer, count, size);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((void *_Nullable (*)(void *_Nullable, size_t, size_t))*(void **)(((uintptr_t)ObjFWBase) - 46))(pointer, count, size);
#endif
}
void
OFFreeMemory(void *_Nullable pointer)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
((void (*)(void *_Nullable __asm__("a0")))(((uintptr_t)ObjFWBase) - 54))(pointer);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
__extension__ ((void (*)(void *_Nullable))*(void **)(((uintptr_t)ObjFWBase) - 52))(pointer);
#endif
}
void
OFHashInit(unsigned long *_Nonnull hash)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
((void (*)(unsigned long *_Nonnull __asm__("a0")))(((uintptr_t)ObjFWBase) - 60))(hash);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
__extension__ ((void (*)(unsigned long *_Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 58))(hash);
#endif
}
uint16_t
OFRandom16()
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((uint16_t (*)())(((uintptr_t)ObjFWBase) - 66))();
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((uint16_t (*)())*(void **)(((uintptr_t)ObjFWBase) - 64))();
#endif
}
uint32_t
OFRandom32()
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((uint32_t (*)())(((uintptr_t)ObjFWBase) - 72))();
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((uint32_t (*)())*(void **)(((uintptr_t)ObjFWBase) - 70))();
#endif
}
uint64_t
OFRandom64()
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((uint64_t (*)())(((uintptr_t)ObjFWBase) - 78))();
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((uint64_t (*)())*(void **)(((uintptr_t)ObjFWBase) - 76))();
#endif
}
unsigned long *_Nonnull
OFHashSeedRef()
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((unsigned long *_Nonnull (*)())(((uintptr_t)ObjFWBase) - 84))();
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((unsigned long *_Nonnull (*)())*(void **)(((uintptr_t)ObjFWBase) - 82))();
#endif
}
OFStdIOStream *_Nonnull *_Nullable
OFStdInRef()
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((OFStdIOStream *_Nonnull *_Nullable (*)())(((uintptr_t)ObjFWBase) - 90))();
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((OFStdIOStream *_Nonnull *_Nullable (*)())*(void **)(((uintptr_t)ObjFWBase) - 88))();
#endif
}
OFStdIOStream *_Nonnull *_Nullable
OFStdOutRef()
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((OFStdIOStream *_Nonnull *_Nullable (*)())(((uintptr_t)ObjFWBase) - 96))();
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((OFStdIOStream *_Nonnull *_Nullable (*)())*(void **)(((uintptr_t)ObjFWBase) - 94))();
#endif
}
OFStdIOStream *_Nonnull *_Nullable
OFStdErrRef()
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((OFStdIOStream *_Nonnull *_Nullable (*)())(((uintptr_t)ObjFWBase) - 102))();
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((OFStdIOStream *_Nonnull *_Nullable (*)())*(void **)(((uintptr_t)ObjFWBase) - 100))();
#endif
}
void
OFLogV(OFConstantString *format, va_list arguments)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
((void (*)(OFConstantString *__asm__("a0"), va_list __asm__("a1")))(((uintptr_t)ObjFWBase) - 108))(format, arguments);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
__extension__ ((void (*)(OFConstantString *, va_list))*(void **)(((uintptr_t)ObjFWBase) - 106))(format, arguments);
#endif
}
int
OFApplicationMain(int *_Nonnull argc, char *_Nullable *_Nonnull *_Nonnull argv, id <OFApplicationDelegate> delegate)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((int (*)(int *_Nonnull __asm__("a0"), char *_Nullable *_Nonnull *_Nonnull __asm__("a1"), id <OFApplicationDelegate> __asm__("a2")))(((uintptr_t)ObjFWBase) - 114))(argc, argv, delegate);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((int (*)(int *_Nonnull, char *_Nullable *_Nonnull *_Nonnull, id <OFApplicationDelegate>))*(void **)(((uintptr_t)ObjFWBase) - 112))(argc, argv, delegate);
#endif
}
void *_Nullable
_Block_copy(const void *_Nullable block)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((void *_Nullable (*)(const void *_Nullable __asm__("a0")))(((uintptr_t)ObjFWBase) - 120))(block);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((void *_Nullable (*)(const void *_Nullable))*(void **)(((uintptr_t)ObjFWBase) - 118))(block);
#endif
}
void
_Block_release(const void *_Nullable block)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
((void (*)(const void *_Nullable __asm__("a0")))(((uintptr_t)ObjFWBase) - 126))(block);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
__extension__ ((void (*)(const void *_Nullable))*(void **)(((uintptr_t)ObjFWBase) - 124))(block);
#endif
}
OFString *_Nonnull
OFDNSClassName(OFDNSClass DNSClass)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((OFString *_Nonnull (*)(OFDNSClass __asm__("d0")))(((uintptr_t)ObjFWBase) - 132))(DNSClass);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((OFString *_Nonnull (*)(OFDNSClass))*(void **)(((uintptr_t)ObjFWBase) - 130))(DNSClass);
#endif
}
OFString *_Nonnull
OFDNSRecordTypeName(OFDNSRecordType recordType)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((OFString *_Nonnull (*)(OFDNSRecordType __asm__("d0")))(((uintptr_t)ObjFWBase) - 138))(recordType);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((OFString *_Nonnull (*)(OFDNSRecordType))*(void **)(((uintptr_t)ObjFWBase) - 136))(recordType);
#endif
}
OFDNSClass
OFDNSClassParseName(OFString *_Nonnull string)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((OFDNSClass (*)(OFString *_Nonnull __asm__("a0")))(((uintptr_t)ObjFWBase) - 144))(string);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((OFDNSClass (*)(OFString *_Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 142))(string);
#endif
}
OFDNSRecordType
OFDNSRecordTypeParseName(OFString *_Nonnull string)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((OFDNSRecordType (*)(OFString *_Nonnull __asm__("a0")))(((uintptr_t)ObjFWBase) - 150))(string);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((OFDNSRecordType (*)(OFString *_Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 148))(string);
#endif
}
void
OFRegisterEmbeddedFile(OFString *_Nonnull name, const uint8_t *_Nonnull bytes, size_t size)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
((void (*)(OFString *_Nonnull __asm__("a0"), const uint8_t *_Nonnull __asm__("a1"), size_t __asm__("d0")))(((uintptr_t)ObjFWBase) - 156))(name, bytes, size);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
__extension__ ((void (*)(OFString *_Nonnull, const uint8_t *_Nonnull, size_t))*(void **)(((uintptr_t)ObjFWBase) - 154))(name, bytes, size);
#endif
}
OFString *_Nullable
OFHTTPRequestMethodString(OFHTTPRequestMethod method)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((OFString *_Nullable (*)(OFHTTPRequestMethod __asm__("d0")))(((uintptr_t)ObjFWBase) - 162))(method);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((OFString *_Nullable (*)(OFHTTPRequestMethod))*(void **)(((uintptr_t)ObjFWBase) - 160))(method);
#endif
}
OFHTTPRequestMethod
OFHTTPRequestMethodParseString(OFString *string)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((OFHTTPRequestMethod (*)(OFString *__asm__("a0")))(((uintptr_t)ObjFWBase) - 168))(string);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((OFHTTPRequestMethod (*)(OFString *))*(void **)(((uintptr_t)ObjFWBase) - 166))(string);
#endif
}
OFString *_Nonnull
OFHTTPStatusCodeString(short code)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((OFString *_Nonnull (*)(short __asm__("d0")))(((uintptr_t)ObjFWBase) - 174))(code);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((OFString *_Nonnull (*)(short))*(void **)(((uintptr_t)ObjFWBase) - 172))(code);
#endif
}
OFListItem _Nullable
OFListItemNext(OFListItem _Nonnull listItem)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((OFListItem _Nullable (*)(OFListItem _Nonnull __asm__("a0")))(((uintptr_t)ObjFWBase) - 180))(listItem);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((OFListItem _Nullable (*)(OFListItem _Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 178))(listItem);
#endif
}
OFListItem _Nullable
OFListItemPrevious(OFListItem _Nonnull listItem)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((OFListItem _Nullable (*)(OFListItem _Nonnull __asm__("a0")))(((uintptr_t)ObjFWBase) - 186))(listItem);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((OFListItem _Nullable (*)(OFListItem _Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 184))(listItem);
#endif
}
id _Nonnull
OFListItemObject(OFListItem _Nonnull listItem)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((id _Nonnull (*)(OFListItem _Nonnull __asm__("a0")))(((uintptr_t)ObjFWBase) - 192))(listItem);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((id _Nonnull (*)(OFListItem _Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 190))(listItem);
#endif
}
size_t
OFSizeOfTypeEncoding(const char *type)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((size_t (*)(const char *__asm__("a0")))(((uintptr_t)ObjFWBase) - 198))(type);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((size_t (*)(const char *))*(void **)(((uintptr_t)ObjFWBase) - 196))(type);
#endif
}
size_t
OFAlignmentOfTypeEncoding(const char *type)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((size_t (*)(const char *__asm__("a0")))(((uintptr_t)ObjFWBase) - 204))(type);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((size_t (*)(const char *))*(void **)(((uintptr_t)ObjFWBase) - 202))(type);
#endif
}
void
OFOnce(OFOnceControl *_Nonnull control, OFOnceFunction _Nonnull func)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
((void (*)(OFOnceControl *_Nonnull __asm__("a0"), OFOnceFunction _Nonnull __asm__("a1")))(((uintptr_t)ObjFWBase) - 210))(control, func);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
__extension__ ((void (*)(OFOnceControl *_Nonnull, OFOnceFunction _Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 208))(control, func);
#endif
}
void
OFPBKDF2Wrapper(const OFPBKDF2Parameters *_Nonnull parameters)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
((void (*)(const OFPBKDF2Parameters *_Nonnull __asm__("a0")))(((uintptr_t)ObjFWBase) - 216))(parameters);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
__extension__ ((void (*)(const OFPBKDF2Parameters *_Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 214))(parameters);
#endif
}
void
OFScryptWrapper(const OFScryptParameters *_Nonnull parameters)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
((void (*)(const OFScryptParameters *_Nonnull __asm__("a0")))(((uintptr_t)ObjFWBase) - 222))(parameters);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
__extension__ ((void (*)(const OFScryptParameters *_Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 220))(parameters);
#endif
}
void
_OFSalsa20_8Core(uint32_t *_Nonnull buffer)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
((void (*)(uint32_t *_Nonnull __asm__("a0")))(((uintptr_t)ObjFWBase) - 228))(buffer);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
__extension__ ((void (*)(uint32_t *_Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 226))(buffer);
#endif
}
void
_OFScryptBlockMix(uint32_t *_Nonnull output, const uint32_t *_Nonnull input, size_t blockSize)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
((void (*)(uint32_t *_Nonnull __asm__("a0"), const uint32_t *_Nonnull __asm__("a1"), size_t __asm__("d0")))(((uintptr_t)ObjFWBase) - 234))(output, input, blockSize);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
__extension__ ((void (*)(uint32_t *_Nonnull, const uint32_t *_Nonnull, size_t))*(void **)(((uintptr_t)ObjFWBase) - 232))(output, input, blockSize);
#endif
}
void
_OFScryptROMix(uint32_t *buffer, size_t blockSize, size_t costFactor, uint32_t *tmp)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
((void (*)(uint32_t *__asm__("a0"), size_t __asm__("d0"), size_t __asm__("d1"), uint32_t *__asm__("a1")))(((uintptr_t)ObjFWBase) - 240))(buffer, blockSize, costFactor, tmp);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
__extension__ ((void (*)(uint32_t *, size_t, size_t, uint32_t *))*(void **)(((uintptr_t)ObjFWBase) - 238))(buffer, blockSize, costFactor, tmp);
#endif
}
OFSocketAddress
OFSocketAddressParseIP(OFString *IP, uint16_t port)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((OFSocketAddress (*)(OFString *__asm__("a0"), uint16_t __asm__("d0")))(((uintptr_t)ObjFWBase) - 246))(IP, port);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((OFSocketAddress (*)(OFString *, uint16_t))*(void **)(((uintptr_t)ObjFWBase) - 244))(IP, port);
#endif
}
OFSocketAddress
OFSocketAddressParseIPv4(OFString *IP, uint16_t port)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((OFSocketAddress (*)(OFString *__asm__("a0"), uint16_t __asm__("d0")))(((uintptr_t)ObjFWBase) - 252))(IP, port);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((OFSocketAddress (*)(OFString *, uint16_t))*(void **)(((uintptr_t)ObjFWBase) - 250))(IP, port);
#endif
}
OFSocketAddress
OFSocketAddressParseIPv6(OFString *IP, uint16_t port)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((OFSocketAddress (*)(OFString *__asm__("a0"), uint16_t __asm__("d0")))(((uintptr_t)ObjFWBase) - 258))(IP, port);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((OFSocketAddress (*)(OFString *, uint16_t))*(void **)(((uintptr_t)ObjFWBase) - 256))(IP, port);
#endif
}
OFSocketAddress
OFSocketAddressMakeUNIX(OFString *path)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((OFSocketAddress (*)(OFString *__asm__("a0")))(((uintptr_t)ObjFWBase) - 264))(path);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((OFSocketAddress (*)(OFString *))*(void **)(((uintptr_t)ObjFWBase) - 262))(path);
#endif
}
OFSocketAddress
OFSocketAddressMakeIPX(uint32_t network, const unsigned char *node, uint16_t port)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((OFSocketAddress (*)(uint32_t __asm__("d0"), const unsigned char *__asm__("a0"), uint16_t __asm__("d1")))(((uintptr_t)ObjFWBase) - 270))(network, node, port);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((OFSocketAddress (*)(uint32_t, const unsigned char *, uint16_t))*(void **)(((uintptr_t)ObjFWBase) - 268))(network, node, port);
#endif
}
OFSocketAddress
OFSocketAddressMakeAppleTalk(uint16_t network, uint8_t node, uint8_t port)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((OFSocketAddress (*)(uint16_t __asm__("d0"), uint8_t __asm__("d1"), uint8_t __asm__("d2")))(((uintptr_t)ObjFWBase) - 276))(network, node, port);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((OFSocketAddress (*)(uint16_t, uint8_t, uint8_t))*(void **)(((uintptr_t)ObjFWBase) - 274))(network, node, port);
#endif
}
bool
OFSocketAddressEqual(const OFSocketAddress *address1, const OFSocketAddress *address2)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((bool (*)(const OFSocketAddress *__asm__("a0"), const OFSocketAddress *__asm__("a1")))(((uintptr_t)ObjFWBase) - 282))(address1, address2);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((bool (*)(const OFSocketAddress *, const OFSocketAddress *))*(void **)(((uintptr_t)ObjFWBase) - 280))(address1, address2);
#endif
}
unsigned long
OFSocketAddressHash(const OFSocketAddress *address)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((unsigned long (*)(const OFSocketAddress *__asm__("a0")))(((uintptr_t)ObjFWBase) - 288))(address);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((unsigned long (*)(const OFSocketAddress *))*(void **)(((uintptr_t)ObjFWBase) - 286))(address);
#endif
}
OFString *_Nonnull
OFSocketAddressString(const OFSocketAddress *address)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((OFString *_Nonnull (*)(const OFSocketAddress *__asm__("a0")))(((uintptr_t)ObjFWBase) - 294))(address);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((OFString *_Nonnull (*)(const OFSocketAddress *))*(void **)(((uintptr_t)ObjFWBase) - 292))(address);
#endif
}
void
OFSocketAddressSetIPPort(OFSocketAddress *address, uint16_t port)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
((void (*)(OFSocketAddress *__asm__("a0"), uint16_t __asm__("d0")))(((uintptr_t)ObjFWBase) - 300))(address, port);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
__extension__ ((void (*)(OFSocketAddress *, uint16_t))*(void **)(((uintptr_t)ObjFWBase) - 298))(address, port);
#endif
}
uint16_t
OFSocketAddressIPPort(const OFSocketAddress *address)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((uint16_t (*)(const OFSocketAddress *__asm__("a0")))(((uintptr_t)ObjFWBase) - 306))(address);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((uint16_t (*)(const OFSocketAddress *))*(void **)(((uintptr_t)ObjFWBase) - 304))(address);
#endif
}
OFString *
OFSocketAddressUNIXPath(const OFSocketAddress *address)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((OFString *(*)(const OFSocketAddress *__asm__("a0")))(((uintptr_t)ObjFWBase) - 312))(address);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((OFString *(*)(const OFSocketAddress *))*(void **)(((uintptr_t)ObjFWBase) - 310))(address);
#endif
}
void
OFSocketAddressSetIPXNetwork(OFSocketAddress *address, uint32_t network)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
((void (*)(OFSocketAddress *__asm__("a0"), uint32_t __asm__("d0")))(((uintptr_t)ObjFWBase) - 318))(address, network);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
__extension__ ((void (*)(OFSocketAddress *, uint32_t))*(void **)(((uintptr_t)ObjFWBase) - 316))(address, network);
#endif
}
uint32_t
OFSocketAddressIPXNetwork(const OFSocketAddress *address)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((uint32_t (*)(const OFSocketAddress *__asm__("a0")))(((uintptr_t)ObjFWBase) - 324))(address);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((uint32_t (*)(const OFSocketAddress *))*(void **)(((uintptr_t)ObjFWBase) - 322))(address);
#endif
}
void
OFSocketAddressSetIPXNode(OFSocketAddress *address, const unsigned char *node)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
((void (*)(OFSocketAddress *__asm__("a0"), const unsigned char *__asm__("a1")))(((uintptr_t)ObjFWBase) - 330))(address, node);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
__extension__ ((void (*)(OFSocketAddress *, const unsigned char *))*(void **)(((uintptr_t)ObjFWBase) - 328))(address, node);
#endif
}
void
OFSocketAddressGetIPXNode(const OFSocketAddress *address, unsigned char *_Nonnull node)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
((void (*)(const OFSocketAddress *__asm__("a0"), unsigned char *_Nonnull __asm__("a1")))(((uintptr_t)ObjFWBase) - 336))(address, node);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
__extension__ ((void (*)(const OFSocketAddress *, unsigned char *_Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 334))(address, node);
#endif
}
void
OFSocketAddressSetIPXPort(OFSocketAddress *address, uint16_t port)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
((void (*)(OFSocketAddress *__asm__("a0"), uint16_t __asm__("d0")))(((uintptr_t)ObjFWBase) - 342))(address, port);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
__extension__ ((void (*)(OFSocketAddress *, uint16_t))*(void **)(((uintptr_t)ObjFWBase) - 340))(address, port);
#endif
}
uint16_t
OFSocketAddressIPXPort(const OFSocketAddress *address)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((uint16_t (*)(const OFSocketAddress *__asm__("a0")))(((uintptr_t)ObjFWBase) - 348))(address);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((uint16_t (*)(const OFSocketAddress *))*(void **)(((uintptr_t)ObjFWBase) - 346))(address);
#endif
}
void
OFSocketAddressSetAppleTalkNetwork(OFSocketAddress *address, uint16_t network)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
((void (*)(OFSocketAddress *__asm__("a0"), uint16_t __asm__("d0")))(((uintptr_t)ObjFWBase) - 354))(address, network);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
__extension__ ((void (*)(OFSocketAddress *, uint16_t))*(void **)(((uintptr_t)ObjFWBase) - 352))(address, network);
#endif
}
uint16_t
OFSocketAddressAppleTalkNetwork(const OFSocketAddress *address)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((uint16_t (*)(const OFSocketAddress *__asm__("a0")))(((uintptr_t)ObjFWBase) - 360))(address);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((uint16_t (*)(const OFSocketAddress *))*(void **)(((uintptr_t)ObjFWBase) - 358))(address);
#endif
}
void
OFSocketAddressSetAppleTalkNode(OFSocketAddress *address, uint8_t node)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
((void (*)(OFSocketAddress *__asm__("a0"), uint8_t __asm__("d0")))(((uintptr_t)ObjFWBase) - 366))(address, node);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
__extension__ ((void (*)(OFSocketAddress *, uint8_t))*(void **)(((uintptr_t)ObjFWBase) - 364))(address, node);
#endif
}
uint8_t
OFSocketAddressAppleTalkNode(const OFSocketAddress *address)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((uint8_t (*)(const OFSocketAddress *__asm__("a0")))(((uintptr_t)ObjFWBase) - 372))(address);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((uint8_t (*)(const OFSocketAddress *))*(void **)(((uintptr_t)ObjFWBase) - 370))(address);
#endif
}
void
OFSocketAddressSetAppleTalkPort(OFSocketAddress *address, uint8_t port)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
((void (*)(OFSocketAddress *__asm__("a0"), uint8_t __asm__("d0")))(((uintptr_t)ObjFWBase) - 378))(address, port);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
__extension__ ((void (*)(OFSocketAddress *, uint8_t))*(void **)(((uintptr_t)ObjFWBase) - 376))(address, port);
#endif
}
uint8_t
OFSocketAddressAppleTalkPort(const OFSocketAddress *address)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((uint8_t (*)(const OFSocketAddress *__asm__("a0")))(((uintptr_t)ObjFWBase) - 384))(address);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((uint8_t (*)(const OFSocketAddress *))*(void **)(((uintptr_t)ObjFWBase) - 382))(address);
#endif
}
OFString *
OFTLSStreamErrorCodeDescription(OFTLSStreamErrorCode errorCode)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((OFString *(*)(OFTLSStreamErrorCode __asm__("d0")))(((uintptr_t)ObjFWBase) - 390))(errorCode);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((OFString *(*)(OFTLSStreamErrorCode))*(void **)(((uintptr_t)ObjFWBase) - 388))(errorCode);
#endif
}
Class _Nonnull *_Nullable
OFTLSStreamImplementationRef()
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((Class _Nonnull *_Nullable (*)())(((uintptr_t)ObjFWBase) - 396))();
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((Class _Nonnull *_Nullable (*)())*(void **)(((uintptr_t)ObjFWBase) - 394))();
#endif
}
const char *_Nullable
_OFStrPTime(const char *buffer, const char *format, struct tm *tm, int16_t *_Nullable tz)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((const char *_Nullable (*)(const char *__asm__("a0"), const char *__asm__("a1"), struct tm *__asm__("a2"), int16_t *_Nullable __asm__("a3")))(((uintptr_t)ObjFWBase) - 402))(buffer, format, tm, tz);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((const char *_Nullable (*)(const char *, const char *, struct tm *, int16_t *_Nullable))*(void **)(((uintptr_t)ObjFWBase) - 400))(buffer, format, tm, tz);
#endif
}
OFStringEncoding
OFStringEncodingParseName(OFString *string)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((OFStringEncoding (*)(OFString *__asm__("a0")))(((uintptr_t)ObjFWBase) - 408))(string);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((OFStringEncoding (*)(OFString *))*(void **)(((uintptr_t)ObjFWBase) - 406))(string);
#endif
}
OFString *_Nullable
OFStringEncodingName(OFStringEncoding encoding)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((OFString *_Nullable (*)(OFStringEncoding __asm__("d0")))(((uintptr_t)ObjFWBase) - 414))(encoding);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((OFString *_Nullable (*)(OFStringEncoding))*(void **)(((uintptr_t)ObjFWBase) - 412))(encoding);
#endif
}
size_t
OFUTF16StringLength(const OFChar16 *string)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((size_t (*)(const OFChar16 *__asm__("a0")))(((uintptr_t)ObjFWBase) - 420))(string);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((size_t (*)(const OFChar16 *))*(void **)(((uintptr_t)ObjFWBase) - 418))(string);
#endif
}
size_t
OFUTF32StringLength(const OFChar32 *string)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((size_t (*)(const OFChar32 *__asm__("a0")))(((uintptr_t)ObjFWBase) - 426))(string);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((size_t (*)(const OFChar32 *))*(void **)(((uintptr_t)ObjFWBase) - 424))(string);
#endif
}
OFString *_Nonnull
OFZIPArchiveEntryVersionToString(uint16_t version)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((OFString *_Nonnull (*)(uint16_t __asm__("d0")))(((uintptr_t)ObjFWBase) - 432))(version);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((OFString *_Nonnull (*)(uint16_t))*(void **)(((uintptr_t)ObjFWBase) - 430))(version);
#endif
}
OFString *_Nonnull
OFZIPArchiveEntryCompressionMethodName(OFZIPArchiveEntryCompressionMethod compressionMethod)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((OFString *_Nonnull (*)(OFZIPArchiveEntryCompressionMethod __asm__("d0")))(((uintptr_t)ObjFWBase) - 438))(compressionMethod);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((OFString *_Nonnull (*)(OFZIPArchiveEntryCompressionMethod))*(void **)(((uintptr_t)ObjFWBase) - 436))(compressionMethod);
#endif
}
size_t
OFZIPArchiveEntryExtraFieldFind(OFData *extraField, OFZIPArchiveEntryExtraFieldTag tag, uint16_t *size)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWBase;
(void)a6;
return ((size_t (*)(OFData *__asm__("a0"), OFZIPArchiveEntryExtraFieldTag __asm__("d0"), uint16_t *__asm__("a1")))(((uintptr_t)ObjFWBase) - 444))(extraField, tag, size);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWBase) : "r12"
);
return __extension__ ((size_t (*)(OFData *, OFZIPArchiveEntryExtraFieldTag, uint16_t *))*(void **)(((uintptr_t)ObjFWBase) - 442))(extraField, tag, size);
#endif
}
|
Changes to src/macros.h.
| ︙ | ︙ | |||
355 356 357 358 359 360 361 362 363 364 365 366 367 368 |
#endif
#ifndef OF_DIRECT_PROPERTY
# define OF_DIRECT_PROPERTY
#endif
#ifndef OF_DIRECT_MEMBERS
# define OF_DIRECT_MEMBERS
#endif
#ifdef OF_APPLE_RUNTIME
# if defined(OF_AMD64) || defined(OF_X86) || defined(OF_ARM64) || \
defined(OF_ARM) || defined(OF_POWERPC)
# define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR
# define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR_STRET
# endif
| > > > > > > | 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 |
#endif
#ifndef OF_DIRECT_PROPERTY
# define OF_DIRECT_PROPERTY
#endif
#ifndef OF_DIRECT_MEMBERS
# define OF_DIRECT_MEMBERS
#endif
#ifdef OF_COMPILING_AMIGA_LIBRARY
# undef errno
extern int *_Nonnull OFErrNo(void);
# define errno (*OFErrNo())
#endif
#ifdef OF_APPLE_RUNTIME
# if defined(OF_AMD64) || defined(OF_X86) || defined(OF_ARM64) || \
defined(OF_ARM) || defined(OF_POWERPC)
# define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR
# define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR_STRET
# endif
|
| ︙ | ︙ |
Changes to src/runtime/Makefile.
| ︙ | ︙ | |||
54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
CPPFLAGS += -I. -I.. -I../.. \
-DOBJC_COMPILING_RUNTIME \
-DOBJFWRT_AMIGA_LIB=\"${OBJFWRT_AMIGA_LIB}\" \
-DOBJFWRT_LIB_MAJOR=${OBJFWRT_LIB_MAJOR} \
-DOBJFWRT_LIB_MINOR=${OBJFWRT_LIB_MINOR} \
-DOBJFWRT_LIB_PATCH=${OBJFWRT_LIB_PATCH}
AMIGA_LIB_CFLAGS += -DOBJC_COMPILING_AMIGA_LIBRARY
LD = ${OBJC}
FRAMEWORK_LIBS = ${LIBS}
RCFLAGS = --use-temp-file \
-DOBJFWRT_LIB_MAJOR=${OBJFWRT_LIB_MAJOR} \
-DOBJFWRT_LIB_MINOR=${OBJFWRT_LIB_MINOR} \
-DOBJFWRT_LIB_VERSION=\"${OBJFWRT_LIB_MAJOR}.${OBJFWRT_LIB_MINOR}\" \
| > | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
CPPFLAGS += -I. -I.. -I../.. \
-DOBJC_COMPILING_RUNTIME \
-DOBJFWRT_AMIGA_LIB=\"${OBJFWRT_AMIGA_LIB}\" \
-DOBJFWRT_LIB_MAJOR=${OBJFWRT_LIB_MAJOR} \
-DOBJFWRT_LIB_MINOR=${OBJFWRT_LIB_MINOR} \
-DOBJFWRT_LIB_PATCH=${OBJFWRT_LIB_PATCH}
AMIGA_LIB_CFLAGS += -DOBJC_COMPILING_AMIGA_LIBRARY
AMIGA_LIB_CFLAGS += -DOBJC_COMPILING_AMIGA_LIBRARY
LD = ${OBJC}
FRAMEWORK_LIBS = ${LIBS}
RCFLAGS = --use-temp-file \
-DOBJFWRT_LIB_MAJOR=${OBJFWRT_LIB_MAJOR} \
-DOBJFWRT_LIB_MINOR=${OBJFWRT_LIB_MINOR} \
-DOBJFWRT_LIB_VERSION=\"${OBJFWRT_LIB_MAJOR}.${OBJFWRT_LIB_MINOR}\" \
|
| ︙ | ︙ |
Changes to src/runtime/amiga-library-end.S.
| ︙ | ︙ | |||
15 16 17 18 19 20 21 22 23 24 25 | * You should have received a copy of the GNU Lesser General Public License * version 3.0 along with this program. If not, see * <https://www.gnu.org/licenses/>. */ #include "config.h" .section .eh_frame, "aw" .long 0 .section .ctors, "aw" .long 0 | > > > > > > > > > | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | * You should have received a copy of the GNU Lesser General Public License * version 3.0 along with this program. If not, see * <https://www.gnu.org/licenses/>. */ #include "config.h" #if defined(OF_MORPHOS) .section .eh_frame, "aw" .long 0 .section .ctors, "aw" .long 0 #else .section .list___EH_FRAME_BEGINS__, "aw" .long 0 .section .dlist___EH_FRAME_OBJECTS__, "aw" .long 0 .section .list___CTOR_LIST__, "aw" .long 0 #endif |
Changes to src/runtime/amiga-library-funcarray.inc.
| ︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | * <https://www.gnu.org/licenses/>. */ /* This file is automatically generated from amiga-library.xml */ (CONST_APTR)glue_objc_init, (CONST_APTR)glue___objc_exec_class, (CONST_APTR)glue___gnu_objc_personality_v0, (CONST_APTR)glue_class_registerAlias_np, (CONST_APTR)glue_objc_msg_lookup, (CONST_APTR)glue_objc_msg_lookup_stret, (CONST_APTR)glue_objc_msg_lookup_super, (CONST_APTR)glue_objc_msg_lookup_super_stret, (CONST_APTR)glue_objc_lookUpClass, (CONST_APTR)glue_objc_getClass, | > > > > > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | * <https://www.gnu.org/licenses/>. */ /* This file is automatically generated from amiga-library.xml */ (CONST_APTR)glue_objc_init, (CONST_APTR)glue___objc_exec_class, #if !defined(OF_AMIGAOS_M68K) (CONST_APTR)glue___gnu_objc_personality_v0, #endif #if defined(OF_AMIGAOS_M68K) (CONST_APTR)glue___gnu_objc_personality_sj0_wrapper, #endif (CONST_APTR)glue_class_registerAlias_np, (CONST_APTR)glue_objc_msg_lookup, (CONST_APTR)glue_objc_msg_lookup_stret, (CONST_APTR)glue_objc_msg_lookup_super, (CONST_APTR)glue_objc_msg_lookup_super_stret, (CONST_APTR)glue_objc_lookUpClass, (CONST_APTR)glue_objc_getClass, |
| ︙ | ︙ |
Changes to src/runtime/amiga-library-glue-morphos.S.
| ︙ | ︙ | |||
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | b objc_init .globl glue___objc_exec_class glue___objc_exec_class: lwz %r13, 44(%r12) b __objc_exec_class .globl glue___gnu_objc_personality_v0 glue___gnu_objc_personality_v0: lwz %r13, 44(%r12) b __gnu_objc_personality_v0 .globl glue_class_registerAlias_np glue_class_registerAlias_np: lwz %r13, 44(%r12) b class_registerAlias_np .globl glue_objc_msg_lookup | > > > > > > > > > | 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 | b objc_init .globl glue___objc_exec_class glue___objc_exec_class: lwz %r13, 44(%r12) b __objc_exec_class #if !defined(OF_AMIGAOS_M68K) .globl glue___gnu_objc_personality_v0 glue___gnu_objc_personality_v0: lwz %r13, 44(%r12) b __gnu_objc_personality_v0 #endif #if defined(OF_AMIGAOS_M68K) .globl glue___gnu_objc_personality_sj0_wrapper glue___gnu_objc_personality_sj0_wrapper: lwz %r13, 44(%r12) b __gnu_objc_personality_sj0_wrapper #endif .globl glue_class_registerAlias_np glue_class_registerAlias_np: lwz %r13, 44(%r12) b class_registerAlias_np .globl glue_objc_msg_lookup |
| ︙ | ︙ |
Changes to src/runtime/amiga-library-glue.h.
| ︙ | ︙ | |||
18 19 20 21 22 23 24 | */ /* This file is automatically generated from amiga-library.xml */ #import "ObjFWRT.h" #import "private.h" | > > > > > > > > > > | | > > > > | > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 18 19 20 21 22 23 24 25 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 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 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 | */ /* This file is automatically generated from amiga-library.xml */ #import "ObjFWRT.h" #import "private.h" #ifdef OF_AMIGAOS_M68K # define PPC_PARAMS(...) (void) # define M68K_ARG(type, name, reg) \ register type reg##name __asm__(#reg); \ type name = reg##name; #else # define PPC_PARAMS(...) (__VA_ARGS__) # define M68K_ARG(...) #endif extern bool glue_objc_init PPC_PARAMS(struct objc_linklib_context *ctx); extern void glue___objc_exec_class PPC_PARAMS(struct objc_module *_Nonnull module); #if !defined(OF_AMIGAOS_M68K) extern int glue___gnu_objc_personality_v0 PPC_PARAMS(int version, int actions, uint64_t exClass, void *_Nonnull ex, void *_Nonnull ctx); #endif #if defined(OF_AMIGAOS_M68K) extern int glue___gnu_objc_personality_sj0_wrapper PPC_PARAMS(int version, int actions, uint64_t *_Nonnull exClass, void *_Nonnull ex, void *_Nonnull ctx); #endif extern void glue_class_registerAlias_np PPC_PARAMS(Class _Nonnull class_, const char *_Nonnull name); extern IMP _Nonnull glue_objc_msg_lookup PPC_PARAMS(id _Nullable object, SEL _Nonnull selector); extern IMP _Nonnull glue_objc_msg_lookup_stret PPC_PARAMS(id _Nullable object, SEL _Nonnull selector); extern IMP _Nonnull glue_objc_msg_lookup_super PPC_PARAMS(struct objc_super *_Nonnull super, SEL _Nonnull selector); extern IMP _Nonnull glue_objc_msg_lookup_super_stret PPC_PARAMS(struct objc_super *_Nonnull super, SEL _Nonnull selector); extern Class _Nullable glue_objc_lookUpClass PPC_PARAMS(const char *_Nonnull name); extern Class _Nullable glue_objc_getClass PPC_PARAMS(const char *_Nonnull name); extern Class _Nonnull glue_objc_getRequiredClass PPC_PARAMS(const char *_Nonnull name); extern Class _Nullable glue_objc_lookup_class PPC_PARAMS(const char *_Nonnull name); extern Class _Nonnull glue_objc_get_class PPC_PARAMS(const char *_Nonnull name); extern void glue_objc_exception_throw PPC_PARAMS(id _Nonnull object); extern int glue_objc_sync_enter PPC_PARAMS(id _Nullable object); extern int glue_objc_sync_exit PPC_PARAMS(id _Nullable object); extern id _Nullable glue_objc_getProperty PPC_PARAMS(id _Nonnull self, SEL _Nonnull _cmd, ptrdiff_t offset, bool atomic); extern void glue_objc_setProperty PPC_PARAMS(id _Nonnull self, SEL _Nonnull _cmd, ptrdiff_t offset, id _Nullable value, bool atomic, signed char copy); extern void glue_objc_getPropertyStruct PPC_PARAMS(void *_Nonnull dest, const void *_Nonnull src, ptrdiff_t size, bool atomic, bool strong); extern void glue_objc_setPropertyStruct PPC_PARAMS(void *_Nonnull dest, const void *_Nonnull src, ptrdiff_t size, bool atomic, bool strong); extern void glue_objc_enumerationMutation PPC_PARAMS(id _Nonnull object); extern id _Nullable glue_objc_retain PPC_PARAMS(id _Nullable object); extern id _Nullable glue_objc_retainBlock PPC_PARAMS(id _Nullable block); extern id _Nullable glue_objc_retainAutorelease PPC_PARAMS(id _Nullable object); extern void glue_objc_release PPC_PARAMS(id _Nullable object); extern id _Nullable glue_objc_autorelease PPC_PARAMS(id _Nullable object); extern id _Nullable glue_objc_autoreleaseReturnValue PPC_PARAMS(id _Nullable object); extern id _Nullable glue_objc_retainAutoreleaseReturnValue PPC_PARAMS(id _Nullable object); extern id _Nullable glue_objc_retainAutoreleasedReturnValue PPC_PARAMS(id _Nullable object); extern id _Nullable glue_objc_storeStrong PPC_PARAMS(id _Nullable *_Nonnull object, id _Nullable value); extern id _Nullable glue_objc_storeWeak PPC_PARAMS(id _Nullable *_Nonnull object, id _Nullable value); extern id _Nullable glue_objc_loadWeakRetained PPC_PARAMS(id _Nullable *_Nonnull object); extern id _Nullable glue_objc_initWeak PPC_PARAMS(id _Nullable *_Nonnull object, id _Nullable value); extern void glue_objc_destroyWeak PPC_PARAMS(id _Nullable *_Nonnull object); extern id _Nullable glue_objc_loadWeak PPC_PARAMS(id _Nullable *_Nonnull object); extern void glue_objc_copyWeak PPC_PARAMS(id _Nullable *_Nonnull dest, id _Nullable *_Nonnull src); extern void glue_objc_moveWeak PPC_PARAMS(id _Nullable *_Nonnull dest, id _Nullable *_Nonnull src); extern SEL _Nonnull glue_sel_registerName PPC_PARAMS(const char *_Nonnull name); extern const char *_Nonnull glue_sel_getName PPC_PARAMS(SEL _Nonnull selector); extern bool glue_sel_isEqual PPC_PARAMS(SEL _Nonnull selector1, SEL _Nonnull selector2); extern Class _Nonnull glue_objc_allocateClassPair PPC_PARAMS(Class _Nullable superclass, const char *_Nonnull name, size_t extraBytes); extern void glue_objc_registerClassPair PPC_PARAMS(Class _Nonnull class_); extern unsigned int glue_objc_getClassList PPC_PARAMS(Class _Nonnull *_Nullable buffer, unsigned int count); extern Class _Nonnull *_Nonnull glue_objc_copyClassList PPC_PARAMS(unsigned int *_Nullable length); extern bool glue_class_isMetaClass PPC_PARAMS(Class _Nullable class_); extern const char *_Nullable glue_class_getName PPC_PARAMS(Class _Nullable class_); extern Class _Nullable glue_class_getSuperclass PPC_PARAMS(Class _Nullable class_); extern unsigned long glue_class_getInstanceSize PPC_PARAMS(Class _Nullable class_); extern bool glue_class_respondsToSelector PPC_PARAMS(Class _Nullable class_, SEL _Nonnull selector); extern bool glue_class_conformsToProtocol PPC_PARAMS(Class _Nullable class_, Protocol *_Nonnull p); extern IMP _Nullable glue_class_getMethodImplementation PPC_PARAMS(Class _Nullable class_, SEL _Nonnull selector); extern IMP _Nullable glue_class_getMethodImplementation_stret PPC_PARAMS(Class _Nullable class_, SEL _Nonnull selector); extern Method _Nullable glue_class_getInstanceMethod PPC_PARAMS(Class _Nullable class_, SEL _Nonnull selector); extern bool glue_class_addMethod PPC_PARAMS(Class _Nonnull class_, SEL _Nonnull selector, IMP _Nonnull implementation, const char *_Nullable typeEncoding); extern IMP _Nullable glue_class_replaceMethod PPC_PARAMS(Class _Nonnull class_, SEL _Nonnull selector, IMP _Nonnull implementation, const char *_Nullable typeEncoding); extern Class _Nullable glue_object_getClass PPC_PARAMS(id _Nullable object); extern Class _Nullable glue_object_setClass PPC_PARAMS(id _Nullable object, Class _Nonnull class_); extern const char *_Nullable glue_object_getClassName PPC_PARAMS(id _Nullable object); extern const char *_Nonnull glue_protocol_getName PPC_PARAMS(Protocol *_Nonnull protocol); extern bool glue_protocol_isEqual PPC_PARAMS(Protocol *_Nonnull protocol1, Protocol *_Nonnull protocol2); extern bool glue_protocol_conformsToProtocol PPC_PARAMS(Protocol *_Nonnull protocol1, Protocol *_Nonnull protocol2); extern Method _Nullable *_Nullable glue_class_copyMethodList PPC_PARAMS(Class _Nullable class_, unsigned int *_Nullable outCount); extern SEL _Nonnull glue_method_getName PPC_PARAMS(Method _Nonnull method); extern const char *_Nullable glue_method_getTypeEncoding PPC_PARAMS(Method _Nonnull method); extern Ivar _Nullable *_Nullable glue_class_copyIvarList PPC_PARAMS(Class _Nullable class_, unsigned int *_Nullable outCount); extern const char *_Nonnull glue_ivar_getName PPC_PARAMS(Ivar _Nonnull ivar); extern const char *_Nonnull glue_ivar_getTypeEncoding PPC_PARAMS(Ivar _Nonnull ivar); extern ptrdiff_t glue_ivar_getOffset PPC_PARAMS(Ivar _Nonnull ivar); extern objc_property_t _Nullable *_Nullable glue_class_copyPropertyList PPC_PARAMS(Class _Nullable class_, unsigned int *_Nullable outCount); extern const char *_Nonnull glue_property_getName PPC_PARAMS(objc_property_t _Nonnull property); extern char *_Nullable glue_property_copyAttributeValue PPC_PARAMS(objc_property_t _Nonnull property, const char *_Nonnull name); extern void glue_objc_deinit(void); extern _Nullable objc_uncaught_exception_handler glue_objc_setUncaughtExceptionHandler PPC_PARAMS(objc_uncaught_exception_handler _Nullable handler); extern void glue_objc_setForwardHandler PPC_PARAMS(IMP _Nullable forward, IMP _Nullable stretForward); extern void glue_objc_setEnumerationMutationHandler PPC_PARAMS(objc_enumeration_mutation_handler _Nullable hadler); extern id _Nullable glue_objc_constructInstance PPC_PARAMS(Class _Nullable class_, void *_Nullable bytes); extern void *_Nullable glue_objc_destructInstance PPC_PARAMS(id _Nullable object); extern id _Nullable glue_class_createInstance PPC_PARAMS(Class _Nullable class_, size_t extraBytes); extern id _Nullable glue_object_dispose PPC_PARAMS(id _Nullable object); extern id _Nonnull glue__objc_rootRetain PPC_PARAMS(id _Nonnull object); extern unsigned int glue__objc_rootRetainCount PPC_PARAMS(id _Nonnull object); extern void glue__objc_rootRelease PPC_PARAMS(id _Nonnull object); extern void *_Null_unspecified glue_objc_autoreleasePoolPush(void); extern void glue_objc_autoreleasePoolPop PPC_PARAMS(void *_Null_unspecified pool); extern id _Nullable glue__objc_rootAutorelease PPC_PARAMS(id _Nullable object); extern void glue_objc_setTaggedPointerSecret PPC_PARAMS(uintptr_t secret); extern int glue_objc_registerTaggedPointerClass PPC_PARAMS(Class _Nonnull class_); extern bool glue_object_isTaggedPointer PPC_PARAMS(id _Nullable object); extern uintptr_t glue_object_getTaggedPointerValue PPC_PARAMS(id _Nonnull object); extern id _Nullable glue_objc_createTaggedPointer PPC_PARAMS(int class_, uintptr_t value); extern void glue_objc_setAssociatedObject PPC_PARAMS(id _Nonnull object, const void *_Nonnull key, id _Nullable value, objc_associationPolicy policy); extern id _Nullable glue_objc_getAssociatedObject PPC_PARAMS(id _Nonnull object, const void *_Nonnull key); extern void glue_objc_removeAssociatedObjects PPC_PARAMS(id _Nonnull object); |
Added src/runtime/amiga-library-glue.m.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 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 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 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 142 143 144 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 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 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 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 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 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 |
/*
* Copyright (c) 2008-2025 Jonathan Schleifer <js@nil.im>
*
* All rights reserved.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License version 3.0 only,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* version 3.0 for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* version 3.0 along with this program. If not, see
* <https://www.gnu.org/licenses/>.
*/
/* This file is automatically generated from amiga-library.xml */
#include "config.h"
#import "amiga-glue.h"
bool __saveds
glue_objc_init(void)
{
M68K_ARG(struct objc_linklib_context *, ctx, a0)
return objc_init(ctx);
}
void __saveds
glue___objc_exec_class(void)
{
M68K_ARG(struct objc_module *_Nonnull, module, a0)
__objc_exec_class(module);
}
#if !defined(OF_AMIGAOS_M68K)
int __saveds
glue___gnu_objc_personality_v0(void)
{
M68K_ARG(int, version, (nil))
M68K_ARG(int, actions, (nil))
M68K_ARG(uint64_t, exClass, (nil))
M68K_ARG(void *_Nonnull, ex, (nil))
M68K_ARG(void *_Nonnull, ctx, (nil))
return __gnu_objc_personality_v0(version, actions, exClass, ex, ctx);
}
#endif
#if defined(OF_AMIGAOS_M68K)
int __saveds
glue___gnu_objc_personality_sj0_wrapper(void)
{
M68K_ARG(int, version, d0)
M68K_ARG(int, actions, d1)
M68K_ARG(uint64_t *_Nonnull, exClass, a0)
M68K_ARG(void *_Nonnull, ex, a1)
M68K_ARG(void *_Nonnull, ctx, a2)
return __gnu_objc_personality_sj0_wrapper(version, actions, exClass, ex, ctx);
}
#endif
void __saveds
glue_class_registerAlias_np(void)
{
M68K_ARG(Class _Nonnull, class_, a0)
M68K_ARG(const char *_Nonnull, name, a1)
class_registerAlias_np(class_, name);
}
IMP _Nonnull __saveds
glue_objc_msg_lookup(void)
{
M68K_ARG(id _Nullable, object, a0)
M68K_ARG(SEL _Nonnull, selector, a1)
return objc_msg_lookup(object, selector);
}
IMP _Nonnull __saveds
glue_objc_msg_lookup_stret(void)
{
M68K_ARG(id _Nullable, object, a0)
M68K_ARG(SEL _Nonnull, selector, a1)
return objc_msg_lookup_stret(object, selector);
}
IMP _Nonnull __saveds
glue_objc_msg_lookup_super(void)
{
M68K_ARG(struct objc_super *_Nonnull, super, a0)
M68K_ARG(SEL _Nonnull, selector, a1)
return objc_msg_lookup_super(super, selector);
}
IMP _Nonnull __saveds
glue_objc_msg_lookup_super_stret(void)
{
M68K_ARG(struct objc_super *_Nonnull, super, a0)
M68K_ARG(SEL _Nonnull, selector, a1)
return objc_msg_lookup_super_stret(super, selector);
}
Class _Nullable __saveds
glue_objc_lookUpClass(void)
{
M68K_ARG(const char *_Nonnull, name, a0)
return objc_lookUpClass(name);
}
Class _Nullable __saveds
glue_objc_getClass(void)
{
M68K_ARG(const char *_Nonnull, name, a0)
return objc_getClass(name);
}
Class _Nonnull __saveds
glue_objc_getRequiredClass(void)
{
M68K_ARG(const char *_Nonnull, name, a0)
return objc_getRequiredClass(name);
}
Class _Nullable __saveds
glue_objc_lookup_class(void)
{
M68K_ARG(const char *_Nonnull, name, a0)
return objc_lookup_class(name);
}
Class _Nonnull __saveds
glue_objc_get_class(void)
{
M68K_ARG(const char *_Nonnull, name, a0)
return objc_get_class(name);
}
void __saveds
glue_objc_exception_throw(void)
{
M68K_ARG(id _Nonnull, object, a0)
objc_exception_throw(object);
}
int __saveds
glue_objc_sync_enter(void)
{
M68K_ARG(id _Nullable, object, a0)
return objc_sync_enter(object);
}
int __saveds
glue_objc_sync_exit(void)
{
M68K_ARG(id _Nullable, object, a0)
return objc_sync_exit(object);
}
id _Nullable __saveds
glue_objc_getProperty(void)
{
M68K_ARG(id _Nonnull, self, a0)
M68K_ARG(SEL _Nonnull, _cmd, a1)
M68K_ARG(ptrdiff_t, offset, d0)
M68K_ARG(bool, atomic, d1)
return objc_getProperty(self, _cmd, offset, atomic);
}
void __saveds
glue_objc_setProperty(void)
{
M68K_ARG(id _Nonnull, self, a0)
M68K_ARG(SEL _Nonnull, _cmd, a1)
M68K_ARG(ptrdiff_t, offset, d0)
M68K_ARG(id _Nullable, value, a2)
M68K_ARG(bool, atomic, d1)
M68K_ARG(signed char, copy, d2)
objc_setProperty(self, _cmd, offset, value, atomic, copy);
}
void __saveds
glue_objc_getPropertyStruct(void)
{
M68K_ARG(void *_Nonnull, dest, a0)
M68K_ARG(const void *_Nonnull, src, a1)
M68K_ARG(ptrdiff_t, size, d0)
M68K_ARG(bool, atomic, d1)
M68K_ARG(bool, strong, d2)
objc_getPropertyStruct(dest, src, size, atomic, strong);
}
void __saveds
glue_objc_setPropertyStruct(void)
{
M68K_ARG(void *_Nonnull, dest, a0)
M68K_ARG(const void *_Nonnull, src, a1)
M68K_ARG(ptrdiff_t, size, d0)
M68K_ARG(bool, atomic, d1)
M68K_ARG(bool, strong, d2)
objc_setPropertyStruct(dest, src, size, atomic, strong);
}
void __saveds
glue_objc_enumerationMutation(void)
{
M68K_ARG(id _Nonnull, object, a0)
objc_enumerationMutation(object);
}
id _Nullable __saveds
glue_objc_retain(void)
{
M68K_ARG(id _Nullable, object, a0)
return objc_retain(object);
}
id _Nullable __saveds
glue_objc_retainBlock(void)
{
M68K_ARG(id _Nullable, block, a0)
return objc_retainBlock(block);
}
id _Nullable __saveds
glue_objc_retainAutorelease(void)
{
M68K_ARG(id _Nullable, object, a0)
return objc_retainAutorelease(object);
}
void __saveds
glue_objc_release(void)
{
M68K_ARG(id _Nullable, object, a0)
objc_release(object);
}
id _Nullable __saveds
glue_objc_autorelease(void)
{
M68K_ARG(id _Nullable, object, a0)
return objc_autorelease(object);
}
id _Nullable __saveds
glue_objc_autoreleaseReturnValue(void)
{
M68K_ARG(id _Nullable, object, a0)
return objc_autoreleaseReturnValue(object);
}
id _Nullable __saveds
glue_objc_retainAutoreleaseReturnValue(void)
{
M68K_ARG(id _Nullable, object, a0)
return objc_retainAutoreleaseReturnValue(object);
}
id _Nullable __saveds
glue_objc_retainAutoreleasedReturnValue(void)
{
M68K_ARG(id _Nullable, object, a0)
return objc_retainAutoreleasedReturnValue(object);
}
id _Nullable __saveds
glue_objc_storeStrong(void)
{
M68K_ARG(id _Nullable *_Nonnull, object, a0)
M68K_ARG(id _Nullable, value, a1)
return objc_storeStrong(object, value);
}
id _Nullable __saveds
glue_objc_storeWeak(void)
{
M68K_ARG(id _Nullable *_Nonnull, object, a0)
M68K_ARG(id _Nullable, value, a1)
return objc_storeWeak(object, value);
}
id _Nullable __saveds
glue_objc_loadWeakRetained(void)
{
M68K_ARG(id _Nullable *_Nonnull, object, a0)
return objc_loadWeakRetained(object);
}
id _Nullable __saveds
glue_objc_initWeak(void)
{
M68K_ARG(id _Nullable *_Nonnull, object, a0)
M68K_ARG(id _Nullable, value, a1)
return objc_initWeak(object, value);
}
void __saveds
glue_objc_destroyWeak(void)
{
M68K_ARG(id _Nullable *_Nonnull, object, a0)
objc_destroyWeak(object);
}
id _Nullable __saveds
glue_objc_loadWeak(void)
{
M68K_ARG(id _Nullable *_Nonnull, object, a0)
return objc_loadWeak(object);
}
void __saveds
glue_objc_copyWeak(void)
{
M68K_ARG(id _Nullable *_Nonnull, dest, a0)
M68K_ARG(id _Nullable *_Nonnull, src, a1)
objc_copyWeak(dest, src);
}
void __saveds
glue_objc_moveWeak(void)
{
M68K_ARG(id _Nullable *_Nonnull, dest, a0)
M68K_ARG(id _Nullable *_Nonnull, src, a1)
objc_moveWeak(dest, src);
}
SEL _Nonnull __saveds
glue_sel_registerName(void)
{
M68K_ARG(const char *_Nonnull, name, a0)
return sel_registerName(name);
}
const char *_Nonnull __saveds
glue_sel_getName(void)
{
M68K_ARG(SEL _Nonnull, selector, a0)
return sel_getName(selector);
}
bool __saveds
glue_sel_isEqual(void)
{
M68K_ARG(SEL _Nonnull, selector1, a0)
M68K_ARG(SEL _Nonnull, selector2, a1)
return sel_isEqual(selector1, selector2);
}
Class _Nonnull __saveds
glue_objc_allocateClassPair(void)
{
M68K_ARG(Class _Nullable, superclass, a0)
M68K_ARG(const char *_Nonnull, name, a1)
M68K_ARG(size_t, extraBytes, d0)
return objc_allocateClassPair(superclass, name, extraBytes);
}
void __saveds
glue_objc_registerClassPair(void)
{
M68K_ARG(Class _Nonnull, class_, a0)
objc_registerClassPair(class_);
}
unsigned int __saveds
glue_objc_getClassList(void)
{
M68K_ARG(Class _Nonnull *_Nullable, buffer, a0)
M68K_ARG(unsigned int, count, d0)
return objc_getClassList(buffer, count);
}
Class _Nonnull *_Nonnull __saveds
glue_objc_copyClassList(void)
{
M68K_ARG(unsigned int *_Nullable, length, a0)
return objc_copyClassList(length);
}
bool __saveds
glue_class_isMetaClass(void)
{
M68K_ARG(Class _Nullable, class_, a0)
return class_isMetaClass(class_);
}
const char *_Nullable __saveds
glue_class_getName(void)
{
M68K_ARG(Class _Nullable, class_, a0)
return class_getName(class_);
}
Class _Nullable __saveds
glue_class_getSuperclass(void)
{
M68K_ARG(Class _Nullable, class_, a0)
return class_getSuperclass(class_);
}
unsigned long __saveds
glue_class_getInstanceSize(void)
{
M68K_ARG(Class _Nullable, class_, a0)
return class_getInstanceSize(class_);
}
bool __saveds
glue_class_respondsToSelector(void)
{
M68K_ARG(Class _Nullable, class_, a0)
M68K_ARG(SEL _Nonnull, selector, a1)
return class_respondsToSelector(class_, selector);
}
bool __saveds
glue_class_conformsToProtocol(void)
{
M68K_ARG(Class _Nullable, class_, a0)
M68K_ARG(Protocol *_Nonnull, p, a1)
return class_conformsToProtocol(class_, p);
}
IMP _Nullable __saveds
glue_class_getMethodImplementation(void)
{
M68K_ARG(Class _Nullable, class_, a0)
M68K_ARG(SEL _Nonnull, selector, a1)
return class_getMethodImplementation(class_, selector);
}
IMP _Nullable __saveds
glue_class_getMethodImplementation_stret(void)
{
M68K_ARG(Class _Nullable, class_, a0)
M68K_ARG(SEL _Nonnull, selector, a1)
return class_getMethodImplementation_stret(class_, selector);
}
Method _Nullable __saveds
glue_class_getInstanceMethod(void)
{
M68K_ARG(Class _Nullable, class_, a0)
M68K_ARG(SEL _Nonnull, selector, a1)
return class_getInstanceMethod(class_, selector);
}
bool __saveds
glue_class_addMethod(void)
{
M68K_ARG(Class _Nonnull, class_, a0)
M68K_ARG(SEL _Nonnull, selector, a1)
M68K_ARG(IMP _Nonnull, implementation, a2)
M68K_ARG(const char *_Nullable, typeEncoding, a3)
return class_addMethod(class_, selector, implementation, typeEncoding);
}
IMP _Nullable __saveds
glue_class_replaceMethod(void)
{
M68K_ARG(Class _Nonnull, class_, a0)
M68K_ARG(SEL _Nonnull, selector, a1)
M68K_ARG(IMP _Nonnull, implementation, a2)
M68K_ARG(const char *_Nullable, typeEncoding, a3)
return class_replaceMethod(class_, selector, implementation, typeEncoding);
}
Class _Nullable __saveds
glue_object_getClass(void)
{
M68K_ARG(id _Nullable, object, a0)
return object_getClass(object);
}
Class _Nullable __saveds
glue_object_setClass(void)
{
M68K_ARG(id _Nullable, object, a0)
M68K_ARG(Class _Nonnull, class_, a1)
return object_setClass(object, class_);
}
const char *_Nullable __saveds
glue_object_getClassName(void)
{
M68K_ARG(id _Nullable, object, a0)
return object_getClassName(object);
}
const char *_Nonnull __saveds
glue_protocol_getName(void)
{
M68K_ARG(Protocol *_Nonnull, protocol, a0)
return protocol_getName(protocol);
}
bool __saveds
glue_protocol_isEqual(void)
{
M68K_ARG(Protocol *_Nonnull, protocol1, a0)
M68K_ARG(Protocol *_Nonnull, protocol2, a1)
return protocol_isEqual(protocol1, protocol2);
}
bool __saveds
glue_protocol_conformsToProtocol(void)
{
M68K_ARG(Protocol *_Nonnull, protocol1, a0)
M68K_ARG(Protocol *_Nonnull, protocol2, a1)
return protocol_conformsToProtocol(protocol1, protocol2);
}
Method _Nullable *_Nullable __saveds
glue_class_copyMethodList(void)
{
M68K_ARG(Class _Nullable, class_, a0)
M68K_ARG(unsigned int *_Nullable, outCount, a1)
return class_copyMethodList(class_, outCount);
}
SEL _Nonnull __saveds
glue_method_getName(void)
{
M68K_ARG(Method _Nonnull, method, a0)
return method_getName(method);
}
const char *_Nullable __saveds
glue_method_getTypeEncoding(void)
{
M68K_ARG(Method _Nonnull, method, a0)
return method_getTypeEncoding(method);
}
Ivar _Nullable *_Nullable __saveds
glue_class_copyIvarList(void)
{
M68K_ARG(Class _Nullable, class_, a0)
M68K_ARG(unsigned int *_Nullable, outCount, a1)
return class_copyIvarList(class_, outCount);
}
const char *_Nonnull __saveds
glue_ivar_getName(void)
{
M68K_ARG(Ivar _Nonnull, ivar, a0)
return ivar_getName(ivar);
}
const char *_Nonnull __saveds
glue_ivar_getTypeEncoding(void)
{
M68K_ARG(Ivar _Nonnull, ivar, a0)
return ivar_getTypeEncoding(ivar);
}
ptrdiff_t __saveds
glue_ivar_getOffset(void)
{
M68K_ARG(Ivar _Nonnull, ivar, a0)
return ivar_getOffset(ivar);
}
objc_property_t _Nullable *_Nullable __saveds
glue_class_copyPropertyList(void)
{
M68K_ARG(Class _Nullable, class_, a0)
M68K_ARG(unsigned int *_Nullable, outCount, a1)
return class_copyPropertyList(class_, outCount);
}
const char *_Nonnull __saveds
glue_property_getName(void)
{
M68K_ARG(objc_property_t _Nonnull, property, a0)
return property_getName(property);
}
char *_Nullable __saveds
glue_property_copyAttributeValue(void)
{
M68K_ARG(objc_property_t _Nonnull, property, a0)
M68K_ARG(const char *_Nonnull, name, a1)
return property_copyAttributeValue(property, name);
}
void __saveds
glue_objc_deinit(void)
{
objc_deinit();
}
_Nullable objc_uncaught_exception_handler __saveds
glue_objc_setUncaughtExceptionHandler(void)
{
M68K_ARG(objc_uncaught_exception_handler _Nullable, handler, a0)
return objc_setUncaughtExceptionHandler(handler);
}
void __saveds
glue_objc_setForwardHandler(void)
{
M68K_ARG(IMP _Nullable, forward, a0)
M68K_ARG(IMP _Nullable, stretForward, a1)
objc_setForwardHandler(forward, stretForward);
}
void __saveds
glue_objc_setEnumerationMutationHandler(void)
{
M68K_ARG(objc_enumeration_mutation_handler _Nullable, hadler, a0)
objc_setEnumerationMutationHandler(hadler);
}
id _Nullable __saveds
glue_objc_constructInstance(void)
{
M68K_ARG(Class _Nullable, class_, a0)
M68K_ARG(void *_Nullable, bytes, a1)
return objc_constructInstance(class_, bytes);
}
void *_Nullable __saveds
glue_objc_destructInstance(void)
{
M68K_ARG(id _Nullable, object, a0)
return objc_destructInstance(object);
}
id _Nullable __saveds
glue_class_createInstance(void)
{
M68K_ARG(Class _Nullable, class_, a0)
M68K_ARG(size_t, extraBytes, d0)
return class_createInstance(class_, extraBytes);
}
id _Nullable __saveds
glue_object_dispose(void)
{
M68K_ARG(id _Nullable, object, a0)
return object_dispose(object);
}
id _Nonnull __saveds
glue__objc_rootRetain(void)
{
M68K_ARG(id _Nonnull, object, a0)
return _objc_rootRetain(object);
}
unsigned int __saveds
glue__objc_rootRetainCount(void)
{
M68K_ARG(id _Nonnull, object, a0)
return _objc_rootRetainCount(object);
}
void __saveds
glue__objc_rootRelease(void)
{
M68K_ARG(id _Nonnull, object, a0)
_objc_rootRelease(object);
}
void *_Null_unspecified __saveds
glue_objc_autoreleasePoolPush(void)
{
return objc_autoreleasePoolPush();
}
void __saveds
glue_objc_autoreleasePoolPop(void)
{
M68K_ARG(void *_Null_unspecified, pool, a0)
objc_autoreleasePoolPop(pool);
}
id _Nullable __saveds
glue__objc_rootAutorelease(void)
{
M68K_ARG(id _Nullable, object, a0)
return _objc_rootAutorelease(object);
}
void __saveds
glue_objc_setTaggedPointerSecret(void)
{
M68K_ARG(uintptr_t, secret, d0)
objc_setTaggedPointerSecret(secret);
}
int __saveds
glue_objc_registerTaggedPointerClass(void)
{
M68K_ARG(Class _Nonnull, class_, a0)
return objc_registerTaggedPointerClass(class_);
}
bool __saveds
glue_object_isTaggedPointer(void)
{
M68K_ARG(id _Nullable, object, a0)
return object_isTaggedPointer(object);
}
uintptr_t __saveds
glue_object_getTaggedPointerValue(void)
{
M68K_ARG(id _Nonnull, object, a0)
return object_getTaggedPointerValue(object);
}
id _Nullable __saveds
glue_objc_createTaggedPointer(void)
{
M68K_ARG(int, class_, a0)
M68K_ARG(uintptr_t, value, d0)
return objc_createTaggedPointer(class_, value);
}
void __saveds
glue_objc_setAssociatedObject(void)
{
M68K_ARG(id _Nonnull, object, a0)
M68K_ARG(const void *_Nonnull, key, a1)
M68K_ARG(id _Nullable, value, a2)
M68K_ARG(objc_associationPolicy, policy, d0)
objc_setAssociatedObject(object, key, value, policy);
}
id _Nullable __saveds
glue_objc_getAssociatedObject(void)
{
M68K_ARG(id _Nonnull, object, a0)
M68K_ARG(const void *_Nonnull, key, a1)
return objc_getAssociatedObject(object, key);
}
void __saveds
glue_objc_removeAssociatedObjects(void)
{
M68K_ARG(id _Nonnull, object, a0)
objc_removeAssociatedObjects(object);
}
|
Changes to src/runtime/amiga-library.m.
| ︙ | ︙ | |||
27 28 29 30 31 32 33 | #define Class IntuitionClass #include <exec/libraries.h> #include <exec/nodes.h> #include <exec/resident.h> #include <proto/exec.h> #undef Class | > > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | 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 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 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 142 143 144 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 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
#define Class IntuitionClass
#include <exec/libraries.h>
#include <exec/nodes.h>
#include <exec/resident.h>
#include <proto/exec.h>
#undef Class
#if defined(OF_MORPHOS)
# define OBJC_M68K_REG(reg)
# define DATA_OFFSET 0x8000
#elif defined(OF_AMIGAOS_M68K)
# define OBJC_M68K_REG(reg) __asm__(#reg)
# define DATA_OFFSET 0x7FFE
#endif
/* This always needs to be the first thing in the file. */
int
_start(void)
{
return -1;
}
#ifdef OF_AMIGAOS_M68K
void
__init_eh(void)
{
/* Taken care of by objc_init() */
}
#endif
struct ObjFWRTBase {
struct Library library;
void *segList;
struct ObjFWRTBase *parent;
char *dataSeg;
bool initialized;
};
#ifdef OF_MORPHOS
const ULONG __abox__ = 1;
#endif
#ifdef OF_AMIGAOS_M68K
extern uintptr_t __CTOR_LIST__[];
extern const void *_EH_FRAME_BEGINS__;
extern void *_EH_FRAME_OBJECTS__;
#endif
struct ExecBase *SysBase;
static struct objc_linklib_context linklibCtx;
#ifdef OF_MORPHOS
/* All __saveds functions in this file need to use the M68K ABI */
__asm__ (
".section .text\n"
".align 2\n"
"__restore_r13:\n"
" lwz %r13, 56(%r2)\n"
" lwz %r13, 44(%r13)\n"
" blr\n"
);
#endif
#ifdef OF_AMIGAOS_M68K
__asm__ (
".text\n"
".globl ___restore_a4\n"
".align 1\n"
"___restore_a4:\n"
" movea.l 42(a6), a4\n"
" rts"
);
#endif
static OF_INLINE char *
getDataSeg(void)
{
char *dataSeg;
#if defined(OF_MORPHOS)
__asm__ (
"lis %0, __r13_init@ha\n\t"
"la %0, __r13_init@l(%0)"
: "=r"(dataSeg)
);
#elif defined(OF_AMIGAOS_M68K)
__asm__ (
"move.l #___a4_init, %0"
: "=r"(dataSeg)
);
#endif
return dataSeg;
}
static OF_INLINE size_t
getDataSize(void)
{
size_t dataSize;
#if defined(OF_MORPHOS)
__asm__ (
"lis %0, __sdata_size@ha\n\t"
"la %0, __sdata_size@l(%0)\n\t"
"lis %%r9, __sbss_size@ha\n\t"
"la %%r9, __sbss_size@l(%%r9)\n\t"
"add %0, %0, %%r9"
: "=r"(dataSize)
:: "r9"
);
#elif defined(OF_AMIGAOS_M68K)
__asm__ (
"move.l #___data_size, %0\n\t"
"add.l #___bss_size, %0"
: "=r"(dataSize)
);
#endif
return dataSize;
}
static OF_INLINE size_t *
getDataDataRelocs(void)
{
size_t *dataDataRelocs;
#ifdef OF_MORPHOS
__asm__ (
"lis %0, __datadata_relocs@ha\n\t"
"la %0, __datadata_relocs@l(%0)\n\t"
: "=r"(dataDataRelocs)
);
#elif defined(OF_AMIGAOS_M68K)
__asm__ (
"move.l #___datadata_relocs, %0"
: "=r"(dataDataRelocs)
);
#endif
return dataDataRelocs;
}
static struct Library *
libInit(struct ObjFWRTBase *base, void *segList, struct ExecBase *sysBase)
{
#if defined(OF_MORPHOS)
__asm__ __volatile__ (
"lis %%r9, SysBase@ha\n\t"
"stw %0, SysBase@l(%%r9)"
:: "r"(sysBase) : "r9"
);
#elif defined(OF_AMIGAOS_M68K)
__asm__ __volatile__ (
"move.l a6, _SysBase"
:: "a"(sysBase)
);
#endif
base->segList = segList;
base->parent = NULL;
base->dataSeg = getDataSeg();
return &base->library;
}
struct Library *__saveds
libOpen(void)
{
OBJC_M68K_ARG(struct ObjFWRTBase *, base, a6)
struct ObjFWRTBase *child;
size_t dataSize, *dataDataRelocs;
ptrdiff_t displacement;
if (base->parent != NULL)
return NULL;
base->library.lib_OpenCnt++;
|
| ︙ | ︙ | |||
198 199 200 201 202 203 204 |
return segList;
#undef SysBase
}
static void *__saveds
libExpunge(void)
{
| | > > < | 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
return segList;
#undef SysBase
}
static void *__saveds
libExpunge(void)
{
OBJC_M68K_ARG(struct ObjFWRTBase *, base, a6)
return expunge(base, SysBase);
}
static void *__saveds
libClose(void)
{
OBJC_M68K_ARG(struct ObjFWRTBase *, base, a6)
/*
* SysBase becomes invalid during this function, so we store it in
* sysBase and add a define to make the inlines use the right one.
*/
struct ExecBase *sysBase = SysBase;
#define SysBase sysBase
if (base->parent != NULL) {
struct ObjFWRTBase *parent;
parent = base->parent;
FreeMem(base->dataSeg - DATA_OFFSET, getDataSize());
|
| ︙ | ︙ | |||
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 |
{
return NULL;
}
bool
objc_init(struct objc_linklib_context *ctx)
{
register struct ObjFWRTBase *r12 __asm__("r12");
struct ObjFWRTBase *base = r12;
void *frame;
uintptr_t *iter, *iter0;
if (ctx->version > 1)
return false;
if (base->initialized)
return true;
CopyMem(ctx, &linklibCtx, sizeof(linklibCtx));
__asm__ (
"lis %0, __EH_FRAME_BEGIN__@ha\n\t"
"la %0, __EH_FRAME_BEGIN__@l(%0)\n\t"
"lis %1, __CTOR_LIST__@ha\n\t"
"la %1, __CTOR_LIST__@l(%1)\n\t"
: "=r"(frame), "=r"(iter0)
);
linklibCtx.__register_frame(frame);
for (iter = iter0; *iter != 0; iter++);
while (iter > iter0) {
void (*ctor)(void) = (void (*)(void))*--iter;
ctor();
}
| > > > > > > > > > > > > | 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 |
{
return NULL;
}
bool
objc_init(struct objc_linklib_context *ctx)
{
#if defined(OF_MORPHOS)
register struct ObjFWRTBase *r12 __asm__("r12");
struct ObjFWRTBase *base = r12;
#elif defined(OF_AMIGAOS_M68K)
OBJC_M68K_ARG(struct ObjFWRTBase *, base, a6)
#endif
void *frame;
uintptr_t *iter, *iter0;
if (ctx->version > 1)
return false;
if (base->initialized)
return true;
CopyMem(ctx, &linklibCtx, sizeof(linklibCtx));
#if defined(OF_MORPHOS)
__asm__ (
"lis %0, __EH_FRAME_BEGIN__@ha\n\t"
"la %0, __EH_FRAME_BEGIN__@l(%0)\n\t"
"lis %1, __CTOR_LIST__@ha\n\t"
"la %1, __CTOR_LIST__@l(%1)\n\t"
: "=r"(frame), "=r"(iter0)
);
linklibCtx.__register_frame(frame);
#elif defined(OF_AMIGAOS_M68K)
for (void *const *frame = _EH_FRAME_BEGINS__,
**object = _EH_FRAME_OBJECTS__; *frame != NULL;)
linklibCtx.__register_frame_info(*frame++, *object++);
iter0 = &__CTOR_LIST__[1];
#endif
for (iter = iter0; *iter != 0; iter++);
while (iter > iter0) {
void (*ctor)(void) = (void (*)(void))*--iter;
ctor();
}
|
| ︙ | ︙ | |||
302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 |
void
free(void *ptr)
{
linklibCtx.free(ptr);
}
int
_Unwind_RaiseException(void *ex)
{
return linklibCtx._Unwind_RaiseException(ex);
}
void
_Unwind_DeleteException(void *ex)
{
linklibCtx._Unwind_DeleteException(ex);
}
| > > > > > > > > | 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 |
void
free(void *ptr)
{
linklibCtx.free(ptr);
}
#ifdef OF_MORPHOS
int
_Unwind_RaiseException(void *ex)
{
return linklibCtx._Unwind_RaiseException(ex);
}
#else
int
_Unwind_SjLj_RaiseException(void *ex)
{
return linklibCtx._Unwind_SjLj_RaiseException(ex);
}
#endif
void
_Unwind_DeleteException(void *ex)
{
linklibCtx._Unwind_DeleteException(ex);
}
|
| ︙ | ︙ | |||
362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 |
void
_Unwind_SetGR(void *ctx, int gr, uintptr_t value)
{
linklibCtx._Unwind_SetGR(ctx, gr, value);
}
void
_Unwind_Resume(void *ex)
{
linklibCtx._Unwind_Resume(ex);
}
void __register_frame(void *frame)
{
linklibCtx.__register_frame(frame);
}
void __deregister_frame(void *frame)
{
linklibCtx.__deregister_frame(frame);
}
int
atexit(void (*function)(void))
{
return linklibCtx.atexit(function);
}
void
exit(int status)
{
linklibCtx.exit(status);
OF_UNREACHABLE
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
static CONST_APTR functionTable[] = {
(CONST_APTR)FUNCARRAY_BEGIN,
(CONST_APTR)FUNCARRAY_32BIT_NATIVE,
(CONST_APTR)libOpen,
(CONST_APTR)libClose,
(CONST_APTR)libExpunge,
(CONST_APTR)libNull,
(CONST_APTR)-1,
(CONST_APTR)FUNCARRAY_32BIT_SYSTEMV,
#include "amiga-library-funcarray.inc"
(CONST_APTR)-1,
(CONST_APTR)FUNCARRAY_END
};
#pragma GCC diagnostic pop
static struct {
ULONG dataSize;
CONST_APTR *functionTable;
ULONG *dataTable;
| > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | > > | | > > > > > > > > > > > > > > > > > > > > > > > > | 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 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 |
void
_Unwind_SetGR(void *ctx, int gr, uintptr_t value)
{
linklibCtx._Unwind_SetGR(ctx, gr, value);
}
#ifdef OF_MORPHOS
void
_Unwind_Resume(void *ex)
{
linklibCtx._Unwind_Resume(ex);
}
void __register_frame(void *frame)
{
linklibCtx.__register_frame(frame);
}
void __deregister_frame(void *frame)
{
linklibCtx.__deregister_frame(frame);
}
#else
void
_Unwind_SjLj_Resume(void *ex)
{
linklibCtx._Unwind_SjLj_Resume(ex);
}
void
__register_frame_info(const void *begin, void *object)
{
linklibCtx.__register_frame_info(begin, object);
}
void
*__deregister_frame_info(const void *begin)
{
return linklibCtx.__deregister_frame_info(begin);
}
#endif
int
atexit(void (*function)(void))
{
return linklibCtx.atexit(function);
}
void
exit(int status)
{
linklibCtx.exit(status);
OF_UNREACHABLE
}
#ifdef OF_AMIGAOS_M68K
int
snprintf(char *restrict str, size_t size, const char *restrict fmt, ...)
{
va_list args;
int ret;
va_start(args, fmt);
ret = vsnprintf(str, size, fmt, args);
va_end(args);
return ret;
}
int
vsnprintf(char *restrict str, size_t size, const char *restrict fmt,
va_list args)
{
return linklibCtx.vsnprintf(str, size, fmt, args);
}
int
__gnu_objc_personality_sj0_wrapper(int version, int actions, uint64_t *exClass,
void *ex, void *ctx)
{
return __gnu_objc_personality_sj0(version, actions, *exClass, ex, ctx);
}
#endif
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
static CONST_APTR functionTable[] = {
#ifdef OF_MORPHOS
(CONST_APTR)FUNCARRAY_BEGIN,
(CONST_APTR)FUNCARRAY_32BIT_NATIVE,
#endif
(CONST_APTR)libOpen,
(CONST_APTR)libClose,
(CONST_APTR)libExpunge,
(CONST_APTR)libNull,
#ifdef OF_MORPHOS
(CONST_APTR)-1,
(CONST_APTR)FUNCARRAY_32BIT_SYSTEMV,
#endif
#include "amiga-library-funcarray.inc"
(CONST_APTR)-1,
#ifdef OF_MORPHOS
(CONST_APTR)FUNCARRAY_END
#endif
};
#pragma GCC diagnostic pop
static struct {
ULONG dataSize;
CONST_APTR *functionTable;
ULONG *dataTable;
struct Library *(*initFunc)(
struct ObjFWRTBase *base OBJC_M68K_REG(d0),
void *segList OBJC_M68K_REG(a0),
struct ExecBase *execBase OBJC_M68K_REG(a6));
} initTable = {
sizeof(struct ObjFWRTBase),
functionTable,
NULL,
libInit
};
struct Resident resident = {
.rt_MatchWord = RTC_MATCHWORD,
.rt_MatchTag = &resident,
.rt_EndSkip = &resident + 1,
.rt_Flags = RTF_AUTOINIT
#ifdef OF_MORPHOS
| RTF_PPC | RTF_EXTENDED
#endif
,
.rt_Version = OBJFWRT_LIB_MINOR,
.rt_Type = NT_LIBRARY,
.rt_Pri = 0,
.rt_Name = (char *)OBJFWRT_AMIGA_LIB,
.rt_IdString = (char *)OBJFWRT_AMIGA_LIB " "
OF_PREPROCESSOR_STRINGIFY(OBJFWRT_LIB_MINOR) "."
OF_PREPROCESSOR_STRINGIFY(OBJFWRT_LIB_PATCH)
" \xA9 2008-2025 Jonathan Schleifer",
.rt_Init = &initTable,
#ifdef OF_MORPHOS
.rt_Revision = OBJFWRT_LIB_PATCH,
.rt_Tags = NULL,
#endif
};
#if defined(OF_MORPHOS)
__asm__ (
".section .eh_frame, \"aw\"\n"
".globl __EH_FRAME_BEGIN__\n"
".type __EH_FRAME_BEGIN__, @object\n"
"__EH_FRAME_BEGIN__:\n"
".section .ctors, \"aw\"\n"
".globl __CTOR_LIST__\n"
".type __CTOR_LIST__, @object\n"
"__CTOR_LIST__:\n"
".section .text"
);
#elif defined(OF_AMIGAOS_M68K)
__asm__ (
".section .list___EH_FRAME_BEGINS__, \"aw\"\n"
".globl __EH_FRAME_BEGIN__\n"
".type __EH_FRAME_BEGIN__, @object\n"
"__EH_FRAME_BEGINS__:\n"
".section .dlist___EH_FRAME_OBJECTS__, \"aw\"\n"
".globl __EH_FRAME_OBJECTS__\n"
".type __EH_FRAME_OBJECTS__, @object\n"
"__EH_FRAME_OBJECTS__:\n"
".section .list___CTOR_LIST__, \"aw\"\n"
".globl ___CTOR_LIST__\n"
".type ___CTOR_LIST__, @object\n"
"___CTOR_LIST__:\n"
".section .text"
);
#endif
|
Changes to src/runtime/amiga-library.xml.
1 2 3 4 5 | <amiga-library version='1.0' base='ObjFWRTBase'> <include>ObjFWRT.h</include> <include>private.h</include> <!-- The following function is only for the linklib. --> <function name='objc_init' return-type='bool'> | | | | > | > > > > > > > > | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > | | | > | | | | | | | | | | < | | | | | | | | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 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 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 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 142 143 144 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 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 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 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 |
<amiga-library version='1.0' base='ObjFWRTBase'>
<include>ObjFWRT.h</include>
<include>private.h</include>
<!-- The following function is only for the linklib. -->
<function name='objc_init' return-type='bool'>
<argument name='ctx' type='struct objc_linklib_context *' m68k-reg='a0'/>
</function>
<!-- Used by the compiler, but can be called manually. -->
<function name='__objc_exec_class'>
<argument name='module' type='struct objc_module *_Nonnull' m68k-reg='a0'/>
</function>
<function name='__gnu_objc_personality_v0' return-type='int'
condition='!defined(OF_AMIGAOS_M68K)'>
<argument name='version' type='int'/>
<argument name='actions' type='int'/>
<argument name='exClass' type='uint64_t'/>
<argument name='ex' type='void *_Nonnull'/>
<argument name='ctx' type='void *_Nonnull'/>
</function>
<function name='__gnu_objc_personality_sj0_wrapper' return-type='int'
condition='defined(OF_AMIGAOS_M68K)'>
<argument name='version' type='int' m68k-reg='d0'/>
<argument name='actions' type='int' m68k-reg='d1'/>
<argument name='exClass' type='uint64_t *_Nonnull' m68k-reg='a0'/>
<argument name='ex' type='void *_Nonnull' m68k-reg='a1'/>
<argument name='ctx' type='void *_Nonnull' m68k-reg='a2'/>
</function>
<function name='class_registerAlias_np'>
<argument name='class_' type='Class _Nonnull' m68k-reg='a0'/>
<argument name='name' type='const char *_Nonnull' m68k-reg='a1'/>
</function>
<function name='objc_msg_lookup' return-type='IMP _Nonnull'>
<argument name='object' type='id _Nullable' m68k-reg='a0'/>
<argument name='selector' type='SEL _Nonnull' m68k-reg='a1'/>
</function>
<function name='objc_msg_lookup_stret' return-type='IMP _Nonnull'>
<argument name='object' type='id _Nullable' m68k-reg='a0'/>
<argument name='selector' type='SEL _Nonnull' m68k-reg='a1'/>
</function>
<function name='objc_msg_lookup_super' return-type='IMP _Nonnull'>
<argument name='super' type='struct objc_super *_Nonnull' m68k-reg='a0'/>
<argument name='selector' type='SEL _Nonnull' m68k-reg='a1'/>
</function>
<function name='objc_msg_lookup_super_stret' return-type='IMP _Nonnull'>
<argument name='super' type='struct objc_super *_Nonnull' m68k-reg='a0'/>
<argument name='selector' type='SEL _Nonnull' m68k-reg='a1'/>
</function>
<function name='objc_lookUpClass' return-type='Class _Nullable'>
<argument name='name' type='const char *_Nonnull' m68k-reg='a0'/>
</function>
<function name='objc_getClass' return-type='Class _Nullable'>
<argument name='name' type='const char *_Nonnull' m68k-reg='a0'/>
</function>
<function name='objc_getRequiredClass' return-type='Class _Nonnull'>
<argument name='name' type='const char *_Nonnull' m68k-reg='a0'/>
</function>
<function name='objc_lookup_class' return-type='Class _Nullable'>
<argument name='name' type='const char *_Nonnull' m68k-reg='a0'/>
</function>
<function name='objc_get_class' return-type='Class _Nonnull'>
<argument name='name' type='const char *_Nonnull' m68k-reg='a0'/>
</function>
<function name='objc_exception_throw' noreturn='1'>
<argument name='object' type='id _Nonnull' m68k-reg='a0'/>
</function>
<function name='objc_sync_enter' return-type='int'>
<argument name='object' type='id _Nullable' m68k-reg='a0'/>
</function>
<function name='objc_sync_exit' return-type='int'>
<argument name='object' type='id _Nullable' m68k-reg='a0'/>
</function>
<function name='objc_getProperty' return-type='id _Nullable'>
<argument name='self' type='id _Nonnull' m68k-reg='a0'/>
<argument name='_cmd' type='SEL _Nonnull' m68k-reg='a1'/>
<argument name='offset' type='ptrdiff_t' m68k-reg='d0'/>
<argument name='atomic' type='bool' m68k-reg='d1'/>
</function>
<function name='objc_setProperty'>
<argument name='self' type='id _Nonnull' m68k-reg='a0'/>
<argument name='_cmd' type='SEL _Nonnull' m68k-reg='a1'/>
<argument name='offset' type='ptrdiff_t' m68k-reg='d0'/>
<argument name='value' type='id _Nullable' m68k-reg='a2'/>
<argument name='atomic' type='bool' m68k-reg='d1'/>
<argument name='copy' type='signed char' m68k-reg='d2'/>
</function>
<function name='objc_getPropertyStruct'>
<argument name='dest' type='void *_Nonnull' m68k-reg='a0'/>
<argument name='src' type='const void *_Nonnull' m68k-reg='a1'/>
<argument name='size' type='ptrdiff_t' m68k-reg='d0'/>
<argument name='atomic' type='bool' m68k-reg='d1'/>
<argument name='strong' type='bool' m68k-reg='d2'/>
</function>
<function name='objc_setPropertyStruct'>
<argument name='dest' type='void *_Nonnull' m68k-reg='a0'/>
<argument name='src' type='const void *_Nonnull' m68k-reg='a1'/>
<argument name='size' type='ptrdiff_t' m68k-reg='d0'/>
<argument name='atomic' type='bool' m68k-reg='d1'/>
<argument name='strong' type='bool' m68k-reg='d2'/>
</function>
<function name='objc_enumerationMutation'>
<argument name='object' type='id _Nonnull' m68k-reg='a0'/>
</function>
<function name='objc_retain' return-type='id _Nullable'>
<argument name='object' type='id _Nullable' m68k-reg='a0'/>
</function>
<function name='objc_retainBlock' return-type='id _Nullable'>
<argument name='block' type='id _Nullable' m68k-reg='a0'/>
</function>
<function name='objc_retainAutorelease' return-type='id _Nullable'>
<argument name='object' type='id _Nullable' m68k-reg='a0'/>
</function>
<function name='objc_release'>
<argument name='object' type='id _Nullable' m68k-reg='a0'/>
</function>
<function name='objc_autorelease' return-type='id _Nullable'>
<argument name='object' type='id _Nullable' m68k-reg='a0'/>
</function>
<function name='objc_autoreleaseReturnValue' return-type='id _Nullable'>
<argument name='object' type='id _Nullable' m68k-reg='a0'/>
</function>
<function name='objc_retainAutoreleaseReturnValue' return-type='id _Nullable'>
<argument name='object' type='id _Nullable' m68k-reg='a0'/>
</function>
<function name='objc_retainAutoreleasedReturnValue'
return-type='id _Nullable'>
<argument name='object' type='id _Nullable' m68k-reg='a0'/>
</function>
<function name='objc_storeStrong' return-type='id _Nullable'>
<argument name='object' type='id _Nullable *_Nonnull' m68k-reg='a0'/>
<argument name='value' type='id _Nullable' m68k-reg='a1'/>
</function>
<function name='objc_storeWeak' return-type='id _Nullable'>
<argument name='object' type='id _Nullable *_Nonnull' m68k-reg='a0'/>
<argument name='value' type='id _Nullable' m68k-reg='a1'/>
</function>
<function name='objc_loadWeakRetained' return-type='id _Nullable'>
<argument name='object' type='id _Nullable *_Nonnull' m68k-reg='a0'/>
</function>
<function name='objc_initWeak' return-type='id _Nullable'>
<argument name='object' type='id _Nullable *_Nonnull' m68k-reg='a0'/>
<argument name='value' type='id _Nullable' m68k-reg='a1'/>
</function>
<function name='objc_destroyWeak'>
<argument name='object' type='id _Nullable *_Nonnull' m68k-reg='a0'/>
</function>
<function name='objc_loadWeak' return-type='id _Nullable'>
<argument name='object' type='id _Nullable *_Nonnull' m68k-reg='a0'/>
</function>
<function name='objc_copyWeak'>
<argument name='dest' type='id _Nullable *_Nonnull' m68k-reg='a0'/>
<argument name='src' type='id _Nullable *_Nonnull' m68k-reg='a1'/>
</function>
<function name='objc_moveWeak'>
<argument name='dest' type='id _Nullable *_Nonnull' m68k-reg='a0'/>
<argument name='src' type='id _Nullable *_Nonnull' m68k-reg='a1'/>
</function>
<!-- Public API -->
<function name='sel_registerName' return-type='SEL _Nonnull'>
<argument name='name' type='const char *_Nonnull' m68k-reg='a0'/>
</function>
<function name='sel_getName' return-type='const char *_Nonnull'>
<argument name='selector' type='SEL _Nonnull' m68k-reg='a0'/>
</function>
<function name='sel_isEqual' return-type='bool'>
<argument name='selector1' type='SEL _Nonnull' m68k-reg='a0'/>
<argument name='selector2' type='SEL _Nonnull' m68k-reg='a1'/>
</function>
<function name='objc_allocateClassPair' return-type='Class _Nonnull'>
<argument name='superclass' type='Class _Nullable' m68k-reg='a0'/>
<argument name='name' type='const char *_Nonnull' m68k-reg='a1'/>
<argument name='extraBytes' type='size_t' m68k-reg='d0'/>
</function>
<function name='objc_registerClassPair'>
<argument name='class_' type='Class _Nonnull' m68k-reg='a0'/>
</function>
<function name='objc_getClassList' return-type='unsigned int'>
<argument name='buffer' type='Class _Nonnull *_Nullable' m68k-reg='a0'/>
<argument name='count' type='unsigned int' m68k-reg='d0'/>
</function>
<function name='objc_copyClassList' return-type='Class _Nonnull *_Nonnull'>
<argument name='length' type='unsigned int *_Nullable' m68k-reg='a0'/>
</function>
<function name='class_isMetaClass' return-type='bool'>
<argument name='class_' type='Class _Nullable' m68k-reg='a0'/>
</function>
<function name='class_getName' return-type='const char *_Nullable'>
<argument name='class_' type='Class _Nullable' m68k-reg='a0'/>
</function>
<function name='class_getSuperclass' return-type='Class _Nullable'>
<argument name='class_' type='Class _Nullable' m68k-reg='a0'/>
</function>
<function name='class_getInstanceSize' return-type='unsigned long'>
<argument name='class_' type='Class _Nullable' m68k-reg='a0'/>
</function>
<function name='class_respondsToSelector' return-type='bool'>
<argument name='class_' type='Class _Nullable' m68k-reg='a0'/>
<argument name='selector' type='SEL _Nonnull' m68k-reg='a1'/>
</function>
<function name='class_conformsToProtocol' return-type='bool'>
<argument name='class_' type='Class _Nullable' m68k-reg='a0'/>
<argument name='p' type='Protocol *_Nonnull' m68k-reg='a1'/>
</function>
<function name='class_getMethodImplementation' return-type='IMP _Nullable'>
<argument name='class_' type='Class _Nullable' m68k-reg='a0'/>
<argument name='selector' type='SEL _Nonnull' m68k-reg='a1'/>
</function>
<function name='class_getMethodImplementation_stret'
return-type='IMP _Nullable'>
<argument name='class_' type='Class _Nullable' m68k-reg='a0'/>
<argument name='selector' type='SEL _Nonnull' m68k-reg='a1'/>
</function>
<function name='class_getInstanceMethod' return-type='Method _Nullable'>
<argument name='class_' type='Class _Nullable' m68k-reg='a0'/>
<argument name='selector' type='SEL _Nonnull' m68k-reg='a1'/>
</function>
<function name='class_addMethod' return-type='bool'>
<argument name='class_' type='Class _Nonnull' m68k-reg='a0'/>
<argument name='selector' type='SEL _Nonnull' m68k-reg='a1'/>
<argument name='implementation' type='IMP _Nonnull' m68k-reg='a2'/>
<argument name='typeEncoding' type='const char *_Nullable' m68k-reg='a3'/>
</function>
<function name='class_replaceMethod' return-type='IMP _Nullable'>
<argument name='class_' type='Class _Nonnull' m68k-reg='a0'/>
<argument name='selector' type='SEL _Nonnull' m68k-reg='a1'/>
<argument name='implementation' type='IMP _Nonnull' m68k-reg='a2'/>
<argument name='typeEncoding' type='const char *_Nullable' m68k-reg='a3'/>
</function>
<function name='object_getClass' return-type='Class _Nullable'>
<argument name='object' type='id _Nullable' m68k-reg='a0'/>
</function>
<function name='object_setClass' return-type='Class _Nullable'>
<argument name='object' type='id _Nullable' m68k-reg='a0'/>
<argument name='class_' type='Class _Nonnull' m68k-reg='a1'/>
</function>
<function name='object_getClassName' return-type='const char *_Nullable'>
<argument name='object' type='id _Nullable' m68k-reg='a0'/>
</function>
<function name='protocol_getName' return-type='const char *_Nonnull'>
<argument name='protocol' type='Protocol *_Nonnull' m68k-reg='a0'/>
</function>
<function name='protocol_isEqual' return-type='bool'>
<argument name='protocol1' type='Protocol *_Nonnull' m68k-reg='a0'/>
<argument name='protocol2' type='Protocol *_Nonnull' m68k-reg='a1'/>
</function>
<function name='protocol_conformsToProtocol' return-type='bool'>
<argument name='protocol1' type='Protocol *_Nonnull' m68k-reg='a0'/>
<argument name='protocol2' type='Protocol *_Nonnull' m68k-reg='a1'/>
</function>
<function name='class_copyMethodList'
return-type='Method _Nullable *_Nullable'>
<argument name='class_' type='Class _Nullable' m68k-reg='a0'/>
<argument name='outCount' type='unsigned int *_Nullable' m68k-reg='a1'/>
</function>
<function name='method_getName' return-type='SEL _Nonnull'>
<argument name='method' type='Method _Nonnull' m68k-reg='a0'/>
</function>
<function name='method_getTypeEncoding' return-type='const char *_Nullable'>
<argument name='method' type='Method _Nonnull' m68k-reg='a0'/>
</function>
<function name='class_copyIvarList' return-type='Ivar _Nullable *_Nullable'>
<argument name='class_' type='Class _Nullable' m68k-reg='a0'/>
<argument name='outCount' type='unsigned int *_Nullable' m68k-reg='a1'/>
</function>
<function name='ivar_getName' return-type='const char *_Nonnull'>
<argument name='ivar' type='Ivar _Nonnull' m68k-reg='a0'/>
</function>
<function name='ivar_getTypeEncoding' return-type='const char *_Nonnull'>
<argument name='ivar' type='Ivar _Nonnull' m68k-reg='a0'/>
</function>
<function name='ivar_getOffset' return-type='ptrdiff_t'>
<argument name='ivar' type='Ivar _Nonnull' m68k-reg='a0'/>
</function>
<function name='class_copyPropertyList'
return-type='objc_property_t _Nullable *_Nullable'>
<argument name='class_' type='Class _Nullable' m68k-reg='a0'/>
<argument name='outCount' type='unsigned int *_Nullable' m68k-reg='a1'/>
</function>
<function name='property_getName' return-type='const char *_Nonnull'>
<argument name='property' type='objc_property_t _Nonnull' m68k-reg='a0'/>
</function>
<function name='property_copyAttributeValue' return-type='char *_Nullable'>
<argument name='property' type='objc_property_t _Nonnull' m68k-reg='a0'/>
<argument name='name' type='const char *_Nonnull' m68k-reg='a1'/>
</function>
<function name='objc_deinit'/>
<function name='objc_setUncaughtExceptionHandler'
return-type='_Nullable objc_uncaught_exception_handler'>
<argument name='handler' type='objc_uncaught_exception_handler _Nullable'
m68k-reg='a0'/>
</function>
<function name='objc_setForwardHandler'>
<argument name='forward' type='IMP _Nullable' m68k-reg='a0'/>
<argument name='stretForward' type='IMP _Nullable' m68k-reg='a1'/>
</function>
<function name='objc_setEnumerationMutationHandler'>
<argument name='hadler' type='objc_enumeration_mutation_handler _Nullable'
m68k-reg='a0'/>
</function>
<function name='objc_constructInstance' return-type='id _Nullable'>
<argument name='class_' type='Class _Nullable' m68k-reg='a0'/>
<argument name='bytes' type='void *_Nullable' m68k-reg='a1'/>
</function>
<function name='objc_destructInstance' return-type='void *_Nullable'>
<argument name='object' type='id _Nullable' m68k-reg='a0'/>
</function>
<function name='class_createInstance' return-type='id _Nullable'>
<argument name='class_' type='Class _Nullable' m68k-reg='a0'/>
<argument name='extraBytes' type='size_t' m68k-reg='d0'/>
</function>
<function name='object_dispose' return-type='id _Nullable'>
<argument name='object' type='id _Nullable' m68k-reg='a0'/>
</function>
<function name='_objc_rootRetain' return-type='id _Nonnull'>
<argument name='object' type='id _Nonnull' m68k-reg='a0'/>>
</function>
<function name='_objc_rootRetainCount' return-type='unsigned int'>
<argument name='object' type='id _Nonnull' m68k-reg='a0'/>
</function>
<function name='_objc_rootRelease'>
<argument name='object' type='id _Nonnull' m68k-reg='a0'/>
</function>
<function name='objc_autoreleasePoolPush'
return-type='void *_Null_unspecified'/>
<function name='objc_autoreleasePoolPop'>
<argument name='pool' type='void *_Null_unspecified' m68k-reg='a0'/>
</function>
<function name='_objc_rootAutorelease' return-type='id _Nullable'>
<argument name='object' type='id _Nullable' m68k-reg='a0'/>
</function>
<function name='objc_setTaggedPointerSecret'>
<argument name='secret' type='uintptr_t' m68k-reg='d0'/>
</function>
<function name='objc_registerTaggedPointerClass' return-type='int'>
<argument name='class_' type='Class _Nonnull' m68k-reg='a0'/>
</function>
<function name='object_isTaggedPointer' return-type='bool'>
<argument name='object' type='id _Nullable' m68k-reg='a0'/>
</function>
<function name='object_getTaggedPointerValue' return-type='uintptr_t'>
<argument name='object' type='id _Nonnull' m68k-reg='a0'/>
</function>
<function name='objc_createTaggedPointer' return-type='id _Nullable'>
<argument name='class_' type='int' m68k-reg='a0'/>
<argument name='value' type='uintptr_t' m68k-reg='d0'/>
</function>
<function name='objc_setAssociatedObject'>
<argument name='object' type='id _Nonnull' m68k-reg='a0'/>
<argument name='key' type='const void *_Nonnull' m68k-reg='a1'/>
<argument name='value' type='id _Nullable' m68k-reg='a2'/>
<argument name='policy' type='objc_associationPolicy' m68k-reg='d0'/>
</function>
<function name='objc_getAssociatedObject' return-type='id _Nullable'>
<argument name='object' type='id _Nonnull' m68k-reg='a0'/>
<argument name='key' type='const void *_Nonnull' m68k-reg='a1'/>
</function>
<function name='objc_removeAssociatedObjects'>
<argument name='object' type='id _Nonnull' m68k-reg='a0'/>
</function>
</amiga-library>
|
Changes to src/runtime/linklib/Makefile.
1 2 3 4 5 6 7 8 9 10 |
include ../../../extra.mk
STATIC_LIB = libobjfwrt.library.a
SRCS = init.m \
linklib.m
include ../../../buildsys.mk
CPPFLAGS += -I.. -I../.. -I../../.. \
-DOBJC_COMPILING_AMIGA_LINKLIB \
| > | 1 2 3 4 5 6 7 8 9 10 11 |
include ../../../extra.mk
STATIC_LIB = libobjfwrt.library.a
STATIC_AMIGA_LIB = libobjfwrt.library.amigalib.a
SRCS = init.m \
linklib.m
include ../../../buildsys.mk
CPPFLAGS += -I.. -I../.. -I../../.. \
-DOBJC_COMPILING_AMIGA_LINKLIB \
|
| ︙ | ︙ |
Changes to src/runtime/linklib/init.m.
| ︙ | ︙ | |||
27 28 29 30 31 32 33 | #include <proto/exec.h> #include <proto/intuition.h> #undef Class #include <stdio.h> #include <stdlib.h> | > | > > > > > > > > > > > > > | 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 | #include <proto/exec.h> #include <proto/intuition.h> #undef Class #include <stdio.h> #include <stdlib.h> #if defined(OF_MORPHOS) # include <constructor.h> #elif defined(OF_AMIGAOS_M68K) # include <stabs.h> #endif #ifdef OF_MORPHOS extern int _Unwind_RaiseException(void *); #else extern int _Unwind_SjLj_RaiseException(void *); #endif extern void _Unwind_DeleteException(void *); extern void *_Unwind_GetLanguageSpecificData(void *); extern uintptr_t _Unwind_GetRegionStart(void *); extern uintptr_t _Unwind_GetDataRelBase(void *); extern uintptr_t _Unwind_GetTextRelBase(void *); extern uintptr_t _Unwind_GetIP(void *); extern uintptr_t _Unwind_GetGR(void *, int); extern void _Unwind_SetIP(void *, uintptr_t); extern void _Unwind_SetGR(void *, int, uintptr_t); #ifdef OF_MORPHOS extern void _Unwind_Resume(void *); extern void __register_frame(void *); extern void __deregister_frame(void *); #else extern void _Unwind_SjLj_Resume(void *); extern void __register_frame_info(const void *, void *); extern void *__deregister_frame_info(const void *); #endif void *__objc_class_name_Protocol; #ifndef OBJC_AMIGA_LIB extern bool objc_init(struct objc_linklib_context *ctx); struct Library *ObjFWRTBase; |
| ︙ | ︙ | |||
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 108 109 110 111 |
static bool initialized = false;
struct objc_linklib_context ctx = {
.version = 1,
.malloc = malloc,
.calloc = calloc,
.realloc = realloc,
.free = free,
._Unwind_RaiseException = _Unwind_RaiseException,
._Unwind_DeleteException = _Unwind_DeleteException,
._Unwind_GetLanguageSpecificData =
_Unwind_GetLanguageSpecificData,
._Unwind_GetRegionStart = _Unwind_GetRegionStart,
._Unwind_GetDataRelBase = _Unwind_GetDataRelBase,
._Unwind_GetTextRelBase = _Unwind_GetTextRelBase,
._Unwind_GetIP = _Unwind_GetIP,
._Unwind_GetGR = _Unwind_GetGR,
._Unwind_SetIP = _Unwind_SetIP,
._Unwind_SetGR = _Unwind_SetGR,
._Unwind_Resume = _Unwind_Resume,
.__register_frame = __register_frame,
.__deregister_frame = __deregister_frame,
.atexit = atexit,
.exit = exit,
};
if (initialized)
return;
if ((ObjFWRTBase = OpenLibrary(OBJFWRT_AMIGA_LIB,
OBJFWRT_LIB_MINOR)) == NULL)
| > > > > > > > > > > > > > | 96 97 98 99 100 101 102 103 104 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 |
static bool initialized = false;
struct objc_linklib_context ctx = {
.version = 1,
.malloc = malloc,
.calloc = calloc,
.realloc = realloc,
.free = free,
# ifdef OF_MORPHOS
._Unwind_RaiseException = _Unwind_RaiseException,
# else
._Unwind_SjLj_RaiseException = _Unwind_SjLj_RaiseException,
# endif
._Unwind_DeleteException = _Unwind_DeleteException,
._Unwind_GetLanguageSpecificData =
_Unwind_GetLanguageSpecificData,
._Unwind_GetRegionStart = _Unwind_GetRegionStart,
._Unwind_GetDataRelBase = _Unwind_GetDataRelBase,
._Unwind_GetTextRelBase = _Unwind_GetTextRelBase,
._Unwind_GetIP = _Unwind_GetIP,
._Unwind_GetGR = _Unwind_GetGR,
._Unwind_SetIP = _Unwind_SetIP,
._Unwind_SetGR = _Unwind_SetGR,
# ifdef OF_MORPHOS
._Unwind_Resume = _Unwind_Resume,
.__register_frame = __register_frame,
.__deregister_frame = __deregister_frame,
# else
._Unwind_SjLj_Resume = _Unwind_SjLj_Resume,
.__register_frame_info = __register_frame_info,
.__deregister_frame_info = __deregister_frame_info,
# endif
.atexit = atexit,
.exit = exit,
# ifdef OF_AMIGAOS_M68K
.vsnprintf = vsnprintf,
# endif
};
if (initialized)
return;
if ((ObjFWRTBase = OpenLibrary(OBJFWRT_AMIGA_LIB,
OBJFWRT_LIB_MINOR)) == NULL)
|
| ︙ | ︙ | |||
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
static void __attribute__((__used__))
dtor(void)
{
CloseLibrary(ObjFWRTBase);
}
CONSTRUCTOR_P(ObjFWRT, 4000)
{
ctor();
return 0;
}
DESTRUCTOR_P(ObjFWRT, 0)
{
dtor();
}
#endif
| > > > > > > > > > > > > > > | 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
static void __attribute__((__used__))
dtor(void)
{
CloseLibrary(ObjFWRTBase);
}
# ifdef OF_MORPHOS
CONSTRUCTOR_P(ObjFWRT, 4000)
{
ctor();
return 0;
}
DESTRUCTOR_P(ObjFWRT, 0)
{
dtor();
}
# elif defined(OF_AMIGAOS_M68K)
ADD2INIT(ctor, -5)
ADD2EXIT(dtor, -5)
# endif
#endif
#ifdef OF_AMIGAOS_M68K
int
__gnu_objc_personality_sj0(int version, int actions, uint64_t exClass,
void *ex, void *ctx)
{
return __gnu_objc_personality_sj0(version, action, &exClass, ex, ctx);
}
#endif
|
Changes to src/runtime/linklib/linklib.m.
| ︙ | ︙ | |||
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 |
#if OF_GCC_VERSION >= 1100
# pragma GCC diagnostic ignored "-Warray-parameter"
#endif
bool
objc_init(struct objc_linklib_context *ctx)
{
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((bool (*)(struct objc_linklib_context *))*(void **)(((uintptr_t)ObjFWRTBase) - 28))(ctx);
}
void
__objc_exec_class(struct objc_module *_Nonnull module)
{
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
__extension__ ((void (*)(struct objc_module *_Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 34))(module);
}
int
| > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | > > > > > | > > > > > > | > | < | < | | < | < < < > > > > > > > > > > > > > > > > > > | < | < | | < | < < < > > > > > > > > > > > > > > > > > > | < | < | | < | < < < > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > | > > > > > > | > > > > > > | > | < | < | | < | < < < > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > | > < < < < | < < | | | < > > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > | < | < | | < | < < < > | > > > > > > | > > > > > > > > > > > > > > > > > > > > > > > | < | < | | < | < < < > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > | > > > > > > | > > > > > > | > < < < < | < < | | | < > > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > | < | < | | < | < < < > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > | < | < | | < | < < < > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > | > > > > > > | > > > > > > | > | < | < | | < | < < < > > > > > > > > > > > > > > > > > > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > > > > > > | > | 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 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 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 142 143 144 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 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 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 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 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 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 |
#if OF_GCC_VERSION >= 1100
# pragma GCC diagnostic ignored "-Warray-parameter"
#endif
bool
objc_init(struct objc_linklib_context *ctx)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((bool (*)(struct objc_linklib_context *__asm__("a0")))(((uintptr_t)ObjFWRTBase) - 30))(ctx);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((bool (*)(struct objc_linklib_context *))*(void **)(((uintptr_t)ObjFWRTBase) - 28))(ctx);
#endif
}
void
__objc_exec_class(struct objc_module *_Nonnull module)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
((void (*)(struct objc_module *_Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 36))(module);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
__extension__ ((void (*)(struct objc_module *_Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 34))(module);
#endif
}
int
__gnu_objc_personality_v0(int version, int actions, uint64_t exClass, void *_Nonnull ex, void *_Nonnull ctx)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((int (*)(int __asm__("(nil)"), int __asm__("(nil)"), uint64_t __asm__("(nil)"), void *_Nonnull __asm__("(nil)"), void *_Nonnull __asm__("(nil)")))(((uintptr_t)ObjFWRTBase) - 42))(version, actions, exClass, ex, ctx);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((int (*)(int, int, uint64_t, void *_Nonnull, void *_Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 40))(version, actions, exClass, ex, ctx);
#endif
}
int
__gnu_objc_personality_sj0_wrapper(int version, int actions, uint64_t *_Nonnull exClass, void *_Nonnull ex, void *_Nonnull ctx)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((int (*)(int __asm__("d0"), int __asm__("d1"), uint64_t *_Nonnull __asm__("a0"), void *_Nonnull __asm__("a1"), void *_Nonnull __asm__("a2")))(((uintptr_t)ObjFWRTBase) - 48))(version, actions, exClass, ex, ctx);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((int (*)(int, int, uint64_t *_Nonnull, void *_Nonnull, void *_Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 46))(version, actions, exClass, ex, ctx);
#endif
}
void
class_registerAlias_np(Class _Nonnull class_, const char *_Nonnull name)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
((void (*)(Class _Nonnull __asm__("a0"), const char *_Nonnull __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 54))(class_, name);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
__extension__ ((void (*)(Class _Nonnull, const char *_Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 52))(class_, name);
#endif
}
IMP _Nonnull
objc_msg_lookup(id _Nullable object, SEL _Nonnull selector)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((IMP _Nonnull (*)(id _Nullable __asm__("a0"), SEL _Nonnull __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 60))(object, selector);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((IMP _Nonnull (*)(id _Nullable, SEL _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 58))(object, selector);
#endif
}
IMP _Nonnull
objc_msg_lookup_stret(id _Nullable object, SEL _Nonnull selector)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((IMP _Nonnull (*)(id _Nullable __asm__("a0"), SEL _Nonnull __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 66))(object, selector);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((IMP _Nonnull (*)(id _Nullable, SEL _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 64))(object, selector);
#endif
}
IMP _Nonnull
objc_msg_lookup_super(struct objc_super *_Nonnull super, SEL _Nonnull selector)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((IMP _Nonnull (*)(struct objc_super *_Nonnull __asm__("a0"), SEL _Nonnull __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 72))(super, selector);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((IMP _Nonnull (*)(struct objc_super *_Nonnull, SEL _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 70))(super, selector);
#endif
}
IMP _Nonnull
objc_msg_lookup_super_stret(struct objc_super *_Nonnull super, SEL _Nonnull selector)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((IMP _Nonnull (*)(struct objc_super *_Nonnull __asm__("a0"), SEL _Nonnull __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 78))(super, selector);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((IMP _Nonnull (*)(struct objc_super *_Nonnull, SEL _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 76))(super, selector);
#endif
}
Class _Nullable
objc_lookUpClass(const char *_Nonnull name)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((Class _Nullable (*)(const char *_Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 84))(name);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((Class _Nullable (*)(const char *_Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 82))(name);
#endif
}
Class _Nullable
objc_getClass(const char *_Nonnull name)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((Class _Nullable (*)(const char *_Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 90))(name);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((Class _Nullable (*)(const char *_Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 88))(name);
#endif
}
Class _Nonnull
objc_getRequiredClass(const char *_Nonnull name)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((Class _Nonnull (*)(const char *_Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 96))(name);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((Class _Nonnull (*)(const char *_Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 94))(name);
#endif
}
Class _Nullable
objc_lookup_class(const char *_Nonnull name)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((Class _Nullable (*)(const char *_Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 102))(name);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((Class _Nullable (*)(const char *_Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 100))(name);
#endif
}
Class _Nonnull
objc_get_class(const char *_Nonnull name)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((Class _Nonnull (*)(const char *_Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 108))(name);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((Class _Nonnull (*)(const char *_Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 106))(name);
#endif
}
void
objc_exception_throw(id _Nonnull object)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
((void (*)(id _Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 114))(object);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
__extension__ ((void (*)(id _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 112))(object);
#endif
OF_UNREACHABLE
}
int
objc_sync_enter(id _Nullable object)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((int (*)(id _Nullable __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 120))(object);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((int (*)(id _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 118))(object);
#endif
}
int
objc_sync_exit(id _Nullable object)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((int (*)(id _Nullable __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 126))(object);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((int (*)(id _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 124))(object);
#endif
}
id _Nullable
objc_getProperty(id _Nonnull self, SEL _Nonnull _cmd, ptrdiff_t offset, bool atomic)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((id _Nullable (*)(id _Nonnull __asm__("a0"), SEL _Nonnull __asm__("a1"), ptrdiff_t __asm__("d0"), bool __asm__("d1")))(((uintptr_t)ObjFWRTBase) - 132))(self, _cmd, offset, atomic);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((id _Nullable (*)(id _Nonnull, SEL _Nonnull, ptrdiff_t, bool))*(void **)(((uintptr_t)ObjFWRTBase) - 130))(self, _cmd, offset, atomic);
#endif
}
void
objc_setProperty(id _Nonnull self, SEL _Nonnull _cmd, ptrdiff_t offset, id _Nullable value, bool atomic, signed char copy)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
((void (*)(id _Nonnull __asm__("a0"), SEL _Nonnull __asm__("a1"), ptrdiff_t __asm__("d0"), id _Nullable __asm__("a2"), bool __asm__("d1"), signed char __asm__("d2")))(((uintptr_t)ObjFWRTBase) - 138))(self, _cmd, offset, value, atomic, copy);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
__extension__ ((void (*)(id _Nonnull, SEL _Nonnull, ptrdiff_t, id _Nullable, bool, signed char))*(void **)(((uintptr_t)ObjFWRTBase) - 136))(self, _cmd, offset, value, atomic, copy);
#endif
}
void
objc_getPropertyStruct(void *_Nonnull dest, const void *_Nonnull src, ptrdiff_t size, bool atomic, bool strong)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
((void (*)(void *_Nonnull __asm__("a0"), const void *_Nonnull __asm__("a1"), ptrdiff_t __asm__("d0"), bool __asm__("d1"), bool __asm__("d2")))(((uintptr_t)ObjFWRTBase) - 144))(dest, src, size, atomic, strong);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
__extension__ ((void (*)(void *_Nonnull, const void *_Nonnull, ptrdiff_t, bool, bool))*(void **)(((uintptr_t)ObjFWRTBase) - 142))(dest, src, size, atomic, strong);
#endif
}
void
objc_setPropertyStruct(void *_Nonnull dest, const void *_Nonnull src, ptrdiff_t size, bool atomic, bool strong)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
((void (*)(void *_Nonnull __asm__("a0"), const void *_Nonnull __asm__("a1"), ptrdiff_t __asm__("d0"), bool __asm__("d1"), bool __asm__("d2")))(((uintptr_t)ObjFWRTBase) - 150))(dest, src, size, atomic, strong);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
__extension__ ((void (*)(void *_Nonnull, const void *_Nonnull, ptrdiff_t, bool, bool))*(void **)(((uintptr_t)ObjFWRTBase) - 148))(dest, src, size, atomic, strong);
#endif
}
void
objc_enumerationMutation(id _Nonnull object)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
((void (*)(id _Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 156))(object);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
__extension__ ((void (*)(id _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 154))(object);
#endif
}
id _Nullable
objc_retain(id _Nullable object)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((id _Nullable (*)(id _Nullable __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 162))(object);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((id _Nullable (*)(id _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 160))(object);
#endif
}
id _Nullable
objc_retainBlock(id _Nullable block)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((id _Nullable (*)(id _Nullable __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 168))(block);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((id _Nullable (*)(id _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 166))(block);
#endif
}
id _Nullable
objc_retainAutorelease(id _Nullable object)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((id _Nullable (*)(id _Nullable __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 174))(object);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((id _Nullable (*)(id _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 172))(object);
#endif
}
void
objc_release(id _Nullable object)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
((void (*)(id _Nullable __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 180))(object);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
__extension__ ((void (*)(id _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 178))(object);
#endif
}
id _Nullable
objc_autorelease(id _Nullable object)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((id _Nullable (*)(id _Nullable __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 186))(object);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((id _Nullable (*)(id _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 184))(object);
#endif
}
id _Nullable
objc_autoreleaseReturnValue(id _Nullable object)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((id _Nullable (*)(id _Nullable __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 192))(object);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((id _Nullable (*)(id _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 190))(object);
#endif
}
id _Nullable
objc_retainAutoreleaseReturnValue(id _Nullable object)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((id _Nullable (*)(id _Nullable __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 198))(object);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((id _Nullable (*)(id _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 196))(object);
#endif
}
id _Nullable
objc_retainAutoreleasedReturnValue(id _Nullable object)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((id _Nullable (*)(id _Nullable __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 204))(object);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((id _Nullable (*)(id _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 202))(object);
#endif
}
id _Nullable
objc_storeStrong(id _Nullable *_Nonnull object, id _Nullable value)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((id _Nullable (*)(id _Nullable *_Nonnull __asm__("a0"), id _Nullable __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 210))(object, value);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((id _Nullable (*)(id _Nullable *_Nonnull, id _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 208))(object, value);
#endif
}
id _Nullable
objc_storeWeak(id _Nullable *_Nonnull object, id _Nullable value)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((id _Nullable (*)(id _Nullable *_Nonnull __asm__("a0"), id _Nullable __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 216))(object, value);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((id _Nullable (*)(id _Nullable *_Nonnull, id _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 214))(object, value);
#endif
}
id _Nullable
objc_loadWeakRetained(id _Nullable *_Nonnull object)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((id _Nullable (*)(id _Nullable *_Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 222))(object);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((id _Nullable (*)(id _Nullable *_Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 220))(object);
#endif
}
id _Nullable
objc_initWeak(id _Nullable *_Nonnull object, id _Nullable value)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((id _Nullable (*)(id _Nullable *_Nonnull __asm__("a0"), id _Nullable __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 228))(object, value);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((id _Nullable (*)(id _Nullable *_Nonnull, id _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 226))(object, value);
#endif
}
void
objc_destroyWeak(id _Nullable *_Nonnull object)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
((void (*)(id _Nullable *_Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 234))(object);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
__extension__ ((void (*)(id _Nullable *_Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 232))(object);
#endif
}
id _Nullable
objc_loadWeak(id _Nullable *_Nonnull object)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((id _Nullable (*)(id _Nullable *_Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 240))(object);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((id _Nullable (*)(id _Nullable *_Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 238))(object);
#endif
}
void
objc_copyWeak(id _Nullable *_Nonnull dest, id _Nullable *_Nonnull src)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
((void (*)(id _Nullable *_Nonnull __asm__("a0"), id _Nullable *_Nonnull __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 246))(dest, src);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
__extension__ ((void (*)(id _Nullable *_Nonnull, id _Nullable *_Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 244))(dest, src);
#endif
}
void
objc_moveWeak(id _Nullable *_Nonnull dest, id _Nullable *_Nonnull src)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
((void (*)(id _Nullable *_Nonnull __asm__("a0"), id _Nullable *_Nonnull __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 252))(dest, src);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
__extension__ ((void (*)(id _Nullable *_Nonnull, id _Nullable *_Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 250))(dest, src);
#endif
}
SEL _Nonnull
sel_registerName(const char *_Nonnull name)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((SEL _Nonnull (*)(const char *_Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 258))(name);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((SEL _Nonnull (*)(const char *_Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 256))(name);
#endif
}
const char *_Nonnull
sel_getName(SEL _Nonnull selector)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((const char *_Nonnull (*)(SEL _Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 264))(selector);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((const char *_Nonnull (*)(SEL _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 262))(selector);
#endif
}
bool
sel_isEqual(SEL _Nonnull selector1, SEL _Nonnull selector2)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((bool (*)(SEL _Nonnull __asm__("a0"), SEL _Nonnull __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 270))(selector1, selector2);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((bool (*)(SEL _Nonnull, SEL _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 268))(selector1, selector2);
#endif
}
Class _Nonnull
objc_allocateClassPair(Class _Nullable superclass, const char *_Nonnull name, size_t extraBytes)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((Class _Nonnull (*)(Class _Nullable __asm__("a0"), const char *_Nonnull __asm__("a1"), size_t __asm__("d0")))(((uintptr_t)ObjFWRTBase) - 276))(superclass, name, extraBytes);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((Class _Nonnull (*)(Class _Nullable, const char *_Nonnull, size_t))*(void **)(((uintptr_t)ObjFWRTBase) - 274))(superclass, name, extraBytes);
#endif
}
void
objc_registerClassPair(Class _Nonnull class_)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
((void (*)(Class _Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 282))(class_);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
__extension__ ((void (*)(Class _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 280))(class_);
#endif
}
unsigned int
objc_getClassList(Class _Nonnull *_Nullable buffer, unsigned int count)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((unsigned int (*)(Class _Nonnull *_Nullable __asm__("a0"), unsigned int __asm__("d0")))(((uintptr_t)ObjFWRTBase) - 288))(buffer, count);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((unsigned int (*)(Class _Nonnull *_Nullable, unsigned int))*(void **)(((uintptr_t)ObjFWRTBase) - 286))(buffer, count);
#endif
}
Class _Nonnull *_Nonnull
objc_copyClassList(unsigned int *_Nullable length)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((Class _Nonnull *_Nonnull (*)(unsigned int *_Nullable __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 294))(length);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((Class _Nonnull *_Nonnull (*)(unsigned int *_Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 292))(length);
#endif
}
bool
class_isMetaClass(Class _Nullable class_)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((bool (*)(Class _Nullable __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 300))(class_);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((bool (*)(Class _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 298))(class_);
#endif
}
const char *_Nullable
class_getName(Class _Nullable class_)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((const char *_Nullable (*)(Class _Nullable __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 306))(class_);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((const char *_Nullable (*)(Class _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 304))(class_);
#endif
}
Class _Nullable
class_getSuperclass(Class _Nullable class_)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((Class _Nullable (*)(Class _Nullable __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 312))(class_);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((Class _Nullable (*)(Class _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 310))(class_);
#endif
}
unsigned long
class_getInstanceSize(Class _Nullable class_)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((unsigned long (*)(Class _Nullable __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 318))(class_);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((unsigned long (*)(Class _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 316))(class_);
#endif
}
bool
class_respondsToSelector(Class _Nullable class_, SEL _Nonnull selector)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((bool (*)(Class _Nullable __asm__("a0"), SEL _Nonnull __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 324))(class_, selector);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((bool (*)(Class _Nullable, SEL _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 322))(class_, selector);
#endif
}
bool
class_conformsToProtocol(Class _Nullable class_, Protocol *_Nonnull p)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((bool (*)(Class _Nullable __asm__("a0"), Protocol *_Nonnull __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 330))(class_, p);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((bool (*)(Class _Nullable, Protocol *_Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 328))(class_, p);
#endif
}
IMP _Nullable
class_getMethodImplementation(Class _Nullable class_, SEL _Nonnull selector)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((IMP _Nullable (*)(Class _Nullable __asm__("a0"), SEL _Nonnull __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 336))(class_, selector);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((IMP _Nullable (*)(Class _Nullable, SEL _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 334))(class_, selector);
#endif
}
IMP _Nullable
class_getMethodImplementation_stret(Class _Nullable class_, SEL _Nonnull selector)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((IMP _Nullable (*)(Class _Nullable __asm__("a0"), SEL _Nonnull __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 342))(class_, selector);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((IMP _Nullable (*)(Class _Nullable, SEL _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 340))(class_, selector);
#endif
}
Method _Nullable
class_getInstanceMethod(Class _Nullable class_, SEL _Nonnull selector)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((Method _Nullable (*)(Class _Nullable __asm__("a0"), SEL _Nonnull __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 348))(class_, selector);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((Method _Nullable (*)(Class _Nullable, SEL _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 346))(class_, selector);
#endif
}
bool
class_addMethod(Class _Nonnull class_, SEL _Nonnull selector, IMP _Nonnull implementation, const char *_Nullable typeEncoding)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((bool (*)(Class _Nonnull __asm__("a0"), SEL _Nonnull __asm__("a1"), IMP _Nonnull __asm__("a2"), const char *_Nullable __asm__("a3")))(((uintptr_t)ObjFWRTBase) - 354))(class_, selector, implementation, typeEncoding);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((bool (*)(Class _Nonnull, SEL _Nonnull, IMP _Nonnull, const char *_Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 352))(class_, selector, implementation, typeEncoding);
#endif
}
IMP _Nullable
class_replaceMethod(Class _Nonnull class_, SEL _Nonnull selector, IMP _Nonnull implementation, const char *_Nullable typeEncoding)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((IMP _Nullable (*)(Class _Nonnull __asm__("a0"), SEL _Nonnull __asm__("a1"), IMP _Nonnull __asm__("a2"), const char *_Nullable __asm__("a3")))(((uintptr_t)ObjFWRTBase) - 360))(class_, selector, implementation, typeEncoding);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((IMP _Nullable (*)(Class _Nonnull, SEL _Nonnull, IMP _Nonnull, const char *_Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 358))(class_, selector, implementation, typeEncoding);
#endif
}
Class _Nullable
object_getClass(id _Nullable object)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((Class _Nullable (*)(id _Nullable __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 366))(object);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((Class _Nullable (*)(id _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 364))(object);
#endif
}
Class _Nullable
object_setClass(id _Nullable object, Class _Nonnull class_)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((Class _Nullable (*)(id _Nullable __asm__("a0"), Class _Nonnull __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 372))(object, class_);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((Class _Nullable (*)(id _Nullable, Class _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 370))(object, class_);
#endif
}
const char *_Nullable
object_getClassName(id _Nullable object)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((const char *_Nullable (*)(id _Nullable __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 378))(object);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((const char *_Nullable (*)(id _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 376))(object);
#endif
}
const char *_Nonnull
protocol_getName(Protocol *_Nonnull protocol)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((const char *_Nonnull (*)(Protocol *_Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 384))(protocol);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((const char *_Nonnull (*)(Protocol *_Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 382))(protocol);
#endif
}
bool
protocol_isEqual(Protocol *_Nonnull protocol1, Protocol *_Nonnull protocol2)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((bool (*)(Protocol *_Nonnull __asm__("a0"), Protocol *_Nonnull __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 390))(protocol1, protocol2);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((bool (*)(Protocol *_Nonnull, Protocol *_Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 388))(protocol1, protocol2);
#endif
}
bool
protocol_conformsToProtocol(Protocol *_Nonnull protocol1, Protocol *_Nonnull protocol2)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((bool (*)(Protocol *_Nonnull __asm__("a0"), Protocol *_Nonnull __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 396))(protocol1, protocol2);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((bool (*)(Protocol *_Nonnull, Protocol *_Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 394))(protocol1, protocol2);
#endif
}
Method _Nullable *_Nullable
class_copyMethodList(Class _Nullable class_, unsigned int *_Nullable outCount)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((Method _Nullable *_Nullable (*)(Class _Nullable __asm__("a0"), unsigned int *_Nullable __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 402))(class_, outCount);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((Method _Nullable *_Nullable (*)(Class _Nullable, unsigned int *_Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 400))(class_, outCount);
#endif
}
SEL _Nonnull
method_getName(Method _Nonnull method)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((SEL _Nonnull (*)(Method _Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 408))(method);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((SEL _Nonnull (*)(Method _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 406))(method);
#endif
}
const char *_Nullable
method_getTypeEncoding(Method _Nonnull method)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((const char *_Nullable (*)(Method _Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 414))(method);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((const char *_Nullable (*)(Method _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 412))(method);
#endif
}
Ivar _Nullable *_Nullable
class_copyIvarList(Class _Nullable class_, unsigned int *_Nullable outCount)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((Ivar _Nullable *_Nullable (*)(Class _Nullable __asm__("a0"), unsigned int *_Nullable __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 420))(class_, outCount);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((Ivar _Nullable *_Nullable (*)(Class _Nullable, unsigned int *_Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 418))(class_, outCount);
#endif
}
const char *_Nonnull
ivar_getName(Ivar _Nonnull ivar)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((const char *_Nonnull (*)(Ivar _Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 426))(ivar);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((const char *_Nonnull (*)(Ivar _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 424))(ivar);
#endif
}
const char *_Nonnull
ivar_getTypeEncoding(Ivar _Nonnull ivar)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((const char *_Nonnull (*)(Ivar _Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 432))(ivar);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((const char *_Nonnull (*)(Ivar _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 430))(ivar);
#endif
}
ptrdiff_t
ivar_getOffset(Ivar _Nonnull ivar)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((ptrdiff_t (*)(Ivar _Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 438))(ivar);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((ptrdiff_t (*)(Ivar _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 436))(ivar);
#endif
}
objc_property_t _Nullable *_Nullable
class_copyPropertyList(Class _Nullable class_, unsigned int *_Nullable outCount)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((objc_property_t _Nullable *_Nullable (*)(Class _Nullable __asm__("a0"), unsigned int *_Nullable __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 444))(class_, outCount);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((objc_property_t _Nullable *_Nullable (*)(Class _Nullable, unsigned int *_Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 442))(class_, outCount);
#endif
}
const char *_Nonnull
property_getName(objc_property_t _Nonnull property)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((const char *_Nonnull (*)(objc_property_t _Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 450))(property);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((const char *_Nonnull (*)(objc_property_t _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 448))(property);
#endif
}
char *_Nullable
property_copyAttributeValue(objc_property_t _Nonnull property, const char *_Nonnull name)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((char *_Nullable (*)(objc_property_t _Nonnull __asm__("a0"), const char *_Nonnull __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 456))(property, name);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((char *_Nullable (*)(objc_property_t _Nonnull, const char *_Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 454))(property, name);
#endif
}
void
objc_deinit()
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
((void (*)())(((uintptr_t)ObjFWRTBase) - 462))();
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
__extension__ ((void (*)())*(void **)(((uintptr_t)ObjFWRTBase) - 460))();
#endif
}
_Nullable objc_uncaught_exception_handler
objc_setUncaughtExceptionHandler(objc_uncaught_exception_handler _Nullable handler)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((_Nullable objc_uncaught_exception_handler (*)(objc_uncaught_exception_handler _Nullable __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 468))(handler);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((_Nullable objc_uncaught_exception_handler (*)(objc_uncaught_exception_handler _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 466))(handler);
#endif
}
void
objc_setForwardHandler(IMP _Nullable forward, IMP _Nullable stretForward)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
((void (*)(IMP _Nullable __asm__("a0"), IMP _Nullable __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 474))(forward, stretForward);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
__extension__ ((void (*)(IMP _Nullable, IMP _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 472))(forward, stretForward);
#endif
}
void
objc_setEnumerationMutationHandler(objc_enumeration_mutation_handler _Nullable hadler)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
((void (*)(objc_enumeration_mutation_handler _Nullable __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 480))(hadler);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
__extension__ ((void (*)(objc_enumeration_mutation_handler _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 478))(hadler);
#endif
}
id _Nullable
objc_constructInstance(Class _Nullable class_, void *_Nullable bytes)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((id _Nullable (*)(Class _Nullable __asm__("a0"), void *_Nullable __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 486))(class_, bytes);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((id _Nullable (*)(Class _Nullable, void *_Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 484))(class_, bytes);
#endif
}
void *_Nullable
objc_destructInstance(id _Nullable object)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((void *_Nullable (*)(id _Nullable __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 492))(object);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((void *_Nullable (*)(id _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 490))(object);
#endif
}
id _Nullable
class_createInstance(Class _Nullable class_, size_t extraBytes)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((id _Nullable (*)(Class _Nullable __asm__("a0"), size_t __asm__("d0")))(((uintptr_t)ObjFWRTBase) - 498))(class_, extraBytes);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((id _Nullable (*)(Class _Nullable, size_t))*(void **)(((uintptr_t)ObjFWRTBase) - 496))(class_, extraBytes);
#endif
}
id _Nullable
object_dispose(id _Nullable object)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((id _Nullable (*)(id _Nullable __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 504))(object);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((id _Nullable (*)(id _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 502))(object);
#endif
}
id _Nonnull
_objc_rootRetain(id _Nonnull object)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((id _Nonnull (*)(id _Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 510))(object);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((id _Nonnull (*)(id _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 508))(object);
#endif
}
unsigned int
_objc_rootRetainCount(id _Nonnull object)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((unsigned int (*)(id _Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 516))(object);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((unsigned int (*)(id _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 514))(object);
#endif
}
void
_objc_rootRelease(id _Nonnull object)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
((void (*)(id _Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 522))(object);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
__extension__ ((void (*)(id _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 520))(object);
#endif
}
void *_Null_unspecified
objc_autoreleasePoolPush()
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((void *_Null_unspecified (*)())(((uintptr_t)ObjFWRTBase) - 528))();
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((void *_Null_unspecified (*)())*(void **)(((uintptr_t)ObjFWRTBase) - 526))();
#endif
}
void
objc_autoreleasePoolPop(void *_Null_unspecified pool)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
((void (*)(void *_Null_unspecified __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 534))(pool);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
__extension__ ((void (*)(void *_Null_unspecified))*(void **)(((uintptr_t)ObjFWRTBase) - 532))(pool);
#endif
}
id _Nullable
_objc_rootAutorelease(id _Nullable object)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((id _Nullable (*)(id _Nullable __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 540))(object);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((id _Nullable (*)(id _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 538))(object);
#endif
}
void
objc_setTaggedPointerSecret(uintptr_t secret)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
((void (*)(uintptr_t __asm__("d0")))(((uintptr_t)ObjFWRTBase) - 546))(secret);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
__extension__ ((void (*)(uintptr_t))*(void **)(((uintptr_t)ObjFWRTBase) - 544))(secret);
#endif
}
int
objc_registerTaggedPointerClass(Class _Nonnull class_)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((int (*)(Class _Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 552))(class_);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((int (*)(Class _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 550))(class_);
#endif
}
bool
object_isTaggedPointer(id _Nullable object)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((bool (*)(id _Nullable __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 558))(object);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((bool (*)(id _Nullable))*(void **)(((uintptr_t)ObjFWRTBase) - 556))(object);
#endif
}
uintptr_t
object_getTaggedPointerValue(id _Nonnull object)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((uintptr_t (*)(id _Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 564))(object);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((uintptr_t (*)(id _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 562))(object);
#endif
}
id _Nullable
objc_createTaggedPointer(int class_, uintptr_t value)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((id _Nullable (*)(int __asm__("a0"), uintptr_t __asm__("d0")))(((uintptr_t)ObjFWRTBase) - 570))(class_, value);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((id _Nullable (*)(int, uintptr_t))*(void **)(((uintptr_t)ObjFWRTBase) - 568))(class_, value);
#endif
}
void
objc_setAssociatedObject(id _Nonnull object, const void *_Nonnull key, id _Nullable value, objc_associationPolicy policy)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
((void (*)(id _Nonnull __asm__("a0"), const void *_Nonnull __asm__("a1"), id _Nullable __asm__("a2"), objc_associationPolicy __asm__("d0")))(((uintptr_t)ObjFWRTBase) - 576))(object, key, value, policy);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
__extension__ ((void (*)(id _Nonnull, const void *_Nonnull, id _Nullable, objc_associationPolicy))*(void **)(((uintptr_t)ObjFWRTBase) - 574))(object, key, value, policy);
#endif
}
id _Nullable
objc_getAssociatedObject(id _Nonnull object, const void *_Nonnull key)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
return ((id _Nullable (*)(id _Nonnull __asm__("a0"), const void *_Nonnull __asm__("a1")))(((uintptr_t)ObjFWRTBase) - 582))(object, key);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
return __extension__ ((id _Nullable (*)(id _Nonnull, const void *_Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 580))(object, key);
#endif
}
void
objc_removeAssociatedObjects(id _Nonnull object)
{
#if defined(OF_AMIGAOS_M68K)
register struct Library *a6 __asm__("a6") = ObjFWRTBase;
(void)a6;
((void (*)(id _Nonnull __asm__("a0")))(((uintptr_t)ObjFWRTBase) - 588))(object);
#elif defined(OF_MORPHOS)
__asm__ __volatile__ (
"mr %%r12, %0"
:: "r"(ObjFWRTBase) : "r12"
);
__extension__ ((void (*)(id _Nonnull))*(void **)(((uintptr_t)ObjFWRTBase) - 586))(object);
#endif
}
|
Changes to src/runtime/private.h.
| ︙ | ︙ | |||
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
defined(OBJC_COMPILING_AMIGA_LINKLIB)
struct objc_linklib_context {
unsigned int version;
void *_Nullable (*_Nonnull malloc)(size_t);
void *_Nullable (*_Nonnull calloc)(size_t, size_t);
void *_Nullable (*_Nonnull realloc)(void *_Nullable, size_t);
void (*_Nonnull free)(void *_Nullable);
int (*_Nonnull _Unwind_RaiseException)(void *_Nonnull);
void (*_Nonnull _Unwind_DeleteException)(void *_Nonnull);
void *_Nullable (*_Nonnull _Unwind_GetLanguageSpecificData)(
void *_Nonnull);
uintptr_t (*_Nonnull _Unwind_GetRegionStart)(void *_Nonnull);
uintptr_t (*_Nonnull _Unwind_GetDataRelBase)(void *_Nonnull);
uintptr_t (*_Nonnull _Unwind_GetTextRelBase)(void *_Nonnull);
uintptr_t (*_Nonnull _Unwind_GetIP)(void *_Nonnull);
uintptr_t (*_Nonnull _Unwind_GetGR)(void *_Nonnull, int);
void (*_Nonnull _Unwind_SetIP)(void *_Nonnull, uintptr_t);
void (*_Nonnull _Unwind_SetGR)(void *_Nonnull, int, uintptr_t);
void (*_Nonnull _Unwind_Resume)(void *_Nonnull);
void (*_Nonnull __register_frame)(void *_Nonnull);
void (*_Nonnull __deregister_frame)(void *_Nonnull);
int (*_Nonnull atexit)(void (*_Nonnull)(void));
void (*_Nonnull exit)(int);
};
#endif
extern void _objc_registerAllCategories(struct objc_symtab *_Nonnull)
OF_VISIBILITY_INTERNAL;
extern struct objc_category *_Nullable *_Nullable
_objc_categoriesForClass(Class _Nonnull) OF_VISIBILITY_INTERNAL;
extern void _objc_processCategoriesLoadQueue(void) OF_VISIBILITY_INTERNAL;
extern void _objc_unregisterAllCategories(void) OF_VISIBILITY_INTERNAL;
| > > > > > > > > > > > > > > > > > > > > > > > > > > | 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
defined(OBJC_COMPILING_AMIGA_LINKLIB)
struct objc_linklib_context {
unsigned int version;
void *_Nullable (*_Nonnull malloc)(size_t);
void *_Nullable (*_Nonnull calloc)(size_t, size_t);
void *_Nullable (*_Nonnull realloc)(void *_Nullable, size_t);
void (*_Nonnull free)(void *_Nullable);
# ifdef OF_MORPHOS
int (*_Nonnull _Unwind_RaiseException)(void *_Nonnull);
# else
int (*_Nonnull _Unwind_SjLj_RaiseException)(void *_Nonnull);
# endif
void (*_Nonnull _Unwind_DeleteException)(void *_Nonnull);
void *_Nullable (*_Nonnull _Unwind_GetLanguageSpecificData)(
void *_Nonnull);
uintptr_t (*_Nonnull _Unwind_GetRegionStart)(void *_Nonnull);
uintptr_t (*_Nonnull _Unwind_GetDataRelBase)(void *_Nonnull);
uintptr_t (*_Nonnull _Unwind_GetTextRelBase)(void *_Nonnull);
uintptr_t (*_Nonnull _Unwind_GetIP)(void *_Nonnull);
uintptr_t (*_Nonnull _Unwind_GetGR)(void *_Nonnull, int);
void (*_Nonnull _Unwind_SetIP)(void *_Nonnull, uintptr_t);
void (*_Nonnull _Unwind_SetGR)(void *_Nonnull, int, uintptr_t);
# ifdef OF_MORPHOS
void (*_Nonnull _Unwind_Resume)(void *_Nonnull);
void (*_Nonnull __register_frame)(void *_Nonnull);
void (*_Nonnull __deregister_frame)(void *_Nonnull);
# else
void (*_Nonnull _Unwind_SjLj_Resume)(void *_Nonnull);
void (*_Nonnull __register_frame_info)(const void *_Nonnull,
void *_Nonnull);
void *(*_Nonnull __deregister_frame_info)(const void *_Nonnull);
# endif
int (*_Nonnull atexit)(void (*_Nonnull)(void));
void (*_Nonnull exit)(int);
# ifdef OF_AMIGAOS_M68K
int (*_Nonnull vsnprintf)(char *restrict _Nonnull str, size_t size,
const char *_Nonnull restrict fmt, va_list args);
# endif
};
#endif
#ifdef OBJC_COMPILING_AMIGA_LIBRARY
# if defined(__MORPHOS__)
# include <ppcinline/macros.h>
# define OBJC_M68K_ARG(type, name, reg) type name = (type)REG_##reg;
# else
# define OBJC_M68K_ARG(type, name, reg) \
register type reg_##name __asm__(#reg); \
type name = reg_##name;
# endif
#endif
extern void _objc_registerAllCategories(struct objc_symtab *_Nonnull)
OF_VISIBILITY_INTERNAL;
extern struct objc_category *_Nullable *_Nullable
_objc_categoriesForClass(Class _Nonnull) OF_VISIBILITY_INTERNAL;
extern void _objc_processCategoriesLoadQueue(void) OF_VISIBILITY_INTERNAL;
extern void _objc_unregisterAllCategories(void) OF_VISIBILITY_INTERNAL;
|
| ︙ | ︙ |
Changes to tests/Makefile.
| ︙ | ︙ | |||
162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
if test -f ../src/runtime/objfwrt${OBJFWRT_LIB_MAJOR}.dll; then \
${LN_S} ../src/runtime/objfwrt${OBJFWRT_LIB_MAJOR}.dll \
objfwrt${OBJFWRT_LIB_MAJOR}.dll; \
fi
if test -f ../src/runtime/libobjfwrt.dylib; then \
${LN_S} ../src/runtime/libobjfwrt.dylib \
libobjfwrt.${OBJFWRT_LIB_MAJOR}.dylib; \
fi
if test -f ../src/runtime/${OBJFWRT_AMIGA_LIB}; then \
cp ../src/runtime/${OBJFWRT_AMIGA_LIB} ${OBJFWRT_AMIGA_LIB}; \
fi
if test -f ../src/hid/libobjfwhid.so; then \
${LN_S} ../src/hid/libobjfwhid.so \
libobjfwhid.so.${OBJFWHID_LIB_MAJOR}; \
| > > > > > > | 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
if test -f ../src/runtime/objfwrt${OBJFWRT_LIB_MAJOR}.dll; then \
${LN_S} ../src/runtime/objfwrt${OBJFWRT_LIB_MAJOR}.dll \
objfwrt${OBJFWRT_LIB_MAJOR}.dll; \
fi
if test -f ../src/runtime/libobjfwrt.dylib; then \
${LN_S} ../src/runtime/libobjfwrt.dylib \
libobjfwrt.${OBJFWRT_LIB_MAJOR}.dylib; \
fi
if test -f ../src/runtime/${OBJFWRT_AMIGA_LIB}; then \
cp ../src/runtime/${OBJFWRT_AMIGA_LIB} ${OBJFWRT_AMIGA_LIB}; \
fi
if test -f ../src/${OBJFW_AMIGA_LIB}; then \
cp ../src/${OBJFW_AMIGA_LIB} ${OBJFW_AMIGA_LIB}; \
fi
if test -f ../src/runtime/${OBJFWRT_AMIGA_LIB}; then \
cp ../src/runtime/${OBJFWRT_AMIGA_LIB} ${OBJFWRT_AMIGA_LIB}; \
fi
if test -f ../src/hid/libobjfwhid.so; then \
${LN_S} ../src/hid/libobjfwhid.so \
libobjfwhid.so.${OBJFWHID_LIB_MAJOR}; \
|
| ︙ | ︙ |
Changes to tests/objc_sync/Makefile.
| ︙ | ︙ | |||
62 63 64 65 66 67 68 |
rm -f libobjfwrt.so.${OBJFWRT_LIB_MAJOR}; \
rm -f libobjfwrt.so.${OBJFWRT_LIB_MAJOR_MINOR}; \
rm -f objfwrt${OBJFWRT_LIB_MAJOR}.dll; \
rm -f libobjfwrt.${OBJFWRT_LIB_MAJOR}.dylib; \
exit $$EXIT
CPPFLAGS += -I../../src -I../../src/runtime -I../..
| | | 62 63 64 65 66 67 68 69 70 71 72 |
rm -f libobjfwrt.so.${OBJFWRT_LIB_MAJOR}; \
rm -f libobjfwrt.so.${OBJFWRT_LIB_MAJOR_MINOR}; \
rm -f objfwrt${OBJFWRT_LIB_MAJOR}.dll; \
rm -f libobjfwrt.${OBJFWRT_LIB_MAJOR}.dylib; \
exit $$EXIT
CPPFLAGS += -I../../src -I../../src/runtime -I../..
LIBS := -L../../src -L../../src/linklib ${OBJFW_LIB} \
-L../../src/runtime -L../../src/runtime/linklib ${RUNTIME_LIBS} \
${LIBS}
LD = ${OBJC}
|
Changes to tests/terminal/Makefile.
| ︙ | ︙ | |||
62 63 64 65 66 67 68 |
rm -f libobjfwrt.so.${OBJFWRT_LIB_MAJOR}; \
rm -f libobjfwrt.so.${OBJFWRT_LIB_MAJOR_MINOR}; \
rm -f objfwrt${OBJFWRT_LIB_MAJOR}.dll; \
rm -f libobjfwrt.${OBJFWRT_LIB_MAJOR}.dylib; \
exit $$EXIT
CPPFLAGS += -I../../src -I../../src/exceptions -I../../src/runtime -I../..
| | | 62 63 64 65 66 67 68 69 70 71 72 |
rm -f libobjfwrt.so.${OBJFWRT_LIB_MAJOR}; \
rm -f libobjfwrt.so.${OBJFWRT_LIB_MAJOR_MINOR}; \
rm -f objfwrt${OBJFWRT_LIB_MAJOR}.dll; \
rm -f libobjfwrt.${OBJFWRT_LIB_MAJOR}.dylib; \
exit $$EXIT
CPPFLAGS += -I../../src -I../../src/exceptions -I../../src/runtime -I../..
LIBS := -L../../src -L../../src/linklib ${OBJFW_LIB} \
-L../../src/runtime -L../../src/runtime/linklib ${RUNTIME_LIBS} \
${LIBS}
LD = ${OBJC}
|
Changes to utils/objfw-config.in.
| ︙ | ︙ | |||
30 31 32 33 34 35 36 | LIB_CFLAGS="@LIB_CFLAGS@" LIB_LDFLAGS="@LIB_LDFLAGS@" LIB_PREFIX="@LIB_PREFIX@" LIB_SUFFIX="@LIB_SUFFIX@" LDFLAGS="@OBJFW_LDFLAGS@" LDFLAGS_REEXPORT="@LDFLAGS_REEXPORT@" LDFLAGS_RPATH="@LDFLAGS_RPATH@" | | | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
LIB_CFLAGS="@LIB_CFLAGS@"
LIB_LDFLAGS="@LIB_LDFLAGS@"
LIB_PREFIX="@LIB_PREFIX@"
LIB_SUFFIX="@LIB_SUFFIX@"
LDFLAGS="@OBJFW_LDFLAGS@"
LDFLAGS_REEXPORT="@LDFLAGS_REEXPORT@"
LDFLAGS_RPATH="@LDFLAGS_RPATH@"
LIBS="@OBJFW_LIB@ @RUNTIME_LIBS@ @OBJFW_LIBS@"
FRAMEWORK_LIBS="-framework ObjFW"
FRAMEWORK_LIBS="$FRAMEWORK_LIBS @RUNTIME_FRAMEWORK_LIBS@ @OBJFW_LIBS@"
PLUGIN_CFLAGS="@PLUGIN_CFLAGS@"
PLUGIN_LDFLAGS="@PLUGIN_LDFLAGS@"
PLUGIN_SUFFIX="@PLUGIN_SUFFIX@"
PROG_SUFFIX="@EXEEXT@"
STATIC_LIBS="${libdir}/libobjfw.a @RUNTIME_STATIC_LIBS@ @OBJFW_LIBS@"
|
| ︙ | ︙ |
Changes to utils/objfw-new/Makefile.
| ︙ | ︙ | |||
14 15 16 17 18 19 20 |
CPPFLAGS += -I../../src \
-I../../src/runtime \
-I../../src/exceptions \
-I../..
OBJCFLAGS += ${PIE_CFLAGS} \
-DBUILD_DATE=\"$$(date +%d.%m.%y)\"
| | | 14 15 16 17 18 19 20 21 22 23 24 25 |
CPPFLAGS += -I../../src \
-I../../src/runtime \
-I../../src/exceptions \
-I../..
OBJCFLAGS += ${PIE_CFLAGS} \
-DBUILD_DATE=\"$$(date +%d.%m.%y)\"
LIBS := -L../../src ${OBJFW_LIB} \
-L../../src/runtime -L../../src/runtime/linklib ${RUNTIME_LIBS} \
${LIBS}
LD = ${OBJC}
LDFLAGS += ${PIE_LDFLAGS} ${LDFLAGS_RPATH}
|
Changes to utils/ofarc/Makefile.
| ︙ | ︙ | |||
28 29 30 31 32 33 34 |
-DBUILD_DATE=\"$$(date +%d.%m.%y)\"
LIBS := -L../../src \
-L../../src/runtime \
-L../../src/runtime/linklib \
-L../../src/tls \
-L../../src/bridge \
${OFHTTP_LIBS} \
| | | 28 29 30 31 32 33 34 35 36 37 38 39 |
-DBUILD_DATE=\"$$(date +%d.%m.%y)\"
LIBS := -L../../src \
-L../../src/runtime \
-L../../src/runtime/linklib \
-L../../src/tls \
-L../../src/bridge \
${OFHTTP_LIBS} \
${OBJFW_LIB} \
${RUNTIME_LIBS} \
${LIBS}
LD = ${OBJC}
LDFLAGS += ${PIE_LDFLAGS} ${LDFLAGS_RPATH}
|
Changes to utils/ofdns/Makefile.
| ︙ | ︙ | |||
15 16 17 18 19 20 21 |
CPPFLAGS += -I../../src \
-I../../src/runtime \
-I../../src/exceptions \
-I../.. \
-DLOCALIZATION_DIR=\"${datadir}/ofdns/localization\"
OBJCFLAGS += ${PIE_CFLAGS} \
-DBUILD_DATE=\"$$(date +%d.%m.%y)\"
| | | 15 16 17 18 19 20 21 22 23 24 25 26 |
CPPFLAGS += -I../../src \
-I../../src/runtime \
-I../../src/exceptions \
-I../.. \
-DLOCALIZATION_DIR=\"${datadir}/ofdns/localization\"
OBJCFLAGS += ${PIE_CFLAGS} \
-DBUILD_DATE=\"$$(date +%d.%m.%y)\"
LIBS := -L../../src ${OBJFW_LIB} \
-L../../src/runtime -L../../src/runtime/linklib ${RUNTIME_LIBS} \
${LIBS}
LD = ${OBJC}
LDFLAGS += ${PIE_LDFLAGS} ${LDFLAGS_RPATH}
|
Changes to utils/ofhash/Makefile.
| ︙ | ︙ | |||
23 24 25 26 27 28 29 |
-DBUILD_DATE=\"$$(date +%d.%m.%y)\"
LIBS := -L../../src \
-L../../src/runtime \
-L../../src/runtime/linklib \
-L../../src/tls \
-L../../src/bridge \
${OFHASH_LIBS} \
| | | 23 24 25 26 27 28 29 30 31 32 33 34 |
-DBUILD_DATE=\"$$(date +%d.%m.%y)\"
LIBS := -L../../src \
-L../../src/runtime \
-L../../src/runtime/linklib \
-L../../src/tls \
-L../../src/bridge \
${OFHASH_LIBS} \
${OBJFW_LIB} \
${RUNTIME_LIBS} \
${LIBS}
LD = ${OBJC}
LDFLAGS += ${PIE_LDFLAGS} ${LDFLAGS_RPATH}
|
Changes to utils/ofhttp/Makefile.
| ︙ | ︙ | |||
24 25 26 27 28 29 30 |
-DBUILD_DATE=\"$$(date +%d.%m.%y)\"
LIBS := -L../../src \
-L../../src/runtime \
-L../../src/runtime/linklib \
-L../../src/tls \
-L../../src/bridge \
${OFHTTP_LIBS} \
| | | 24 25 26 27 28 29 30 31 32 33 34 35 |
-DBUILD_DATE=\"$$(date +%d.%m.%y)\"
LIBS := -L../../src \
-L../../src/runtime \
-L../../src/runtime/linklib \
-L../../src/tls \
-L../../src/bridge \
${OFHTTP_LIBS} \
${OBJFW_LIB} \
${RUNTIME_LIBS} \
${LIBS}
LD = ${OBJC}
LDFLAGS += ${PIE_LDFLAGS} ${LDFLAGS_RPATH}
|