ObjFW  Changes On Branch a03b820df85e1dca

Changes In Branch amiga-library Through [a03b820df8] Excluding Merge-Ins

This is equivalent to a diff from c80b60fcc9 to a03b820df8

2021-05-13
20:13
Merge trunk into branch "amiga-library" check-in: 08361ff875 user: js tags: amiga-library
2021-05-09
18:11
runtime: Fix lookup for systems without ASM lookup check-in: ed10c3b404 user: js tags: trunk
18:02
Rename library.xml to amiga-library.xml check-in: a03b820df8 user: js tags: amiga-library
14:45
Merge trunk into branch "amiga-library" check-in: 3c88df0ce4 user: js tags: amiga-library
10:17
tests: Fix shadowed variable check-in: c80b60fcc9 user: js tags: trunk
2021-05-08
23:29
tests: Minor const improvement check-in: c8663697ae user: js tags: trunk

Modified configure.ac from [7096187252] to [80769d4ef2].

45
46
47
48
49
50
51

52
53
54
55
56
57
58
59
60
61
62
63
64
65
	LIBS="$LIBS -ldebug"

	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}.library'])
		dnl For 68000, GCC emits calls to helper functions that
		dnl do not work properly in a library.
		t="-mcpu=68020 -fbaserel -noixemul -ffreestanding"
		AC_SUBST(AMIGA_LIB_CFLAGS, $t)
		t="$t -resident -nostartfiles -nodefaultlibs -ldebug -lc"
		AC_SUBST(AMIGA_LIB_LDFLAGS, $t)
	])

	AC_SUBST(LIBBASES_M, libbases.m)
	;;
powerpc-*-amigaos*)
	CPPFLAGS="$CPPFLAGS -D__USE_INLINE__"







>




|

|







45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
	LIBS="$LIBS -ldebug"

	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}.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(LIBBASES_M, libbases.m)
	;;
powerpc-*-amigaos*)
	CPPFLAGS="$CPPFLAGS -D__USE_INLINE__"
77
78
79
80
81
82
83


84
85
86
87
88

89
90
91
92
93
94
95
96
	LIBS="$LIBS -ldebug"

	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${OBJFW_LIB_MAJOR}ppc.library'])
		t="-mresident32 -ffreestanding -noixemul"
		AC_SUBST(AMIGA_LIB_CFLAGS, $t)
		t="-mresident32 -nostartfiles -nodefaultlibs -noixemul -ldebug"

		AC_SUBST(AMIGA_LIB_LDFLAGS, "$t -lc")
	])

	AC_SUBST(LIBBASES_M, libbases.m)
	;;
*-msdosdjgpp*)
	enable_shared="no"
	enable_threads="no"







>
>

|


|
>
|







78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
	LIBS="$LIBS -ldebug"

	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)
	])

	AC_SUBST(LIBBASES_M, libbases.m)
	;;
*-msdosdjgpp*)
	enable_shared="no"
	enable_threads="no"
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
	AC_MSG_RESULT(no)
	AC_MSG_ERROR(Compiler does not support properties!)
])

AC_CHECK_TOOL(AR, ar)
AC_PROG_RANLIB





AC_ARG_ENABLE(shared,
	AS_HELP_STRING([--disable-shared], [do not build shared library]))
AS_IF([test x"$enable_shared" != x"no"], [
	BUILDSYS_SHARED_LIB
	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(LOOKUP_ASM_LIB_A, "lookup-asm.lib.a")

	BUILDSYS_FRAMEWORK([
		AC_SUBST(OBJFW_FRAMEWORK, "ObjFW.framework")
		build_framework="yes"
	])


], [


	AC_DEFINE(OF_NO_SHARED, 1, [Whether no shared library was built])




	AC_SUBST(LIBOBJFW_DEP, "../src/libobjfw.a")
	AC_SUBST(LIBOBJFW_DEP_LVL2, "../../src/libobjfw.a")



])

AS_IF([test x"$build_framework" = x"yes"], [
	TESTS_LIBS="-framework ObjFW \${RUNTIME_FRAMEWORK_LIBS} $TESTS_LIBS"
	TESTS_LIBS="-F../src -F../src/runtime $TESTS_LIBS"
], [
	TESTS_LIBS="\${RUNTIME_LIBS} $TESTS_LIBS"
	TESTS_LIBS="-L../src/runtime -L../src/runtime/linklib $TESTS_LIBS"
	TESTS_LIBS="-L../src -lobjfw $TESTS_LIBS"
])

AC_ARG_ENABLE(amiga-lib,
	AS_HELP_STRING([--disable-amiga-lib], [do not build Amiga library]))
AS_IF([test x"$supports_amiga_lib" != x"yes"], [enable_amiga_lib="no"])
AS_IF([test x"$enable_amiga_lib" != x"no"], [
	AC_SUBST(OBJFW_STATIC_LIB, "libobjfw.a")
	AC_SUBST(EXCEPTIONS_A, "exceptions.a")
	AC_SUBST(FORWARDING_A, "forwarding.a")
	AC_SUBST(LOOKUP_ASM_AMIGALIB_A, "lookup-asm.amigalib.a")
])

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"
])
AS_IF([test x"$enable_static" = x"yes"], [
	AC_SUBST(OBJFW_STATIC_LIB, "libobjfw.a")
	AC_SUBST(EXCEPTIONS_A, "exceptions.a")
	AC_SUBST(FORWARDING_A, "forwarding.a")
	AC_SUBST(LOOKUP_ASM_A, "lookup-asm.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_PLUGINS, '${SRCS_PLUGINS}')
	AC_SUBST(TESTPLUGIN, "plugin")
	AC_DEFINE(OF_HAVE_PLUGINS, 1, [Whether we have plugin support])
	AC_CONFIG_FILES(tests/plugin/Info.plist)

	AS_IF([test x"$build_framework" = x"yes"], [
		TESTPLUGIN_LIBS="-F../../src -F../../src/runtime"
		TESTPLUGIN_LIBS="$TESTPLUGIN_LIBS -framework ObjFW"
		TESTPLUGIN_LIBS="$TESTPLUGIN_LIBS \${RUNTIME_FRAMEWORK_LIBS}"
	], [
		TESTPLUGIN_LIBS="-L../../src -L../../src/runtime"
		TESTPLUGIN_LIBS="$TESTPLUGIN_LIBS -lobjfw \${RUNTIME_LIBS}"
	])
	AC_SUBST(TESTPLUGIN_LIBS)
])





AC_MSG_CHECKING(whether we need -D_GNU_SOURCE)
AC_EGREP_CPP(egrep_cpp_yes, [
	#include <stdlib.h>

	#if defined(__GLIBC__) || defined(__MINGW32__) || \
	    defined(__NEWLIB__) || defined(__MORPHOS__)







>
>
>
>













>
>

>
>
|
>
>
>
>
|
|
>
>
>






|

|
<
<
<
<
<
<
<
<
<
<












>
>
>
>
>
>


















>
>
>
>







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
	AC_MSG_RESULT(no)
	AC_MSG_ERROR(Compiler does not support properties!)
])

AC_CHECK_TOOL(AR, ar)
AC_PROG_RANLIB

AC_ARG_ENABLE(amiga-lib,
	AS_HELP_STRING([--disable-amiga-lib], [do not build Amiga library]))
AS_IF([test x"$supports_amiga_lib" != x"yes"], [enable_amiga_lib="no"])

AC_ARG_ENABLE(shared,
	AS_HELP_STRING([--disable-shared], [do not build shared library]))
AS_IF([test x"$enable_shared" != x"no"], [
	BUILDSYS_SHARED_LIB
	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(LOOKUP_ASM_LIB_A, "lookup-asm.lib.a")

	BUILDSYS_FRAMEWORK([
		AC_SUBST(OBJFW_FRAMEWORK, "ObjFW.framework")
		build_framework="yes"
	])

	AC_SUBST(OBJFW_LIBS, "-lobjfw")
], [
	AS_IF([test x"$enable_amiga_lib" != x"no"], [
		AC_SUBST(OBJFW_LIBS, "-lobjfw.library")
		tmp="../src/linklib/libobjfw.library.a"
		AC_SUBST(LIBOBJFW_DEP, "$tmp")
		AC_SUBST(LIBOBJFW_DEP_LVL2, "../$tmp")
	], [
		AC_SUBST(OBJFW_LIBS, "-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])
	])
])

AS_IF([test x"$build_framework" = x"yes"], [
	TESTS_LIBS="-framework ObjFW \${RUNTIME_FRAMEWORK_LIBS} $TESTS_LIBS"
	TESTS_LIBS="-F../src -F../src/runtime $TESTS_LIBS"
], [
	TESTS_LIBS="\${OBJFW_LIBS} \${RUNTIME_LIBS} $TESTS_LIBS"
	TESTS_LIBS="-L../src/runtime -L../src/runtime/linklib $TESTS_LIBS"
	TESTS_LIBS="-L../src -L../src/linklib $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"
])
AS_IF([test x"$enable_static" = x"yes"], [
	AC_SUBST(OBJFW_STATIC_LIB, "libobjfw.a")
	AC_SUBST(EXCEPTIONS_A, "exceptions.a")
	AC_SUBST(FORWARDING_A, "forwarding.a")
	AC_SUBST(LOOKUP_ASM_A, "lookup-asm.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_SUBST(LOOKUP_ASM_AMIGALIB_A, "lookup-asm.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_PLUGINS, '${SRCS_PLUGINS}')
	AC_SUBST(TESTPLUGIN, "plugin")
	AC_DEFINE(OF_HAVE_PLUGINS, 1, [Whether we have plugin support])
	AC_CONFIG_FILES(tests/plugin/Info.plist)

	AS_IF([test x"$build_framework" = x"yes"], [
		TESTPLUGIN_LIBS="-F../../src -F../../src/runtime"
		TESTPLUGIN_LIBS="$TESTPLUGIN_LIBS -framework ObjFW"
		TESTPLUGIN_LIBS="$TESTPLUGIN_LIBS \${RUNTIME_FRAMEWORK_LIBS}"
	], [
		TESTPLUGIN_LIBS="-L../../src -L../../src/runtime"
		TESTPLUGIN_LIBS="$TESTPLUGIN_LIBS -lobjfw \${RUNTIME_LIBS}"
	])
	AC_SUBST(TESTPLUGIN_LIBS)
])

AS_IF([test x"$enable_amiga_lib" != x"no"], [
	AC_SUBST(LINKLIB, linklib)
])

AC_MSG_CHECKING(whether we need -D_GNU_SOURCE)
AC_EGREP_CPP(egrep_cpp_yes, [
	#include <stdlib.h>

	#if defined(__GLIBC__) || defined(__MINGW32__) || \
	    defined(__NEWLIB__) || defined(__MORPHOS__)
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
	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")
		AC_SUBST(LINKLIB, linklib)
		tmp="../src/runtime/linklib/libobjfwrt.library.a"
		AC_SUBST(LIBOBJFWRT_DEP, "$tmp")
		AC_SUBST(LIBOBJFWRT_DEP_LVL2, "../$tmp")
	], [
		AC_SUBST(RUNTIME_LIBS, "-lobjfwrt")
	])








<







551
552
553
554
555
556
557

558
559
560
561
562
563
564
	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")
	])

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
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_static" = x"yes" -o x"$enable_shared" = x"no"], [
	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, LIBS="$LIBS -ldl")
])
AC_CHECK_HEADERS_ONCE(dlfcn.h)
case "$host_os" in
netbsd*)
	dnl dladdr exists on NetBSD, but it is completely broken.
	dnl When using it with code that uses __thread, it freezes the process
	dnl so that it has to be killed using SIGKILL.
	dnl When disabling __thread, it doesn't freeze, but all symbols are
	dnl wrong.
	;;



*)
	AC_CHECK_FUNCS(dladdr)
	;;
esac

AC_CHECK_HEADERS(sys/mman.h)
AC_CHECK_FUNCS(mmap mlock)







>
>
>
|

















>
>
>







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
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, LIBS="$LIBS -ldl")
])
AC_CHECK_HEADERS_ONCE(dlfcn.h)
case "$host_os" in
netbsd*)
	dnl dladdr exists on NetBSD, but it is completely broken.
	dnl When using it with code that uses __thread, it freezes the process
	dnl so that it has to be killed using SIGKILL.
	dnl When disabling __thread, it doesn't freeze, but all symbols are
	dnl wrong.
	;;
morphos*)
	dnl MorphOS has a dladdr symbol, but it doesn't work.
	;;
*)
	AC_CHECK_FUNCS(dladdr)
	;;
esac

AC_CHECK_HEADERS(sys/mman.h)
AC_CHECK_FUNCS(mmap mlock)

Modified extra.mk.in from [984877419d] to [58325ddf01].

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
OBJFW_SHARED_LIB = @OBJFW_SHARED_LIB@
OBJFW_STATIC_LIB = @OBJFW_STATIC_LIB@
OBJFW_FRAMEWORK = @OBJFW_FRAMEWORK@

OBJFW_LIB_MAJOR = 1
OBJFW_LIB_MINOR = 0
OBJFW_LIB_MAJOR_MINOR = ${OBJFW_LIB_MAJOR}.${OBJFW_LIB_MINOR}

OBJFWRT_SHARED_LIB = @OBJFWRT_SHARED_LIB@
OBJFWRT_STATIC_LIB = @OBJFWRT_STATIC_LIB@
OBJFWRT_FRAMEWORK = @OBJFWRT_FRAMEWORK@
OBJFWRT_AMIGA_LIB = @OBJFWRT_AMIGA_LIB@
OBJFWRT_LIB_MAJOR = 1
OBJFWRT_LIB_MINOR = 0
OBJFWRT_LIB_MAJOR_MINOR = ${OBJFWRT_LIB_MAJOR}.${OBJFWRT_LIB_MINOR}

OBJFWBRIDGE_SHARED_LIB = @OBJFWBRIDGE_SHARED_LIB@
OBJFWBRIDGE_STATIC_LIB = @OBJFWBRIDGE_STATIC_LIB@
OBJFWBRIDGE_FRAMEWORK = @OBJFWBRIDGE_FRAMEWORK@

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@
FISH_COMPLETIONS = @FISH_COMPLETIONS@
FORWARDING_A = @FORWARDING_A@

FORWARDING_LIB_A = @FORWARDING_LIB_A@
LIBBASES_M = @LIBBASES_M@
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@

OFARC = @OFARC@
OFDNS = @OFDNS@
OFHASH = @OFHASH@
OFHTTP = @OFHTTP@
OF_BLOCK_TESTS_M = @OF_BLOCK_TESTS_M@
OF_EPOLL_KERNEL_EVENT_OBSERVER_M = @OF_EPOLL_KERNEL_EVENT_OBSERVER_M@
OF_HTTP_CLIENT_TESTS_M = @OF_HTTP_CLIENT_TESTS_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
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 = 0
OBJFW_LIB_MAJOR_MINOR = ${OBJFW_LIB_MAJOR}.${OBJFW_LIB_MINOR}

OBJFWRT_SHARED_LIB = @OBJFWRT_SHARED_LIB@
OBJFWRT_STATIC_LIB = @OBJFWRT_STATIC_LIB@
OBJFWRT_FRAMEWORK = @OBJFWRT_FRAMEWORK@
OBJFWRT_AMIGA_LIB = @OBJFWRT_AMIGA_LIB@
OBJFWRT_LIB_MAJOR = 1
OBJFWRT_LIB_MINOR = 0
OBJFWRT_LIB_MAJOR_MINOR = ${OBJFWRT_LIB_MAJOR}.${OBJFWRT_LIB_MINOR}

OBJFWBRIDGE_SHARED_LIB = @OBJFWBRIDGE_SHARED_LIB@
OBJFWBRIDGE_STATIC_LIB = @OBJFWBRIDGE_STATIC_LIB@
OBJFWBRIDGE_FRAMEWORK = @OBJFWBRIDGE_FRAMEWORK@

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@
FISH_COMPLETIONS = @FISH_COMPLETIONS@
FORWARDING_A = @FORWARDING_A@
FORWARDING_AMIGALIB_A = @FORWARDING_AMIGALIB_A@
FORWARDING_LIB_A = @FORWARDING_LIB_A@
LIBBASES_M = @LIBBASES_M@
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@
OBJFW_LIBS = @OBJFW_LIBS@
OFARC = @OFARC@
OFDNS = @OFDNS@
OFHASH = @OFHASH@
OFHTTP = @OFHTTP@
OF_BLOCK_TESTS_M = @OF_BLOCK_TESTS_M@
OF_EPOLL_KERNEL_EVENT_OBSERVER_M = @OF_EPOLL_KERNEL_EVENT_OBSERVER_M@
OF_HTTP_CLIENT_TESTS_M = @OF_HTTP_CLIENT_TESTS_M@

Modified generators/library/FuncArrayGenerator.m from [51e8f1d0df] to [1c3582d45a].

63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
	[super dealloc];
}

- (void)generate
{
	[_include writeString: COPYRIGHT];
	[_include writeString:
	    @"/* This file is automatically generated from library.xml */\n"
	    @"\n"];

	for (OFXMLElement *function in [_library elementsForName: @"function"])
		[_include writeFormat:
		    @"(CONST_APTR)glue_%@,\n",
		    [function attributeForName: @"name"].stringValue];
}
@end







|
|







63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
	[super dealloc];
}

- (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"])
		[_include writeFormat:
		    @"(CONST_APTR)glue_%@,\n",
		    [function attributeForName: @"name"].stringValue];
}
@end

Modified generators/library/GlueGenerator.m from [31aa00cfbb] to [7e6c4df2bf].

68
69
70
71
72
73
74
75
76
77
78
79

80
81
82
83
84
85
86

- (void)generate
{
	[_header writeString: COPYRIGHT];
	[_impl writeString: COPYRIGHT];

	[_header writeString:
	    @"/* This file is automatically generated from library.xml */\n"
	    @"\n"];

	[_impl writeString:
	    @"/* This file is automatically generated from library.xml */\n"

	    @"\n"
	    @"#include \"config.h\"\n"
	    @"\n"
	    @"#import \"amiga-glue.h\"\n"
	    @"\n"];

	for (OFXMLElement *include in [_library elementsForName: @"include"])







|
|


|
>







68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87

- (void)generate
{
	[_header writeString: COPYRIGHT];
	[_impl 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"];

	for (OFXMLElement *include in [_library elementsForName: @"include"])

Modified generators/library/LibraryGenerator.m from [5e005ae799] to [c4366e35fe].

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

@interface LibraryGenerator: OFObject <OFApplicationDelegate>
@end

OF_APPLICATION_DELEGATE(LibraryGenerator)

@implementation LibraryGenerator
- (void)applicationDidFinishLaunching
{
	OFURL *sourcesURL = [[OFFileManager defaultManager].currentDirectoryURL
	    URLByAppendingPathComponent: @"../../src"];
	OFURL *runtimeLibraryURL = [sourcesURL
	    URLByAppendingPathComponent: @"runtime/library.xml"];
	OFURL *runtimeLinkLibURL = [sourcesURL
	    URLByAppendingPathComponent: @"runtime/linklib/linklib.m"];
	OFURL *runtimeGlueHeaderURL = [sourcesURL
	    URLByAppendingPathComponent: @"runtime/amiga-glue.h"];
	OFURL *runtimeGlueURL = [sourcesURL
	    URLByAppendingPathComponent: @"runtime/amiga-glue.m"];
	OFURL *runtimeFuncArrayURL = [sourcesURL
	    URLByAppendingPathComponent: @"runtime/amiga-funcarray.inc"];
	OFXMLElement *runtimeLibrary = [OFXMLElement elementWithStream:
	    [OFFile fileWithURL: runtimeLibraryURL
			   mode: @"r"]];
	OFFile *runtimeLinkLib = [OFFile fileWithURL: runtimeLinkLibURL
						mode: @"w"];
	OFFile *runtimeGlueHeader = [OFFile fileWithURL: runtimeGlueHeaderURL
						   mode: @"w"];
	OFFile *runtimeGlue = [OFFile fileWithURL: runtimeGlueURL
					     mode: @"w"];
	OFFile *runtimeFuncArray = [OFFile fileWithURL: runtimeFuncArrayURL
						  mode: @"w"];
	LinkLibGenerator *runtimeLinkLibGenerator = [[[LinkLibGenerator alloc]
	    initWithLibrary: runtimeLibrary
	     implementation: runtimeLinkLib] autorelease];
	GlueGenerator *runtimeGlueGenerator = [[[GlueGenerator alloc]
	    initWithLibrary: runtimeLibrary
		     header: runtimeGlueHeader
	     implementation: runtimeGlue] autorelease];
	FuncArrayGenerator *runtimeFuncArrayGenerator;
	runtimeFuncArrayGenerator = [[[FuncArrayGenerator alloc]
	    initWithLibrary: runtimeLibrary
		    include: runtimeFuncArray] autorelease];

	[runtimeLinkLibGenerator generate];
	[runtimeGlueGenerator generate];
	[runtimeFuncArrayGenerator generate];







	[OFApplication terminate];
}
@end







|


|
|
|
|
|
|
|
|
|
|
|
|
|
<
|
<
|
<
|
<
|
<
|
|
|
|
|
|
|
<
|
|
|

|
|
|
>
>
>
>
>
>




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

@interface LibraryGenerator: OFObject <OFApplicationDelegate>
@end

OF_APPLICATION_DELEGATE(LibraryGenerator)

@implementation LibraryGenerator
- (void)generateInDirectory: (OFString *)directory
{
	OFURL *sourcesURL = [[OFFileManager defaultManager].currentDirectoryURL
	    URLByAppendingPathComponent: directory];
	OFURL *libraryURL = [sourcesURL
	    URLByAppendingPathComponent: @"amiga-library.xml"];
	OFURL *linkLibURL = [sourcesURL
	    URLByAppendingPathComponent: @"linklib/linklib.m"];
	OFURL *glueHeaderURL = [sourcesURL
	    URLByAppendingPathComponent: @"amiga-glue.h"];
	OFURL *glueURL = [sourcesURL
	    URLByAppendingPathComponent: @"amiga-glue.m"];
	OFURL *funcArrayURL = [sourcesURL
	    URLByAppendingPathComponent: @"amiga-funcarray.inc"];
	OFXMLElement *library = [OFXMLElement elementWithStream:
	    [OFFile fileWithURL: libraryURL mode: @"r"]];

	OFFile *linkLib = [OFFile fileWithURL: linkLibURL mode: @"w"];

	OFFile *glueHeader = [OFFile fileWithURL: glueHeaderURL mode: @"w"];

	OFFile *glue = [OFFile fileWithURL: glueURL mode: @"w"];

	OFFile *funcArray = [OFFile fileWithURL: funcArrayURL mode: @"w"];

	LinkLibGenerator *linkLibGenerator = [[[LinkLibGenerator alloc]
	    initWithLibrary: library
	     implementation: linkLib] autorelease];
	GlueGenerator *glueGenerator = [[[GlueGenerator alloc]
	    initWithLibrary: library
		     header: glueHeader
	     implementation: glue] autorelease];

	FuncArrayGenerator *funcArrayGenerator = [[[FuncArrayGenerator alloc]
	    initWithLibrary: library
		    include: funcArray] autorelease];

	[linkLibGenerator generate];
	[glueGenerator generate];
	[funcArrayGenerator generate];
}

- (void)applicationDidFinishLaunching
{
	[self generateInDirectory: @"../../src"];
	[self generateInDirectory: @"../../src/runtime"];

	[OFApplication terminate];
}
@end

Modified generators/library/LinkLibGenerator.m from [39332583d0] to [1db6f70617].

67
68
69
70
71
72
73
74

75
76
77
78
79
80
81
{
	OFString *libBase = [_library attributeForName: @"base"].stringValue;
	OFArray OF_GENERIC(OFXMLElement *) *functions;
	size_t funcIndex = 0;

	[_impl writeString: COPYRIGHT];
	[_impl writeString:
	    @"/* This file is automatically generated from library.xml */\n"

	    @"\n"
	    @"#include \"config.h\"\n"
	    @"\n"];

	for (OFXMLElement *include in [_library elementsForName: @"include"])
		[_impl writeFormat: @"#import \"%@\"\n",
				    include.stringValue];







|
>







67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
	OFString *libBase = [_library attributeForName: @"base"].stringValue;
	OFArray OF_GENERIC(OFXMLElement *) *functions;
	size_t funcIndex = 0;

	[_impl writeString: COPYRIGHT];
	[_impl writeString:
	    @"/* This file is automatically generated from "
	    @"amiga-library.xml */\n"
	    @"\n"
	    @"#include \"config.h\"\n"
	    @"\n"];

	for (OFXMLElement *include in [_library elementsForName: @"include"])
		[_impl writeFormat: @"#import \"%@\"\n",
				    include.stringValue];
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158

			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







|
<







144
145
146
147
148
149
150
151

152
153
154
155
156
157
158

			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

Modified src/Makefile from [89f588f854] to [364ab65b22].

1
2
3
4








5
6
7
8
9

10
11
12
13
14
15
16
include ../extra.mk

SUBDIRS = ${RUNTIME} exceptions encodings forwarding
SUBDIRS_AFTER = ${BRIDGE}








DISTCLEAN = Info.plist objfw-defs.h

SHARED_LIB = ${OBJFW_SHARED_LIB}
STATIC_LIB = ${OBJFW_STATIC_LIB}
FRAMEWORK = ${OBJFW_FRAMEWORK}

LIB_MAJOR = ${OBJFW_LIB_MAJOR}
LIB_MINOR = ${OBJFW_LIB_MINOR}

SRCS = OFASPrintF.m			\
       OFApplication.m			\
       OFArray.m			\
       OFBase64.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
include ../extra.mk

SUBDIRS = ${RUNTIME} exceptions encodings forwarding
SUBDIRS_AFTER = ${LINKLIB} ${BRIDGE}
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	\
	inline.h
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}

SRCS = OFASPrintF.m			\
       OFApplication.m			\
       OFArray.m			\
       OFBase64.m			\
215
216
217
218
219
220
221






222
223
224
225




226
227
228
229
230
231


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

CPPFLAGS += -I. -I.. -Iexceptions -Iruntime




LD = ${OBJC}
FRAMEWORK_LIBS := -Fruntime				\
		  ${RUNTIME_FRAMEWORK_LIBS}		\
		  ${REEXPORT_RUNTIME_FRAMEWORK}		\
		  ${LIBS}
LIBS := -Lruntime ${RUNTIME_LIBS} ${REEXPORT_RUNTIME} ${LIBS}








>
>
>
>
>
>



|
>
>
>
>





|
>
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

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-glue.amigalib.o		\
		       exceptions/exceptions.amigalib.a	\
		       encodings/encodings.amigalib.a	\
		       forwarding/forwarding.amigalib.a	\
		       amiga-end.amigalib.o

include ../buildsys.mk

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}
LIBS := -Lruntime -Lruntime/linklib ${RUNTIME_LIBS} ${REEXPORT_RUNTIME} ${LIBS}
AMIGA_LIB_LIBS = ${LIBS}

Modified src/OFBlock.h from [b2fc8f8283] to [d0a30cd463].

38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
OF_SUBCLASSING_RESTRICTED
@interface OFMallocBlock: OFBlock
@end

#ifdef __cplusplus
extern "C" {
#endif
extern void *_Block_copy(const void *);
extern void _Block_release(const void *);

# if defined(OF_WINDOWS) && \
    (defined(OF_NO_SHARED) || defined(OF_COMPILING_OBJFW))
/*
 * Clang has implicit declarations for these, but they are dllimport. When
 * compiling ObjFW itself or using it as a static library, these need to be
 * dllexport. Interestingly, this still works when using it as a shared library.







|
|







38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
OF_SUBCLASSING_RESTRICTED
@interface OFMallocBlock: OFBlock
@end

#ifdef __cplusplus
extern "C" {
#endif
extern void *_Nullable _Block_copy(const void *_Nullable);
extern void _Block_release(const void *_Nullable);

# if defined(OF_WINDOWS) && \
    (defined(OF_NO_SHARED) || defined(OF_COMPILING_OBJFW))
/*
 * Clang has implicit declarations for these, but they are dllimport. When
 * compiling ObjFW itself or using it as a static library, these need to be
 * dllexport. Interestingly, this still works when using it as a shared library.

Modified src/OFDNSResourceRecord.h from [5d78beeb65] to [684c620d59].

616
617
618
619
620
621
622






623







624







625







626
627
628
629
630
631
		 textStrings: (OFArray OF_GENERIC(OFData *) *)textStrings
			 TTL: (uint32_t)TTL OF_DESIGNATED_INITIALIZER;
@end

#ifdef __cplusplus
extern "C" {
#endif






extern OFString *_Nonnull OFDNSClassName(OFDNSClass DNSClass);







extern OFString *_Nonnull OFDNSRecordTypeName(OFDNSRecordType recordType);







extern OFDNSClass OFDNSClassParseName(OFString *_Nonnull string);







extern OFDNSRecordType OFDNSRecordTypeParseName(OFString *_Nonnull string);
#ifdef __cplusplus
}
#endif

OF_ASSUME_NONNULL_END







>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>
>

>
>
>
>
>
>
>






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
		 textStrings: (OFArray OF_GENERIC(OFData *) *)textStrings
			 TTL: (uint32_t)TTL OF_DESIGNATED_INITIALIZER;
@end

#ifdef __cplusplus
extern "C" {
#endif
/**
 * @brief Returns the name for the specified OFDNSClass.
 *
 * @param DNSClass The OFDNSClass to return the name for
 * @return The name for the specified OFDNSClass
 */
extern OFString *_Nonnull OFDNSClassName(OFDNSClass DNSClass);

/**
 * @brief Returns the name for the specified OFDNSRecordType.
 *
 * @param recordType The OFDNSRecordType to return the name for
 * @return The name for the specified OFDNSRecordType
 */
extern OFString *_Nonnull OFDNSRecordTypeName(OFDNSRecordType recordType);

/**
 * @brief Parses the specified string as an @ref OFDNSClass.
 *
 * @param string The string to parse as an @ref OFDNSClass
 * @return The parsed OFDNSClass
 */
extern OFDNSClass OFDNSClassParseName(OFString *_Nonnull string);

/**
 * @brief Parses the specified string as an @ref OFDNSRecordType.
 *
 * @param string The string to parse as an @ref OFDNSRecordType
 * @return The parsed OFDNSRecordType
 */
extern OFDNSRecordType OFDNSRecordTypeParseName(OFString *_Nonnull string);
#ifdef __cplusplus
}
#endif

OF_ASSUME_NONNULL_END

Modified src/OFFileManager.m from [de0d7b0760] to [4897ac9203].

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
# include <proto/exec.h>
# include <proto/dos.h>
#endif

@interface OFDefaultFileManager: OFFileManager
@end

const OFFileAttributeKey OFFileSize = @"OFFileSize";
const OFFileAttributeKey OFFileType = @"OFFileType";
const OFFileAttributeKey OFFilePOSIXPermissions = @"OFFilePOSIXPermissions";
const OFFileAttributeKey OFFileOwnerAccountID = @"OFFileOwnerAccountID";
const OFFileAttributeKey OFFileGroupOwnerAccountID =
    @"OFFileGroupOwnerAccountID";
const OFFileAttributeKey OFFileOwnerAccountName = @"OFFileOwnerAccountName";
const OFFileAttributeKey OFFileGroupOwnerAccountName =
    @"OFFileGroupOwnerAccountName";
const OFFileAttributeKey OFFileLastAccessDate = @"OFFileLastAccessDate";
const OFFileAttributeKey OFFileModificationDate = @"OFFileModificationDate";
const OFFileAttributeKey OFFileStatusChangeDate = @"OFFileStatusChangeDate";
const OFFileAttributeKey OFFileCreationDate = @"OFFileCreationDate";
const OFFileAttributeKey OFFileSymbolicLinkDestination =
    @"OFFileSymbolicLinkDestination";

const OFFileAttributeType OFFileTypeRegular = @"OFFileTypeRegular";
const OFFileAttributeType OFFileTypeDirectory = @"OFFileTypeDirectory";
const OFFileAttributeType OFFileTypeSymbolicLink = @"OFFileTypeSymbolicLink";
const OFFileAttributeType OFFileTypeFIFO = @"OFFileTypeFIFO";
const OFFileAttributeType OFFileTypeCharacterSpecial =
    @"OFFileTypeCharacterSpecial";
const OFFileAttributeType OFFileTypeBlockSpecial = @"OFFileTypeBlockSpecial";
const OFFileAttributeType OFFileTypeSocket = @"OFFileTypeSocket";
const OFFileAttributeType OFFileTypeUnknown = @"OFFileTypeUnknown";

#ifdef OF_AMIGAOS4
# define CurrentDir(lock) SetCurrentDir(lock)
#endif

static OFFileManager *defaultManager;








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<







67
68
69
70
71
72
73















74









75
76
77
78
79
80
81
# include <proto/exec.h>
# include <proto/dos.h>
#endif

@interface OFDefaultFileManager: OFFileManager
@end
















#include "OFFileManager_constants.m"










#ifdef OF_AMIGAOS4
# define CurrentDir(lock) SetCurrentDir(lock)
#endif

static OFFileManager *defaultManager;

Added src/OFFileManager_constants.m version [e875ee7ab5].

















































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
/*
 * Copyright (c) 2008-2021 Jonathan Schleifer <js@nil.im>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

const OFFileAttributeKey OFFileSize = @"OFFileSize";
const OFFileAttributeKey OFFileType = @"OFFileType";
const OFFileAttributeKey OFFilePOSIXPermissions = @"OFFilePOSIXPermissions";
const OFFileAttributeKey OFFileOwnerAccountID = @"OFFileOwnerAccountID";
const OFFileAttributeKey OFFileGroupOwnerAccountID =
    @"OFFileGroupOwnerAccountID";
const OFFileAttributeKey OFFileOwnerAccountName = @"OFFileOwnerAccountName";
const OFFileAttributeKey OFFileGroupOwnerAccountName =
    @"OFFileGroupOwnerAccountName";
const OFFileAttributeKey OFFileLastAccessDate = @"OFFileLastAccessDate";
const OFFileAttributeKey OFFileModificationDate = @"OFFileModificationDate";
const OFFileAttributeKey OFFileStatusChangeDate = @"OFFileStatusChangeDate";
const OFFileAttributeKey OFFileCreationDate = @"OFFileCreationDate";
const OFFileAttributeKey OFFileSymbolicLinkDestination =
    @"OFFileSymbolicLinkDestination";

const OFFileAttributeType OFFileTypeRegular = @"OFFileTypeRegular";
const OFFileAttributeType OFFileTypeDirectory = @"OFFileTypeDirectory";
const OFFileAttributeType OFFileTypeSymbolicLink = @"OFFileTypeSymbolicLink";
const OFFileAttributeType OFFileTypeFIFO = @"OFFileTypeFIFO";
const OFFileAttributeType OFFileTypeCharacterSpecial =
    @"OFFileTypeCharacterSpecial";
const OFFileAttributeType OFFileTypeBlockSpecial = @"OFFileTypeBlockSpecial";
const OFFileAttributeType OFFileTypeSocket = @"OFFileTypeSocket";
const OFFileAttributeType OFFileTypeUnknown = @"OFFileTypeUnknown";

Modified src/OFList.h from [52cea62659] to [e9b48b38c5].

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
#endif
/*!
 * @brief Returns the next list item of the list item.
 *
 * @param listItem The list item for which the next list item should be returned
 * @return The next list item of the list item
 */
OFListItem OFListItemNext(OFListItem _Nonnull listItem);

/*!
 * @brief Returns the previous list item of the list item.
 *
 * @param listItem The list item for which the previous list item should be
 *		   returned
 * @return The previous list item of the list item
 */
OFListItem OFListItemPrevious(OFListItem _Nonnull listItem);

/*!
 * @brief Returns the object of the list item.
 *
 * @warning The returned object is not retained and autoreleased - this is the
 *	    caller's responsibility!
 *
 * @param listItem The list item for which the object should be returned
 * @return The object of the list item
 */
id OFListItemObject(OFListItem _Nonnull listItem);
#ifdef __cplusplus
}
#endif

/**
 * @class OFList OFList.h ObjFW/OFList.h
 *







|








|










|







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
#endif
/*!
 * @brief Returns the next list item of the list item.
 *
 * @param listItem The list item for which the next list item should be returned
 * @return The next list item of the list item
 */
extern OFListItem _Nullable OFListItemNext(OFListItem _Nonnull listItem);

/*!
 * @brief Returns the previous list item of the list item.
 *
 * @param listItem The list item for which the previous list item should be
 *		   returned
 * @return The previous list item of the list item
 */
extern OFListItem _Nullable OFListItemPrevious(OFListItem _Nonnull listItem);

/*!
 * @brief Returns the object of the list item.
 *
 * @warning The returned object is not retained and autoreleased - this is the
 *	    caller's responsibility!
 *
 * @param listItem The list item for which the object should be returned
 * @return The object of the list item
 */
extern id _Nonnull OFListItemObject(OFListItem _Nonnull listItem);
#ifdef __cplusplus
}
#endif

/**
 * @class OFList OFList.h ObjFW/OFList.h
 *

Modified src/OFObject.h from [256748162e] to [9706bbf5bc].

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
extern void *_Nullable objc_destructInstance(id _Nullable object);
# endif
#endif
extern id OFAllocObject(Class class_, size_t extraSize, size_t extraAlignment,
    void *_Nullable *_Nullable extra);
extern void OF_NO_RETURN_FUNC OFMethodNotFound(id self, SEL _cmd);








/**
 * @brief Returns 16 bit or non-cryptographical randomness.
 *
 * @return 16 bit or non-cryptographical randomness
 */
extern uint16_t OFRandom16(void);

/**
 * @brief Returns 32 bit or non-cryptographical randomness.
 *
 * @return 32 bit or non-cryptographical randomness
 */
extern uint32_t OFRandom32(void);

/**
 * @brief Returns 64 bit or non-cryptographical randomness.
 *
 * @return 64 bit or non-cryptographical randomness
 */
extern uint64_t OFRandom64(void);

/**
 * @brief Initializes the specified hash.
 *
 * @param hash A pointer to the hash to initialize
 */
extern void OFHashInit(unsigned long *_Nonnull hash);
#ifdef __cplusplus
}
#endif

OF_ASSUME_NONNULL_END

#include "OFBlock.h"







>
>
>
>
>
>
>




















<
<
<
<
<
<
<







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
extern void *_Nullable objc_destructInstance(id _Nullable object);
# endif
#endif
extern id OFAllocObject(Class class_, size_t extraSize, size_t extraAlignment,
    void *_Nullable *_Nullable extra);
extern void OF_NO_RETURN_FUNC OFMethodNotFound(id self, SEL _cmd);

/**
 * @brief Initializes the specified hash.
 *
 * @param hash A pointer to the hash to initialize
 */
extern void OFHashInit(unsigned long *_Nonnull hash);

/**
 * @brief Returns 16 bit or non-cryptographical randomness.
 *
 * @return 16 bit or non-cryptographical randomness
 */
extern uint16_t OFRandom16(void);

/**
 * @brief Returns 32 bit or non-cryptographical randomness.
 *
 * @return 32 bit or non-cryptographical randomness
 */
extern uint32_t OFRandom32(void);

/**
 * @brief Returns 64 bit or non-cryptographical randomness.
 *
 * @return 64 bit or non-cryptographical randomness
 */
extern uint64_t OFRandom64(void);







#ifdef __cplusplus
}
#endif

OF_ASSUME_NONNULL_END

#include "OFBlock.h"

Modified src/OFObject.m from [4833385eee] to [77711da280].

90
91
92
93
94
95
96








97
98
99
100
101
102
103
#define PRE_IVARS ((struct PreIvars *)(void *)((char *)self - PRE_IVARS_ALIGN))

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)







>
>
>
>
>
>
>
>







90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#define PRE_IVARS ((struct PreIvars *)(void *)((char *)self - PRE_IVARS_ALIGN))

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)

Modified src/OFOnce.h from [fd3b6fe4a7] to [dbf6773006].

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
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "objfw-defs.h"


#include "platform.h"


#if defined(OF_HAVE_PTHREADS)
# include <pthread.h>
typedef pthread_once_t OFOnceControl;
# define OFOnceControlInitValue PTHREAD_ONCE_INIT
#elif defined(OF_HAVE_ATOMIC_OPS)
typedef volatile int OFOnceControl;
# define OFOnceControlInitValue 0
#elif defined(OF_AMIGAOS) || !defined(OF_HAVE_THREADS)
typedef int OFOnceControl;
# define OFOnceControlInitValue 0
#endif



#ifdef __cplusplus
extern "C" {
#endif







extern void OFOnce(OFOnceControl *control, void (*func)(void));

#ifdef __cplusplus
}
#endif







>
|
>













>
>



>
>
>
>
>
>
>
|
>



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
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "objfw-defs.h"

#import "macros.h"

/** @file */

#if defined(OF_HAVE_PTHREADS)
# include <pthread.h>
typedef pthread_once_t OFOnceControl;
# define OFOnceControlInitValue PTHREAD_ONCE_INIT
#elif defined(OF_HAVE_ATOMIC_OPS)
typedef volatile int OFOnceControl;
# define OFOnceControlInitValue 0
#elif defined(OF_AMIGAOS) || !defined(OF_HAVE_THREADS)
typedef int OFOnceControl;
# define OFOnceControlInitValue 0
#endif

typedef void (*OFOnceFunction)(void);

#ifdef __cplusplus
extern "C" {
#endif
/**
 * @brief A method to call a function only once in a thread-safe manner.
 *
 * @param control The once control. This needs to be set to
 *	  OFOnceControlInitValue at compile time.
 * @param func The function to call only once
 */
extern void OFOnce(OFOnceControl *_Nonnull control,
    OFOnceFunction _Nonnull func);
#ifdef __cplusplus
}
#endif

Modified src/OFPBKDF2.h from [31c9840de8] to [c5d81514ad].

62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/**
 * @brief Derives a key from a password and a salt using PBKDF2.
 *
 * @note This will call @ref OFHMAC::reset on the `HMAC` first, making it
 *	 possible to reuse the `HMAC`, but also meaning all previous results
 *	 from the `HMAC` get invalidated if they have not been copied.
 *
 * @param param The parameters to use
 */
extern void OFPBKDF2(OFPBKDF2Parameters param);
#ifdef __cplusplus
}
#endif

OF_ASSUME_NONNULL_END







|

|





62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/**
 * @brief Derives a key from a password and a salt using PBKDF2.
 *
 * @note This will call @ref OFHMAC::reset on the `HMAC` first, making it
 *	 possible to reuse the `HMAC`, but also meaning all previous results
 *	 from the `HMAC` get invalidated if they have not been copied.
 *
 * @param parameters The parameters to use
 */
extern void OFPBKDF2(OFPBKDF2Parameters parameters);
#ifdef __cplusplus
}
#endif

OF_ASSUME_NONNULL_END

Modified src/OFRunLoop.m from [ab97878b5e] to [0ec2ab674a].

39
40
41
42
43
44
45

46
47
48
49
50
51
52
53
#import "OFSortedList.h"
#import "OFTimer.h"
#import "OFTimer+Private.h"
#import "OFDate.h"

#import "OFObserveFailedException.h"


const OFRunLoopMode OFDefaultRunLoopMode = @"OFDefaultRunLoopMode";
static OFRunLoop *mainRunLoop = nil;

@interface OFRunLoopState: OFObject
#ifdef OF_HAVE_SOCKETS
    <OFKernelEventObserverDelegate>
#endif
{







>
|







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#import "OFSortedList.h"
#import "OFTimer.h"
#import "OFTimer+Private.h"
#import "OFDate.h"

#import "OFObserveFailedException.h"

#include "OFRunLoop_constants.m"

static OFRunLoop *mainRunLoop = nil;

@interface OFRunLoopState: OFObject
#ifdef OF_HAVE_SOCKETS
    <OFKernelEventObserverDelegate>
#endif
{

Added src/OFRunLoop_constants.m version [e240ef8cad].

































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*
 * Copyright (c) 2008-2021 Jonathan Schleifer <js@nil.im>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

const OFRunLoopMode OFDefaultRunLoopMode = @"OFDefaultRunLoopMode";

Modified src/OFScrypt.h from [77947b171a] to [8506d6db7e].

66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
    size_t blockSize);
extern void OFScryptROMix(uint32_t *buffer, size_t blockSize,
    size_t costFactor, uint32_t *tmp);

/**
 * @brief Derives a key from a password and a salt using scrypt.
 *
 * @param param The parameters to use
 */
extern void OFScrypt(OFScryptParameters param);
#ifdef __cplusplus
}
#endif

OF_ASSUME_NONNULL_END







|

|





66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
    size_t blockSize);
extern void OFScryptROMix(uint32_t *buffer, size_t blockSize,
    size_t costFactor, uint32_t *tmp);

/**
 * @brief Derives a key from a password and a salt using scrypt.
 *
 * @param parameters The parameters to use
 */
extern void OFScrypt(OFScryptParameters parameters);
#ifdef __cplusplus
}
#endif

OF_ASSUME_NONNULL_END

Modified src/OFStdIOStream.h from [56543eac46] to [4b04bb450d].

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
@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 Log the specified printf-style format to @ref OFStdErr.
 *
 * This prefixes the output with the date, timestamp, process name and PID and
 * allows `%@` as a printf-style formatted to print objects.
 */
extern void OFLog(OFConstantString *format, ...);








#ifdef __cplusplus
}
#endif

OF_ASSUME_NONNULL_END







>














>
>
>
>
>
>
>
>


|





>
>
>
>
>
>
>
>





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
@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 and
 * allows `%@` as a printf-style formatted to print objects.
 */
extern void OFLog(OFConstantString *format, ...);

/*!
 * @brief Logs the specified printf-style format to @ref OFStdErr.
 *
 * This prefixes the output with the date, timestamp, process name and PID and
 * allows `%@` as a printf-style formatted to print objects.
 */
extern void OFLogV(OFConstantString *format, va_list arguments);
#ifdef __cplusplus
}
#endif

OF_ASSUME_NONNULL_END

Modified src/OFStdIOStream.m from [a9dd0b73a2] to [2787693b17].

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
#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];
}
#endif

void
OFLog(OFConstantString *format, ...)
{










	void *pool = objc_autoreleasePoolPush();
	OFDate *date;
	OFString *dateString, *me, *msg;
	va_list arguments;

	date = [OFDate date];
	dateString = [date localDateStringWithFormat: @"%Y-%m-%d %H:%M:%S"];
#ifdef OF_HAVE_FILES
	me = [OFApplication programName].lastPathComponent;
#else
	me = [OFApplication programName];
#endif

	va_start(arguments, format);
	msg = [[[OFString alloc] initWithFormat: format
				      arguments: arguments] autorelease];
	va_end(arguments);

	[OFStdErr writeFormat: @"[%@.%03d %@(%d)] %@\n", dateString,
			       date.microsecond / 1000, me, getpid(), msg];

	objc_autoreleasePoolPop(pool);
}








>
>
>
>
>
>




>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>













>
>
>
>
>
>
>
>
>
>



<









<


<







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
#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];
}
#endif

void
OFLog(OFConstantString *format, ...)
{
	va_list arguments;

	va_start(arguments, format);
	OFLogV(format, arguments);
	va_end(arguments);
}

void
OFLogV(OFConstantString *format, va_list arguments)
{
	void *pool = objc_autoreleasePoolPush();
	OFDate *date;
	OFString *dateString, *me, *msg;


	date = [OFDate date];
	dateString = [date localDateStringWithFormat: @"%Y-%m-%d %H:%M:%S"];
#ifdef OF_HAVE_FILES
	me = [OFApplication programName].lastPathComponent;
#else
	me = [OFApplication programName];
#endif


	msg = [[[OFString alloc] initWithFormat: format
				      arguments: arguments] autorelease];


	[OFStdErr writeFormat: @"[%@.%03d %@(%d)] %@\n", dateString,
			       date.microsecond / 1000, me, getpid(), msg];

	objc_autoreleasePoolPop(pool);
}

Modified src/OFStrPTime.h from [4d3408cfa3] to [fd2cee796f].

25
26
27
28
29
30
31
32
33
34
35
36
37
38
#import "macros.h"

OF_ASSUME_NONNULL_BEGIN

#ifdef __cplusplus
extern "C" {
#endif
extern const char *OFStrPTime(const char *buf, const char *fmt, struct tm *tm,
    short *tz);
#ifdef __cplusplus
}
#endif

OF_ASSUME_NONNULL_END







|
|





25
26
27
28
29
30
31
32
33
34
35
36
37
38
#import "macros.h"

OF_ASSUME_NONNULL_BEGIN

#ifdef __cplusplus
extern "C" {
#endif
extern const char *_Nullable OFStrPTime(const char *buffer, const char *format,
    struct tm *tm, short *tz);
#ifdef __cplusplus
}
#endif

OF_ASSUME_NONNULL_END

Added src/amiga-end.m version [0b9bd66660].































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
/*
 * Copyright (c) 2008-2021 Jonathan Schleifer <js@nil.im>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#import "platform.h"

#ifdef OF_MORPHOS
__asm__ (
    ".section .eh_frame, \"aw\"\n"
    "	.long 0\n"
    ".section .ctors, \"aw\"\n"
    "	.long 0"
);
#else
__asm__ (
    ""
);
#endif

Added src/amiga-funcarray.inc version [4661af4786].



















































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
/*
 * Copyright (c) 2008-2021 Jonathan Schleifer <js@nil.im>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

/* 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_OFHTTPRequestMethodName,
(CONST_APTR)glue_OFHTTPRequestMethodParseName,
(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_OFPBKDF2,
(CONST_APTR)glue_OFScrypt,
(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_OFSocketAddressMakeIPX,
(CONST_APTR)glue_OFSocketAddressEqual,
(CONST_APTR)glue_OFSocketAddressHash,
(CONST_APTR)glue_OFSocketAddressString,
(CONST_APTR)glue_OFSocketAddressSetPort,
(CONST_APTR)glue_OFSocketAddressPort,
(CONST_APTR)glue_OFSocketAddressSetIPXNetwork,
(CONST_APTR)glue_OFSocketAddressIPXNetwork,
(CONST_APTR)glue_OFSocketAddressSetIPXNode,
(CONST_APTR)glue_OFSocketAddressIPXNode,
(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-glue.h version [5f8aad8c81].











































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
/*
 * Copyright (c) 2008-2021 Jonathan Schleifer <js@nil.im>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

/* 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 "OFHTTPRequest.h"
#import "OFHTTPResponse.h"
#import "OFList.h"
#import "OFMethodSignature.h"
#import "OFOnce.h"
#import "OFPBKDF2.h"
#import "OFScrypt.h"
#import "OFSocket.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, FILE *_Nonnull *_Nonnull sF);
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 const char *_Nullable glue_OFHTTPRequestMethodName PPC_PARAMS(OFHTTPRequestMethod method);
extern OFHTTPRequestMethod glue_OFHTTPRequestMethodParseName 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_OFPBKDF2 PPC_PARAMS(OFPBKDF2Parameters parameters);
extern void glue_OFScrypt PPC_PARAMS(OFScryptParameters 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_OFSocketAddressMakeIPX PPC_PARAMS(const unsigned char *_Nonnull node, uint32_t network, uint16_t port);
extern bool glue_OFSocketAddressEqual PPC_PARAMS(const OFSocketAddress *_Nonnull address1, const OFSocketAddress *_Nonnull address2);
extern unsigned long glue_OFSocketAddressHash PPC_PARAMS(const OFSocketAddress *_Nonnull address);
extern OFString *_Nonnull glue_OFSocketAddressString PPC_PARAMS(const OFSocketAddress *_Nonnull address);
extern void glue_OFSocketAddressSetPort PPC_PARAMS(OFSocketAddress *_Nonnull address, uint16_t port);
extern uint16_t glue_OFSocketAddressPort PPC_PARAMS(const OFSocketAddress *_Nonnull address);
extern void glue_OFSocketAddressSetIPXNetwork PPC_PARAMS(OFSocketAddress *_Nonnull address, uint32_t network);
extern uint32_t glue_OFSocketAddressIPXNetwork PPC_PARAMS(const OFSocketAddress *_Nonnull address);
extern void glue_OFSocketAddressSetIPXNode PPC_PARAMS(OFSocketAddress *_Nonnull address, const unsigned char *_Nonnull node);
extern void glue_OFSocketAddressIPXNode PPC_PARAMS(const OFSocketAddress *_Nonnull address, unsigned char *_Nonnull node);
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-glue.m version [4ee8e2fbd6].































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
/*
 * Copyright (c) 2008-2021 Jonathan Schleifer <js@nil.im>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

/* This file is automatically generated from amiga-library.xml */

#include "config.h"

#import "amiga-glue.h"

#ifdef OF_MORPHOS
/* All __saveds functions in this file need to use the SysV ABI */
__asm__ (
    ".section .text\n"
    ".align 2\n"
    "__restore_r13:\n"
    "	lwz	%r13, 44(%r12)\n"
    "	blr\n"
);
#endif

bool __saveds
glue_OFInit PPC_PARAMS(unsigned int version, struct OFLibC *_Nonnull libc, FILE *_Nonnull *_Nonnull sF)
{
	M68K_ARG(unsigned int, version, d0)
	M68K_ARG(struct OFLibC *_Nonnull, libc, a0)
	M68K_ARG(FILE *_Nonnull *_Nonnull, sF, a1)

	return OFInit(version, libc, sF);
}

void *_Nullable __saveds
glue_OFAllocMemory PPC_PARAMS(size_t count, size_t size)
{
	M68K_ARG(size_t, count, d0)
	M68K_ARG(size_t, size, d1)

	return OFAllocMemory(count, size);
}

void *_Nullable __saveds
glue_OFAllocZeroedMemory PPC_PARAMS(size_t count, size_t size)
{
	M68K_ARG(size_t, count, d0)
	M68K_ARG(size_t, size, d1)

	return OFAllocZeroedMemory(count, size);
}

void *_Nullable __saveds
glue_OFResizeMemory PPC_PARAMS(void *_Nullable pointer, size_t count, size_t size)
{
	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 PPC_PARAMS(void *_Nullable pointer)
{
	M68K_ARG(void *_Nullable, pointer, a0)

	OFFreeMemory(pointer);
}

void __saveds
glue_OFHashInit PPC_PARAMS(unsigned long *_Nonnull hash)
{
	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 PPC_PARAMS(OFConstantString *format, va_list arguments)
{
	M68K_ARG(OFConstantString *, format, a0)
	M68K_ARG(va_list, arguments, a1)

	OFLogV(format, arguments);
}

int __saveds
glue_OFApplicationMain PPC_PARAMS(int *_Nonnull argc, char *_Nullable *_Nonnull *_Nonnull argv, id <OFApplicationDelegate> delegate)
{
	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 PPC_PARAMS(const void *_Nullable block)
{
	M68K_ARG(const void *_Nullable, block, a0)

	return _Block_copy(block);
}

void __saveds
glue__Block_release PPC_PARAMS(const void *_Nullable block)
{
	M68K_ARG(const void *_Nullable, block, a0)

	_Block_release(block);
}

OFString *_Nonnull __saveds
glue_OFDNSClassName PPC_PARAMS(OFDNSClass DNSClass)
{
	M68K_ARG(OFDNSClass, DNSClass, d0)

	return OFDNSClassName(DNSClass);
}

OFString *_Nonnull __saveds
glue_OFDNSRecordTypeName PPC_PARAMS(OFDNSRecordType recordType)
{
	M68K_ARG(OFDNSRecordType, recordType, d0)

	return OFDNSRecordTypeName(recordType);
}

OFDNSClass __saveds
glue_OFDNSClassParseName PPC_PARAMS(OFString *_Nonnull string)
{
	M68K_ARG(OFString *_Nonnull, string, a0)

	return OFDNSClassParseName(string);
}

OFDNSRecordType __saveds
glue_OFDNSRecordTypeParseName PPC_PARAMS(OFString *_Nonnull string)
{
	M68K_ARG(OFString *_Nonnull, string, a0)

	return OFDNSRecordTypeParseName(string);
}

const char *_Nullable __saveds
glue_OFHTTPRequestMethodName PPC_PARAMS(OFHTTPRequestMethod method)
{
	M68K_ARG(OFHTTPRequestMethod, method, d0)

	return OFHTTPRequestMethodName(method);
}

OFHTTPRequestMethod __saveds
glue_OFHTTPRequestMethodParseName PPC_PARAMS(OFString *string)
{
	M68K_ARG(OFString *, string, a0)

	return OFHTTPRequestMethodParseName(string);
}

OFString *_Nonnull __saveds
glue_OFHTTPStatusCodeString PPC_PARAMS(short code)
{
	M68K_ARG(short, code, d0)

	return OFHTTPStatusCodeString(code);
}

OFListItem _Nullable __saveds
glue_OFListItemNext PPC_PARAMS(OFListItem _Nonnull listItem)
{
	M68K_ARG(OFListItem _Nonnull, listItem, a0)

	return OFListItemNext(listItem);
}

OFListItem _Nullable __saveds
glue_OFListItemPrevious PPC_PARAMS(OFListItem _Nonnull listItem)
{
	M68K_ARG(OFListItem _Nonnull, listItem, a0)

	return OFListItemPrevious(listItem);
}

id _Nonnull __saveds
glue_OFListItemObject PPC_PARAMS(OFListItem _Nonnull listItem)
{
	M68K_ARG(OFListItem _Nonnull, listItem, a0)

	return OFListItemObject(listItem);
}

size_t __saveds
glue_OFSizeOfTypeEncoding PPC_PARAMS(const char *type)
{
	M68K_ARG(const char *, type, a0)

	return OFSizeOfTypeEncoding(type);
}

size_t __saveds
glue_OFAlignmentOfTypeEncoding PPC_PARAMS(const char *type)
{
	M68K_ARG(const char *, type, a0)

	return OFAlignmentOfTypeEncoding(type);
}

void __saveds
glue_OFOnce PPC_PARAMS(OFOnceControl *_Nonnull control, OFOnceFunction _Nonnull func)
{
	M68K_ARG(OFOnceControl *_Nonnull, control, (nil))
	M68K_ARG(OFOnceFunction _Nonnull, func, (nil))

	OFOnce(control, func);
}

void __saveds
glue_OFPBKDF2 PPC_PARAMS(OFPBKDF2Parameters parameters)
{
	M68K_ARG(OFPBKDF2Parameters, parameters, a0)

	OFPBKDF2(parameters);
}

void __saveds
glue_OFScrypt PPC_PARAMS(OFScryptParameters parameters)
{
	M68K_ARG(OFScryptParameters, parameters, a0)

	OFScrypt(parameters);
}

void __saveds
glue_OFSalsa20_8Core PPC_PARAMS(uint32_t *_Nonnull buffer)
{
	M68K_ARG(uint32_t *_Nonnull, buffer, a0)

	OFSalsa20_8Core(buffer);
}

void __saveds
glue_OFScryptBlockMix PPC_PARAMS(uint32_t *_Nonnull output, const uint32_t *_Nonnull input, size_t blockSize)
{
	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 PPC_PARAMS(uint32_t *buffer, size_t blockSize, size_t costFactor, uint32_t *tmp)
{
	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 PPC_PARAMS(OFString *IP, uint16_t port)
{
	M68K_ARG(OFString *, IP, a0)
	M68K_ARG(uint16_t, port, d0)

	return OFSocketAddressParseIP(IP, port);
}

OFSocketAddress __saveds
glue_OFSocketAddressParseIPv4 PPC_PARAMS(OFString *IP, uint16_t port)
{
	M68K_ARG(OFString *, IP, a0)
	M68K_ARG(uint16_t, port, d0)

	return OFSocketAddressParseIPv4(IP, port);
}

OFSocketAddress __saveds
glue_OFSocketAddressParseIPv6 PPC_PARAMS(OFString *IP, uint16_t port)
{
	M68K_ARG(OFString *, IP, a0)
	M68K_ARG(uint16_t, port, d0)

	return OFSocketAddressParseIPv6(IP, port);
}

OFSocketAddress __saveds
glue_OFSocketAddressMakeIPX PPC_PARAMS(const unsigned char *_Nonnull node, uint32_t network, uint16_t port)
{
	M68K_ARG(const unsigned char *_Nonnull, node, a0)
	M68K_ARG(uint32_t, network, d0)
	M68K_ARG(uint16_t, port, d1)

	return OFSocketAddressMakeIPX(node, network, port);
}

bool __saveds
glue_OFSocketAddressEqual PPC_PARAMS(const OFSocketAddress *_Nonnull address1, const OFSocketAddress *_Nonnull address2)
{
	M68K_ARG(const OFSocketAddress *_Nonnull, address1, a0)
	M68K_ARG(const OFSocketAddress *_Nonnull, address2, a1)

	return OFSocketAddressEqual(address1, address2);
}

unsigned long __saveds
glue_OFSocketAddressHash PPC_PARAMS(const OFSocketAddress *_Nonnull address)
{
	M68K_ARG(const OFSocketAddress *_Nonnull, address, a0)

	return OFSocketAddressHash(address);
}

OFString *_Nonnull __saveds
glue_OFSocketAddressString PPC_PARAMS(const OFSocketAddress *_Nonnull address)
{
	M68K_ARG(const OFSocketAddress *_Nonnull, address, a0)

	return OFSocketAddressString(address);
}

void __saveds
glue_OFSocketAddressSetPort PPC_PARAMS(OFSocketAddress *_Nonnull address, uint16_t port)
{
	M68K_ARG(OFSocketAddress *_Nonnull, address, a0)
	M68K_ARG(uint16_t, port, d0)

	OFSocketAddressSetPort(address, port);
}

uint16_t __saveds
glue_OFSocketAddressPort PPC_PARAMS(const OFSocketAddress *_Nonnull address)
{
	M68K_ARG(const OFSocketAddress *_Nonnull, address, a0)

	return OFSocketAddressPort(address);
}

void __saveds
glue_OFSocketAddressSetIPXNetwork PPC_PARAMS(OFSocketAddress *_Nonnull address, uint32_t network)
{
	M68K_ARG(OFSocketAddress *_Nonnull, address, a0)
	M68K_ARG(uint32_t, network, d0)

	OFSocketAddressSetIPXNetwork(address, network);
}

uint32_t __saveds
glue_OFSocketAddressIPXNetwork PPC_PARAMS(const OFSocketAddress *_Nonnull address)
{
	M68K_ARG(const OFSocketAddress *_Nonnull, address, a0)

	return OFSocketAddressIPXNetwork(address);
}

void __saveds
glue_OFSocketAddressSetIPXNode PPC_PARAMS(OFSocketAddress *_Nonnull address, const unsigned char *_Nonnull node)
{
	M68K_ARG(OFSocketAddress *_Nonnull, address, a0)
	M68K_ARG(const unsigned char *_Nonnull, node, a1)

	OFSocketAddressSetIPXNode(address, node);
}

void __saveds
glue_OFSocketAddressIPXNode PPC_PARAMS(const OFSocketAddress *_Nonnull address, unsigned char *_Nonnull node)
{
	M68K_ARG(const OFSocketAddress *_Nonnull, address, a0)
	M68K_ARG(unsigned char *_Nonnull, node, a1)

	OFSocketAddressIPXNode(address, node);
}

const char *_Nullable __saveds
glue_OFStrPTime PPC_PARAMS(const char *buffer, const char *format, struct tm *tm, int16_t *_Nullable tz)
{
	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 PPC_PARAMS(OFString *string)
{
	M68K_ARG(OFString *, string, a0)

	return OFStringEncodingParseName(string);
}

OFString *_Nullable __saveds
glue_OFStringEncodingName PPC_PARAMS(OFStringEncoding encoding)
{
	M68K_ARG(OFStringEncoding, encoding, d0)

	return OFStringEncodingName(encoding);
}

size_t __saveds
glue_OFUTF16StringLength PPC_PARAMS(const OFChar16 *string)
{
	M68K_ARG(const OFChar16 *, string, a0)

	return OFUTF16StringLength(string);
}

size_t __saveds
glue_OFUTF32StringLength PPC_PARAMS(const OFChar32 *string)
{
	M68K_ARG(const OFChar32 *, string, a0)

	return OFUTF32StringLength(string);
}

OFString *_Nonnull __saveds
glue_OFZIPArchiveEntryVersionToString PPC_PARAMS(uint16_t version)
{
	M68K_ARG(uint16_t, version, d0)

	return OFZIPArchiveEntryVersionToString(version);
}

OFString *_Nonnull __saveds
glue_OFZIPArchiveEntryCompressionMethodName PPC_PARAMS(OFZIPArchiveEntryCompressionMethod compressionMethod)
{
	M68K_ARG(OFZIPArchiveEntryCompressionMethod, compressionMethod, d0)

	return OFZIPArchiveEntryCompressionMethodName(compressionMethod);
}

size_t __saveds
glue_OFZIPArchiveEntryExtraFieldFind PPC_PARAMS(OFData *extraField, OFZIPArchiveEntryExtraFieldTag tag, uint16_t *size)
{
	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 version [5c085b12df].























































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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-2021 Jonathan Schleifer <js@nil.im>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "macros.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

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);
	int (*_Nonnull vfprintf)(FILE *_Nonnull restrict,
	    const char *_Nonnull restrict, va_list);
	int (*_Nonnull fflush)(FILE *_Nonnull);
	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. */
	int (*_Nonnull vsnprintf)(char *_Nonnull restrict, size_t,
	    const char *_Nonnull restrict, va_list);
#ifdef OF_AMIGAOS_M68K
	/* strtod() uses sscanf() internally */
	int (*_Nonnull vsscanf)(const char *_Nonnull restrict,
	    const char *_Nonnull restrict, va_list);
#endif
	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);
};

extern bool OFInit(unsigned int version, struct OFLibC *libC, FILE **sF);
extern unsigned long *OFHashSeedRef(void);

Added src/amiga-library.m version [fdc1473cd0].



























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
/*
 * Copyright (c) 2008-2021 Jonathan Schleifer <js@nil.im>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#include <exec/libraries.h>
#include <exec/nodes.h>
#include <exec/resident.h>
#include <proto/exec.h>

#import "OFDNSResourceRecord.h"
#import "OFHTTPRequest.h"
#import "OFSocket.h"
#import "OFStdIOStream.h"
#import "OFString.h"

#import "amiga-library.h"
#import "macros.h"

#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()
{
	return -1;
}

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

#include "amiga-glue.h"

#ifdef OF_AMIGAOS_M68K
void
__init_eh(void)
{
	/* Taken care of by OFInit() */
}
#endif

#ifdef OF_MORPHOS
const ULONG __abox__ = 1;
#endif
struct ExecBase *SysBase;
struct OFLibC libC;
FILE **__sF;

#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 (size_t i = 1; i <= (size_t)_EH_FRAME_BEGINS__; i++)
				libC.__deregister_frame_info(
				    (&_EH_FRAME_BEGINS__)[i]);
#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;
}

bool __saveds
OFInit(unsigned int version, struct OFLibC *libC_, FILE **sF)
{
#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 *iter, *iter0;

	if (version > 1)
		return false;

	if (base->initialized)
		return true;

	memcpy(&libC, libC_, sizeof(libC));
	__sF = sF;

#ifdef OF_AMIGAOS_M68K
	if ((size_t)_EH_FRAME_BEGINS__ != (size_t)_EH_FRAME_OBJECTS__)
		return false;

	for (size_t i = 1; i <= (size_t)_EH_FRAME_BEGINS__; i++)
		libC.__register_frame_info((&_EH_FRAME_BEGINS__)[i],
		    (&_EH_FRAME_OBJECTS__)[i]);

	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

	for (iter = iter0; *iter != 0; iter++);

	while (iter > iter0) {
		void (*ctor)(void) = (void (*)(void))*--iter;
		ctor();
	}

	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);
}

int
fprintf(FILE *restrict stream, const char *restrict fmt, ...)
{
	int ret;
	va_list args;

	va_start(args, fmt);
	ret = libC.vfprintf(stream, fmt, args);
	va_end(args);

	return ret;
}

int
vfprintf(FILE *restrict stream, const char *restrict fmt, va_list args)
{
	return libC.vfprintf(stream, fmt, args);
}

int
fflush(FILE *restrict stream)
{
	return libC.fflush(stream);
}

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();
}

int
vsnprintf(char *restrict str, size_t size, const char *restrict fmt,
    va_list args)
{
	return libC.vsnprintf(str, size, fmt, args);
}

#ifdef OF_AMIGAOS_M68K
int
sscanf(const char *restrict str, const char *restrict fmt, ...)
{
	int ret;
	va_list args;

	va_start(args, fmt);
	ret = libC.vsscanf(str, fmt, args);
	va_end(args);

	return ret;
}
#endif

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);
}

#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-2021 Jonathan Schleifer",
	.rt_Init = &init_table,
#ifdef OF_MORPHOS
	.rt_Revision = OBJFW_LIB_MINOR,
	.rt_Tags = NULL,
#endif
};

#ifdef 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"
);
#endif

Added src/amiga-library.xml version [25b5953f80].





























































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
<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='sF' type='FILE *_Nonnull *_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>OFHTTPRequest.h</include>
  <function name='OFHTTPRequestMethodName' return-type='const char *_Nullable'>
    <argument name='method' type='OFHTTPRequestMethod' m68k-reg='d0'/>
  </function>
  <function name='OFHTTPRequestMethodParseName'
            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-arg='a0'/>
    <argument name='func' type='OFOnceFunction _Nonnull' m68k-arg='a1'/>
  </function>
  <include>OFPBKDF2.h</include>
  <function name='OFPBKDF2'>
    <argument name='parameters' type='OFPBKDF2Parameters' m68k-reg='a0'/>
  </function>
  <include>OFScrypt.h</include>
  <function name='OFScrypt'>
    <argument name='parameters' type='OFScryptParameters' 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='OFSocketAddressMakeIPX' return-type='OFSocketAddress'>
    <argument name='node' type='const unsigned char *_Nonnull' m68k-reg='a0'/>
    <argument name='network' type='uint32_t' m68k-reg='d0'/>
    <argument name='port' type='uint16_t' m68k-reg='d1'/>
  </function>
  <function name='OFSocketAddressEqual' return-type='bool'>
    <argument name='address1' type='const OFSocketAddress *_Nonnull'
              m68k-reg='a0'/>
    <argument name='address2' type='const OFSocketAddress *_Nonnull'
              m68k-reg='a1'/>
  </function>
  <function name='OFSocketAddressHash' return-type='unsigned long'>
    <argument name='address' type='const OFSocketAddress *_Nonnull'
              m68k-reg='a0'/>
  </function>
  <function name='OFSocketAddressString' return-type='OFString *_Nonnull'>
    <argument name='address' type='const OFSocketAddress *_Nonnull'
              m68k-reg='a0'/>
  </function>
  <function name='OFSocketAddressSetPort'>
    <argument name='address' type='OFSocketAddress *_Nonnull' m68k-reg='a0'/>
    <argument name='port' type='uint16_t' m68k-reg='d0'/>
  </function>
  <function name='OFSocketAddressPort' return-type='uint16_t'>
    <argument name='address' type='const OFSocketAddress *_Nonnull'
              m68k-reg='a0'/>
  </function>
  <function name='OFSocketAddressSetIPXNetwork'>
    <argument name='address' type='OFSocketAddress *_Nonnull' 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 *_Nonnull'
              m68k-reg='a0'/>
  </function>
  <function name='OFSocketAddressSetIPXNode'>
    <argument name='address' type='OFSocketAddress *_Nonnull'
              m68k-reg='a0'/>
    <argument name='node' type='const unsigned char *_Nonnull' m68k-reg='a1'/>
  </function>
  <function name='OFSocketAddressIPXNode'>
    <argument name='address' type='const OFSocketAddress *_Nonnull'
              m68k-reg='a0'/>
    <argument name='node' type='unsigned char *_Nonnull' m68k-reg='a1'/>
  </function>
  <!-- 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>

Modified src/encodings/Makefile from [7b7ddcc159] to [e31bf38bd6].

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

Modified src/exceptions/Makefile from [351e362627] to [dbddffb6d5].

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				\
       OFChangeCurrentDirectoryPathFailedException.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				\
       OFChangeCurrentDirectoryPathFailedException.m	\
       OFChecksumMismatchException.m			\
       OFCopyItemFailedException.m			\
       OFCreateDirectoryFailedException.m		\
       OFCreateSymbolicLinkFailedException.m		\

Modified src/forwarding/Makefile from [e70b0ece60] to [33d5bd8f87].

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..

Modified src/libbases.m from [b78c4ad04b] to [07ee85cb4e].

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

#include <proto/exec.h>

#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()
{
#ifdef OF_AMIGAOS4
	if ((DOSBase = OpenLibrary("dos.library", 36)) == NULL)
		@throw [OFInitializationFailedException exception];



	if ((IDOS = (struct DOSIFace *)
	    GetInterface(DOSBase, "main", 1, NULL)) == NULL)
		@throw [OFInitializationFailedException exception];
#endif

	if ((LocaleBase = OpenLibrary("locale.library", 38)) == NULL)
		@throw [OFInitializationFailedException exception];







>
>
>











|


>

>







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

#include <proto/exec.h>

#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];
58
59
60
61
62
63
64
65
66
67
68
69
70
71





		DropInterface((struct Interface *)ILocale);
#endif

	if (LocaleBase != NULL)
		CloseLibrary(LocaleBase);

#ifdef OF_AMIGAOS4
	if (DOSBase != NULL)
		CloseLibrary(DOSBase);

	if (IDOS != NULL)
		DropInterface((struct Interface *)IDOS);
#endif
}












<
<
<



|
>
>
>
>
>
63
64
65
66
67
68
69



70
71
72
73
74
75
76
77
78
		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 version [09b220af0c].























>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
include ../../extra.mk

STATIC_LIB = libobjfw.library.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}

Added src/linklib/init.m version [911e384ae6].























































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
/*
 * Copyright (c) 2008-2021 Jonathan Schleifer <js@nil.im>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#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 "macros.h"
#import "amiga-library.h"

#include <proto/exec.h>
#include <proto/intuition.h>

struct ObjFWBase;

#if defined(OF_AMIGAOS_M68K)
# include <stabs.h>
#elif defined(OF_MORPHOS)
# include <constructor.h>
#endif

#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_OFASN1BitString;
void *__objc_class_name_OFASN1Boolean;
void *__objc_class_name_OFASN1Enumerated;
void *__objc_class_name_OFASN1IA5String;
void *__objc_class_name_OFASN1Integer;
void *__objc_class_name_OFASN1NumericString;
void *__objc_class_name_OFASN1ObjectIdentifier;
void *__objc_class_name_OFASN1OctetString;
void *__objc_class_name_OFASN1PrintableString;
void *__objc_class_name_OFASN1UTF8String;
void *__objc_class_name_OFASN1Value;
void *__objc_class_name_OFApplication;
void *__objc_class_name_OFArray;
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_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_OFMapTable;
void *__objc_class_name_OFMapTableEnumerator;
void *__objc_class_name_OFMD5Hash;
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_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_OFMutableURL;
void *__objc_class_name_OFMutableZIPArchiveEntry;
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_OFSandbox;
void *__objc_class_name_OFSecureData;
void *__objc_class_name_OFSeekableStream;
void *__objc_class_name_OFSet;
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_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_OFURL;
void *__objc_class_name_OFURLHandler;
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;
void *__objc_class_name_OFINICategory;
void *__objc_class_name_OFINIFile;
void *__objc_class_name_OFSettings;
#endif
#ifdef OF_HAVE_SOCKETS
void *__objc_class_name_OFDNSQuery;
void *__objc_class_name_OFDNSResolver;
void *__objc_class_name_OFDNSResourceRecord;
void *__objc_class_name_OFADNSResourceRecord;
void *__objc_class_name_OFAAAADNSResourceRecord;
void *__objc_class_name_OFCNAMEDNSResourceRecord;
void *__objc_class_name_OFHINFODNSResourceRecord;
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_OFTXTDNSResourceRecord;
void *__objc_class_name_OFDNSResponse;
void *__objc_class_name_OFDatagramSocket;
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_OFSequencedPacketSocket;
void *__objc_class_name_OFStreamSocket;
void *__objc_class_name_OFTCPSocket;
void *__objc_class_name_OFUDPSocket;
void *__objc_class_name_OFKernelEventObserver;
#endif
#ifdef OF_HAVE_THREADS
void *__objc_class_name_OFCondition;
void *__objc_class_name_OFMutex;
void *__objc_class_name_OFRecursiveMutex;
void *__objc_class_name_OFThreadPool;
#endif
void *__objc_class_name_OFAllocFailedException;
void *__objc_class_name_OFChangeCurrentDirectoryPathFailedException;
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_OFGetOptionFailedException;
void *__objc_class_name_OFHashAlreadyCalculatedException;
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_OFInvalidServerReplyException;
void *__objc_class_name_OFLinkFailedException;
void *__objc_class_name_OFLockFailedException;
void *__objc_class_name_OFMalformedXMLException;
void *__objc_class_name_OFMemoryNotPartOfObjectException;
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_OFRetrieveItemAttributesFailedException;
void *__objc_class_name_OFSandboxActivationFailedException;
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_OFGetCurrentDirectoryPathFailedException;
#endif
#ifdef OF_HAVE_SOCKETS
void *__objc_class_name_OFAcceptFailedException;
void *__objc_class_name_OFAlreadyConnectedException;
void *__objc_class_name_OFBindFailedException;
void *__objc_class_name_OFConnectionFailedException;
void *__objc_class_name_OFDNSQueryFailedException;
void *__objc_class_name_OFHTTPRequestFailedException;
void *__objc_class_name_OFListenFailedException;
void *__objc_class_name_OFObserveFailedException;
void *__objc_class_name_OFResolveHostFailedException;
#endif
#ifdef OF_HAVE_THREADS
void *__objc_class_name_OFConditionBroadcastFailedException;
void *__objc_class_name_OFConditionSignalFailedException;
void *__objc_class_name_OFConditionStillWaitingException;
void *__objc_class_name_OFConditionWaitFailedException;
void *__objc_class_name_OFThreadJoinFailedException;
void *__objc_class_name_OFThreadStartFailedException;
void *__objc_class_name_OFThreadStillRunningException;
#endif
#include "OFFileManager_constants.m"
#include "OFRunLoop_constants.m"
/* The following __objc_class_name_* are only required for the tests. */
void *__objc_class_name_OFBitSetCharacterSet;
void *__objc_class_name_OFMapTableSet;
void *__objc_class_name_OFMutableMapTableSet;
void *__objc_class_name_OFMutableUTF8String;
void *__objc_class_name_OFRangeCharacterSet;
void *__objc_class_name_OFSelectKernelEventObserver;
void *__objc_class_name_OFUTF8String;

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,
		.vfprintf = vfprintf,
		.fflush = fflush,
		.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,
		.vsnprintf = vsnprintf,
#ifdef OF_AMIGAOS_M68K
		.vsscanf = vsscanf,
#endif
		.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, __sF))
		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, 4000)
{
	ctor();

	return 0;
}

DESTRUCTOR_P(ObjFW, 4000)
{
	dtor();
}
#endif

Added src/linklib/linklib.m version [90370ec947].





























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
/*
 * Copyright (c) 2008-2021 Jonathan Schleifer <js@nil.im>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

/* 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 "OFHTTPRequest.h"
#import "OFHTTPResponse.h"
#import "OFList.h"
#import "OFMethodSignature.h"
#import "OFOnce.h"
#import "OFPBKDF2.h"
#import "OFScrypt.h"
#import "OFSocket.h"
#import "OFStrPTime.h"
#import "OFString.h"
#import "OFZIPArchiveEntry.h"

extern struct Library *ObjFWBase;

bool
OFInit(unsigned int version, struct OFLibC *_Nonnull libc, FILE *_Nonnull *_Nonnull sF)
{
#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"), FILE *_Nonnull *_Nonnull __asm__("a1")))(((uintptr_t)ObjFWBase) - 30))(version, libc, sF);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((bool (*)(unsigned int, struct OFLibC *_Nonnull, FILE *_Nonnull *_Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 28))(version, libc, sF);
#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
}

const char *_Nullable
OFHTTPRequestMethodName(OFHTTPRequestMethod method)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((const char *_Nullable (*)(OFHTTPRequestMethod __asm__("d0")))(((uintptr_t)ObjFWBase) - 156))(method);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((const char *_Nullable (*)(OFHTTPRequestMethod))*(void **)(((uintptr_t)ObjFWBase) - 154))(method);
#endif
}

OFHTTPRequestMethod
OFHTTPRequestMethodParseName(OFString *string)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((OFHTTPRequestMethod (*)(OFString *__asm__("a0")))(((uintptr_t)ObjFWBase) - 162))(string);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((OFHTTPRequestMethod (*)(OFString *))*(void **)(((uintptr_t)ObjFWBase) - 160))(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) - 168))(code);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((OFString *_Nonnull (*)(short))*(void **)(((uintptr_t)ObjFWBase) - 166))(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) - 174))(listItem);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((OFListItem _Nullable (*)(OFListItem _Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 172))(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) - 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
}

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) - 186))(listItem);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((id _Nonnull (*)(OFListItem _Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 184))(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) - 192))(type);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((size_t (*)(const char *))*(void **)(((uintptr_t)ObjFWBase) - 190))(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) - 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
}

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__("(nil)"), OFOnceFunction _Nonnull __asm__("(nil)")))(((uintptr_t)ObjFWBase) - 204))(control, func);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	__extension__ ((void (*)(OFOnceControl *_Nonnull, OFOnceFunction _Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 202))(control, func);
#endif
}

void
OFPBKDF2(OFPBKDF2Parameters parameters)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	((void (*)(OFPBKDF2Parameters __asm__("a0")))(((uintptr_t)ObjFWBase) - 210))(parameters);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	__extension__ ((void (*)(OFPBKDF2Parameters))*(void **)(((uintptr_t)ObjFWBase) - 208))(parameters);
#endif
}

void
OFScrypt(OFScryptParameters parameters)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	((void (*)(OFScryptParameters __asm__("a0")))(((uintptr_t)ObjFWBase) - 216))(parameters);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	__extension__ ((void (*)(OFScryptParameters))*(void **)(((uintptr_t)ObjFWBase) - 214))(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) - 222))(buffer);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	__extension__ ((void (*)(uint32_t *_Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 220))(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) - 228))(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) - 226))(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) - 234))(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) - 232))(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) - 240))(IP, port);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((OFSocketAddress (*)(OFString *, uint16_t))*(void **)(((uintptr_t)ObjFWBase) - 238))(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) - 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
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) - 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
OFSocketAddressMakeIPX(const unsigned char *_Nonnull node, uint32_t network, uint16_t port)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((OFSocketAddress (*)(const unsigned char *_Nonnull __asm__("a0"), uint32_t __asm__("d0"), uint16_t __asm__("d1")))(((uintptr_t)ObjFWBase) - 258))(node, network, port);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((OFSocketAddress (*)(const unsigned char *_Nonnull, uint32_t, uint16_t))*(void **)(((uintptr_t)ObjFWBase) - 256))(node, network, port);
#endif
}

bool
OFSocketAddressEqual(const OFSocketAddress *_Nonnull address1, const OFSocketAddress *_Nonnull address2)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((bool (*)(const OFSocketAddress *_Nonnull __asm__("a0"), const OFSocketAddress *_Nonnull __asm__("a1")))(((uintptr_t)ObjFWBase) - 264))(address1, address2);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((bool (*)(const OFSocketAddress *_Nonnull, const OFSocketAddress *_Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 262))(address1, address2);
#endif
}

unsigned long
OFSocketAddressHash(const OFSocketAddress *_Nonnull address)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((unsigned long (*)(const OFSocketAddress *_Nonnull __asm__("a0")))(((uintptr_t)ObjFWBase) - 270))(address);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((unsigned long (*)(const OFSocketAddress *_Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 268))(address);
#endif
}

OFString *_Nonnull
OFSocketAddressString(const OFSocketAddress *_Nonnull address)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((OFString *_Nonnull (*)(const OFSocketAddress *_Nonnull __asm__("a0")))(((uintptr_t)ObjFWBase) - 276))(address);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((OFString *_Nonnull (*)(const OFSocketAddress *_Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 274))(address);
#endif
}

void
OFSocketAddressSetPort(OFSocketAddress *_Nonnull address, uint16_t port)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	((void (*)(OFSocketAddress *_Nonnull __asm__("a0"), uint16_t __asm__("d0")))(((uintptr_t)ObjFWBase) - 282))(address, port);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	__extension__ ((void (*)(OFSocketAddress *_Nonnull, uint16_t))*(void **)(((uintptr_t)ObjFWBase) - 280))(address, port);
#endif
}

uint16_t
OFSocketAddressPort(const OFSocketAddress *_Nonnull address)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((uint16_t (*)(const OFSocketAddress *_Nonnull __asm__("a0")))(((uintptr_t)ObjFWBase) - 288))(address);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((uint16_t (*)(const OFSocketAddress *_Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 286))(address);
#endif
}

void
OFSocketAddressSetIPXNetwork(OFSocketAddress *_Nonnull address, uint32_t network)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	((void (*)(OFSocketAddress *_Nonnull __asm__("a0"), uint32_t __asm__("d0")))(((uintptr_t)ObjFWBase) - 294))(address, network);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	__extension__ ((void (*)(OFSocketAddress *_Nonnull, uint32_t))*(void **)(((uintptr_t)ObjFWBase) - 292))(address, network);
#endif
}

uint32_t
OFSocketAddressIPXNetwork(const OFSocketAddress *_Nonnull address)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((uint32_t (*)(const OFSocketAddress *_Nonnull __asm__("a0")))(((uintptr_t)ObjFWBase) - 300))(address);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((uint32_t (*)(const OFSocketAddress *_Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 298))(address);
#endif
}

void
OFSocketAddressSetIPXNode(OFSocketAddress *_Nonnull address, const unsigned char *_Nonnull node)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	((void (*)(OFSocketAddress *_Nonnull __asm__("a0"), const unsigned char *_Nonnull __asm__("a1")))(((uintptr_t)ObjFWBase) - 306))(address, node);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	__extension__ ((void (*)(OFSocketAddress *_Nonnull, const unsigned char *_Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 304))(address, node);
#endif
}

void
OFSocketAddressIPXNode(const OFSocketAddress *_Nonnull address, unsigned char *_Nonnull node)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	((void (*)(const OFSocketAddress *_Nonnull __asm__("a0"), unsigned char *_Nonnull __asm__("a1")))(((uintptr_t)ObjFWBase) - 312))(address, node);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	__extension__ ((void (*)(const OFSocketAddress *_Nonnull, unsigned char *_Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 310))(address, node);
#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) - 318))(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) - 316))(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) - 324))(string);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((OFStringEncoding (*)(OFString *))*(void **)(((uintptr_t)ObjFWBase) - 322))(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) - 330))(encoding);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((OFString *_Nullable (*)(OFStringEncoding))*(void **)(((uintptr_t)ObjFWBase) - 328))(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) - 336))(string);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((size_t (*)(const OFChar16 *))*(void **)(((uintptr_t)ObjFWBase) - 334))(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) - 342))(string);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((size_t (*)(const OFChar32 *))*(void **)(((uintptr_t)ObjFWBase) - 340))(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) - 348))(version);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((OFString *_Nonnull (*)(uint16_t))*(void **)(((uintptr_t)ObjFWBase) - 346))(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) - 354))(compressionMethod);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((OFString *_Nonnull (*)(OFZIPArchiveEntryCompressionMethod))*(void **)(((uintptr_t)ObjFWBase) - 352))(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) - 360))(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) - 358))(extraField, tag, size);
#endif
}

Modified src/macros.h from [13da37c718] to [e163f96b10].

311
312
313
314
315
316
317






318
319
320
321
322
323
324
# define OF_DIRECT
#endif
#if __has_attribute(__objc_direct_members__) && defined(OF_APPLE_RUNTIME)
# define OF_DIRECT_MEMBERS __attribute__((__objc_direct_members__))
#else
# define OF_DIRECT_MEMBERS
#endif







#ifdef OF_APPLE_RUNTIME
# if defined(OF_X86_64) || 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







>
>
>
>
>
>







311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
# define OF_DIRECT
#endif
#if __has_attribute(__objc_direct_members__) && defined(OF_APPLE_RUNTIME)
# define OF_DIRECT_MEMBERS __attribute__((__objc_direct_members__))
#else
# 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_X86_64) || 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

Modified src/runtime/amiga-funcarray.inc from [eca72c7d0a] to [4a87a7ea0f].

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

/* This file is automatically generated from library.xml */

(CONST_APTR)glue_objc_init,
(CONST_APTR)glue___objc_exec_class,
(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,







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

/* This file is automatically generated from amiga-library.xml */

(CONST_APTR)glue_objc_init,
(CONST_APTR)glue___objc_exec_class,
(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,

Modified src/runtime/amiga-glue.h from [2ca426ebf9] to [f6e0849e8b].

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

/* This file is automatically generated from library.xml */

#import "ObjFWRT.h"
#import "private.h"

#ifdef OF_AMIGAOS_M68K
# define PPC_PARAMS(...) (void)
# define M68K_ARG(type, name, reg)		\







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

/* 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)		\

Modified src/runtime/amiga-glue.m from [7d3bd6cbde] to [f5c525c10e].

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

/* This file is automatically generated from library.xml */

#include "config.h"

#import "amiga-glue.h"

#ifdef OF_MORPHOS
/* All __saveds functions in this file need to use the SysV ABI */







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

/* This file is automatically generated from amiga-library.xml */

#include "config.h"

#import "amiga-glue.h"

#ifdef OF_MORPHOS
/* All __saveds functions in this file need to use the SysV ABI */

Modified src/runtime/amiga-library.m from [23cc4de616] to [c5e98935c6].

334
335
336
337
338
339
340



341
342
343
344
345
346
347
#ifdef OF_MORPHOS
	void *frame;
#endif
	uintptr_t *iter, *iter0;

	if (version > 1)
		return false;




	memcpy(&libc, libc_, sizeof(libc));

#ifdef OF_AMIGAOS_M68K
	if ((size_t)_EH_FRAME_BEGINS__ != (size_t)_EH_FRAME_OBJECTS__)
		return false;








>
>
>







334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
#ifdef OF_MORPHOS
	void *frame;
#endif
	uintptr_t *iter, *iter0;

	if (version > 1)
		return false;

	if (base->initialized)
		return true;

	memcpy(&libc, libc_, sizeof(libc));

#ifdef OF_AMIGAOS_M68K
	if ((size_t)_EH_FRAME_BEGINS__ != (size_t)_EH_FRAME_OBJECTS__)
		return false;

Added src/runtime/amiga-library.xml version [f6565586a9].



















































































































































































































































































































































































































































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
<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='version' type='unsigned int' m68k-reg='d0'/>
    <argument name='libc' type='struct objc_libc *' m68k-reg='a0'/>
  </function>
  <function name='__objc_exec_class'>
    <argument name='module' type='struct objc_module *_Nonnull' m68k-reg='a0'/>
  </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='__gnu_objc_personality' return-type='int'>
    <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='d2'/>
    <argument name='ex' type='void *_Nonnull' m68k-reg='a0'/>
    <argument name='ctx' type='void *_Nonnull' m68k-reg='a1'/>
  </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>
  <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='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_deinit'/>
  <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_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_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_destructInstance' return-type='void *_Nullable'>
    <argument name='object' type='id _Nullable' m68k-reg='a0'/>
  </function>
  <function name='objc_autoreleasePoolPush'
            return-type='void *_Null_unspecified'>
  </function>
  <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>
  <!-- The following functions are private! Don't use! -->
  <function name='objc_hashtable_new'
            return-type='struct objc_hashtable *_Nonnull'>
    <argument name='hash' type='objc_hashtable_hash_func' m68k-reg='a0'/>
    <argument name='equal' type='objc_hashtable_equal_func' m68k-reg='a1'/>
    <argument name='size' type='uint32_t' m68k-reg='d0'/>
  </function>
  <function name='objc_hashtable_set'>
    <argument name='table' type='struct objc_hashtable *_Nonnull'
              m68k-reg='a0'/>
    <argument name='key' type='const void *_Nonnull' m68k-reg='a1'/>
    <argument name='object' type='const void *_Nonnull' m68k-reg='a2'/>
  </function>
  <function name='objc_hashtable_get' return-type='void *_Nullable'>
    <argument name='table' type='struct objc_hashtable *_Nonnull'
              m68k-reg='a0'/>
    <argument name='key' type='const void *_Nonnull' m68k-reg='a1'/>
  </function>
  <function name='objc_hashtable_delete'>
    <argument name='table' type='struct objc_hashtable *_Nonnull'
              m68k-reg='a0'/>
    <argument name='key' type='const void *_Nonnull' m68k-reg='a1'/>
  </function>
  <function name='objc_hashtable_free'>
    <argument name='table' type='struct objc_hashtable *_Nonnull'
              m68k-reg='a0'/>
  </function>
  <!-- Public functions again -->
  <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='d0'/>
    <argument name='value' type='uintptr_t' m68k-reg='d1'/>
  </function>
</amiga-library>

Deleted src/runtime/library.xml version [f6565586a9].

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
<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='version' type='unsigned int' m68k-reg='d0'/>
    <argument name='libc' type='struct objc_libc *' m68k-reg='a0'/>
  </function>
  <function name='__objc_exec_class'>
    <argument name='module' type='struct objc_module *_Nonnull' m68k-reg='a0'/>
  </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='__gnu_objc_personality' return-type='int'>
    <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='d2'/>
    <argument name='ex' type='void *_Nonnull' m68k-reg='a0'/>
    <argument name='ctx' type='void *_Nonnull' m68k-reg='a1'/>
  </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>
  <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='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_deinit'/>
  <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_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_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_destructInstance' return-type='void *_Nullable'>
    <argument name='object' type='id _Nullable' m68k-reg='a0'/>
  </function>
  <function name='objc_autoreleasePoolPush'
            return-type='void *_Null_unspecified'>
  </function>
  <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>
  <!-- The following functions are private! Don't use! -->
  <function name='objc_hashtable_new'
            return-type='struct objc_hashtable *_Nonnull'>
    <argument name='hash' type='objc_hashtable_hash_func' m68k-reg='a0'/>
    <argument name='equal' type='objc_hashtable_equal_func' m68k-reg='a1'/>
    <argument name='size' type='uint32_t' m68k-reg='d0'/>
  </function>
  <function name='objc_hashtable_set'>
    <argument name='table' type='struct objc_hashtable *_Nonnull'
              m68k-reg='a0'/>
    <argument name='key' type='const void *_Nonnull' m68k-reg='a1'/>
    <argument name='object' type='const void *_Nonnull' m68k-reg='a2'/>
  </function>
  <function name='objc_hashtable_get' return-type='void *_Nullable'>
    <argument name='table' type='struct objc_hashtable *_Nonnull'
              m68k-reg='a0'/>
    <argument name='key' type='const void *_Nonnull' m68k-reg='a1'/>
  </function>
  <function name='objc_hashtable_delete'>
    <argument name='table' type='struct objc_hashtable *_Nonnull'
              m68k-reg='a0'/>
    <argument name='key' type='const void *_Nonnull' m68k-reg='a1'/>
  </function>
  <function name='objc_hashtable_free'>
    <argument name='table' type='struct objc_hashtable *_Nonnull'
              m68k-reg='a0'/>
  </function>
  <!-- Public functions again -->
  <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='d0'/>
    <argument name='value' type='uintptr_t' m68k-reg='d1'/>
  </function>
</amiga-library>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


















































































































































































































































































































































































































































































































































































































































































































Modified src/runtime/linklib/Makefile from [dc27346920] to [0b3e3bf11e].

1
2
3
4
5
6
7
8
9
10
11
12
13
include ../../../extra.mk

STATIC_LIB = libobjfwrt.library.a
SRCS = init.m		\
       linklib.m

include ../../../buildsys.mk

CPPFLAGS += -I..  -I../..  -I../../..				\
	    -DOBJC_COMPILING_AMIGA_LINKLIB			\
	    -DOBJFWRT_AMIGA_LIB=\"${OBJFWRT_AMIGA_LIB}\"	\
	    -DOBJFWRT_LIB_MINOR=${OBJFWRT_LIB_MINOR}
LD = ${OBJC}








|



<
1
2
3
4
5
6
7
8
9
10
11
12

include ../../../extra.mk

STATIC_LIB = libobjfwrt.library.a
SRCS = init.m		\
       linklib.m

include ../../../buildsys.mk

CPPFLAGS += -I.. -I../.. -I../../..				\
	    -DOBJC_COMPILING_AMIGA_LINKLIB			\
	    -DOBJFWRT_AMIGA_LIB=\"${OBJFWRT_AMIGA_LIB}\"	\
	    -DOBJFWRT_LIB_MINOR=${OBJFWRT_LIB_MINOR}

Modified src/runtime/linklib/init.m from [29e3bce728] to [2b38d578be].

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 * file.
 */

#include "config.h"

#import "ObjFWRT.h"
#import "private.h"
#import "macros.h"

#include <proto/exec.h>
#include <proto/intuition.h>

struct ObjFWRTBase;

#include <stdio.h>







|







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 * file.
 */

#include "config.h"

#import "ObjFWRT.h"
#import "private.h"
#import "amiga-library.h"

#include <proto/exec.h>
#include <proto/intuition.h>

struct ObjFWRTBase;

#include <stdio.h>

Modified src/runtime/linklib/linklib.m from [9056a4e93e] to [2cef24eea5].

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

/* This file is automatically generated from library.xml */

#include "config.h"

#import "ObjFWRT.h"
#import "private.h"

extern struct Library *ObjFWRTBase;







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

/* This file is automatically generated from amiga-library.xml */

#include "config.h"

#import "ObjFWRT.h"
#import "private.h"

extern struct Library *ObjFWRTBase;

Modified src/runtime/lookup-asm/Makefile from [3c7b7f7fc1] to [81611c981c].

1
2
3
4
5

6
7
8
9
10
11
12
include ../../../extra.mk

STATIC_PIC_LIB_NOINST = ${LOOKUP_ASM_LIB_A}
STATIC_AMIGA_LIB_NOINST = ${LOOKUP_ASM_AMIGALIB_A}
STATIC_LIB_NOINST = ${LOOKUP_ASM_A}


SRCS = lookup-asm.S

include ../../../buildsys.mk

ASFLAGS += -I../../.. -I../..
ASFLAGS_lookup-asm.amigalib.o += -DOF_BASEREL





>







1
2
3
4
5
6
7
8
9
10
11
12
13
include ../../../extra.mk

STATIC_PIC_LIB_NOINST = ${LOOKUP_ASM_LIB_A}
STATIC_AMIGA_LIB_NOINST = ${LOOKUP_ASM_AMIGALIB_A}
STATIC_LIB_NOINST = ${LOOKUP_ASM_A}
STATIC_AMIGA_LIB_NOINST = ${LOOKUP_ASM_AMIGALIB_A}

SRCS = lookup-asm.S

include ../../../buildsys.mk

ASFLAGS += -I../../.. -I../..
ASFLAGS_lookup-asm.amigalib.o += -DOF_BASEREL

Modified tests/TestsAppDelegate.m from [1130ab2e6c] to [2b8f245976].

47
48
49
50
51
52
53



54

55
56
57
58
59
60
61
#ifdef OF_NINTENDO_3DS
/* Newer versions of libctru started using id as a parameter name. */
# define id id_3ds
# include <3ds.h>
# undef id
#endif




extern unsigned long OFHashSeed;


#ifdef OF_PSP
static int
exitCallback(int arg1, int arg2, void *arg)
{
	sceKernelExitGame();








>
>
>

>







47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifdef OF_NINTENDO_3DS
/* Newer versions of libctru started using id as a parameter name. */
# define id id_3ds
# include <3ds.h>
# undef id
#endif

#ifdef OF_AMIGAOS
extern unsigned long *OFHashSeedRef(void);
#else
extern unsigned long OFHashSeed;
#endif

#ifdef OF_PSP
static int
exitCallback(int arg1, int arg2, void *arg)
{
	sceKernelExitGame();

88
89
90
91
92
93
94



95

96
97
98
99
100
101
102
	 * Calling objc_deinit() via atexit() would result in the runtime being
	 * destructed before for the destructors ran.
	 */
	atexit(objc_deinit);
#endif

	/* We need deterministic hashes for tests */



	OFHashSeed = 0;


#ifdef OF_WII
	GXRModeObj *rmode;
	void *xfb;

	VIDEO_Init();
	WPAD_Init();







>
>
>

>







92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
	 * Calling objc_deinit() via atexit() would result in the runtime being
	 * destructed before for the destructors ran.
	 */
	atexit(objc_deinit);
#endif

	/* We need deterministic hashes for tests */
#ifdef OF_AMIGAOS
	*OFHashSeedRef() = 0;
#else
	OFHashSeed = 0;
#endif

#ifdef OF_WII
	GXRModeObj *rmode;
	void *xfb;

	VIDEO_Init();
	WPAD_Init();

Modified utils/objfw-config.in from [3439d09582] to [0f7ed40036].

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
LIB_CFLAGS="@LIB_CFLAGS@"
LIB_LDFLAGS="@LIB_LDFLAGS@"
LIB_PREFIX="@LIB_PREFIX@"
LIB_SUFFIX="@LIB_SUFFIX@"
LDFLAGS="@LDFLAGS@"
LDFLAGS_REEXPORT="@LDFLAGS_REEXPORT@"
LDFLAGS_RPATH="@LDFLAGS_RPATH@"
LIBS="-L${libdir} -lobjfw @RUNTIME_LIBS@ @LIBS@"
FRAMEWORK_LIBS="-F${prefix}/Library/Frameworks -framework ObjFW"
FRAMEWORK_LIBS="$FRAMEWORK_LIBS @RUNTIME_FRAMEWORK_LIBS@ @LIBS@"
PLUGIN_CFLAGS="@PLUGIN_CFLAGS@"
PLUGIN_LDFLAGS="@PLUGIN_LDFLAGS@"
PLUGIN_SUFFIX="@PLUGIN_SUFFIX@"
PROG_SUFFIX="@EXEEXT@"
STATIC_LIBS="${libdir}/libobjfw.a @LIBS@"







|







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
LIB_CFLAGS="@LIB_CFLAGS@"
LIB_LDFLAGS="@LIB_LDFLAGS@"
LIB_PREFIX="@LIB_PREFIX@"
LIB_SUFFIX="@LIB_SUFFIX@"
LDFLAGS="@LDFLAGS@"
LDFLAGS_REEXPORT="@LDFLAGS_REEXPORT@"
LDFLAGS_RPATH="@LDFLAGS_RPATH@"
LIBS="-L${libdir} @OBJFW_LIBS@ @RUNTIME_LIBS@ @LIBS@"
FRAMEWORK_LIBS="-F${prefix}/Library/Frameworks -framework ObjFW"
FRAMEWORK_LIBS="$FRAMEWORK_LIBS @RUNTIME_FRAMEWORK_LIBS@ @LIBS@"
PLUGIN_CFLAGS="@PLUGIN_CFLAGS@"
PLUGIN_LDFLAGS="@PLUGIN_LDFLAGS@"
PLUGIN_SUFFIX="@PLUGIN_SUFFIX@"
PROG_SUFFIX="@EXEEXT@"
STATIC_LIBS="${libdir}/libobjfw.a @LIBS@"

Modified utils/ofarc/Makefile from [957c305108] to [3f568364e5].

16
17
18
19
20
21
22
23
24
25
26
27
${PROG}: ${LIBOBJFW_DEP_LVL2} ${LIBOBJFWRT_DEP_LVL2}

CPPFLAGS += -I../../src					\
	    -I../../src/runtime				\
	    -I../../src/exceptions			\
	    -I../..					\
	    -DLANGUAGE_DIR=\"${datadir}/ofarc/lang\"
LIBS := -L../../src -lobjfw						\
	-L../../src/runtime -L../../src/runtime/linklib ${RUNTIME_LIBS}	\
	${LIBS}
LD = ${OBJC}
LDFLAGS += ${LDFLAGS_RPATH}







|




16
17
18
19
20
21
22
23
24
25
26
27
${PROG}: ${LIBOBJFW_DEP_LVL2} ${LIBOBJFWRT_DEP_LVL2}

CPPFLAGS += -I../../src					\
	    -I../../src/runtime				\
	    -I../../src/exceptions			\
	    -I../..					\
	    -DLANGUAGE_DIR=\"${datadir}/ofarc/lang\"
LIBS := -L../../src -L../../src/linklib ${OBJFW_LIBS}			\
	-L../../src/runtime -L../../src/runtime/linklib ${RUNTIME_LIBS}	\
	${LIBS}
LD = ${OBJC}
LDFLAGS += ${LDFLAGS_RPATH}

Modified utils/ofdns/Makefile from [c6c2ac1b61] to [8b305bc200].

12
13
14
15
16
17
18
19
20
21
22
23
${PROG}: ${LIBOBJFW_DEP_LVL2} ${LIBOBJFWRT_DEP_LVL2}

CPPFLAGS += -I../../src					\
	    -I../../src/runtime				\
	    -I../../src/exceptions			\
	    -I../..					\
	    -DLANGUAGE_DIR=\"${datadir}/ofdns/lang\"
LIBS := -L../../src -lobjfw						\
	-L../../src/runtime -L../../src/runtime/linklib ${RUNTIME_LIBS}	\
	${LIBS}
LD = ${OBJC}
LDFLAGS += ${LDFLAGS_RPATH}







|




12
13
14
15
16
17
18
19
20
21
22
23
${PROG}: ${LIBOBJFW_DEP_LVL2} ${LIBOBJFWRT_DEP_LVL2}

CPPFLAGS += -I../../src					\
	    -I../../src/runtime				\
	    -I../../src/exceptions			\
	    -I../..					\
	    -DLANGUAGE_DIR=\"${datadir}/ofdns/lang\"
LIBS := -L../../src -L../../src/linklib ${OBJFW_LIBS}			\
	-L../../src/runtime -L../../src/runtime/linklib ${RUNTIME_LIBS}	\
	${LIBS}
LD = ${OBJC}
LDFLAGS += ${LDFLAGS_RPATH}

Modified utils/ofhash/Makefile from [4405db897f] to [32371c1afb].

12
13
14
15
16
17
18
19
20
21
22
23
${PROG}: ${LIBOBJFW_DEP_LVL2} ${LIBOBJFWRT_DEP_LVL2}

CPPFLAGS += -I../../src					\
	    -I../../src/runtime				\
	    -I../../src/exceptions			\
	    -I../..					\
	    -DLANGUAGE_DIR=\"${datadir}/ofhash/lang\"
LIBS := -L../../src -lobjfw						\
	-L../../src/runtime -L../../src/runtime/linklib ${RUNTIME_LIBS}	\
	${LIBS}
LD = ${OBJC}
LDFLAGS += ${LDFLAGS_RPATH}







|




12
13
14
15
16
17
18
19
20
21
22
23
${PROG}: ${LIBOBJFW_DEP_LVL2} ${LIBOBJFWRT_DEP_LVL2}

CPPFLAGS += -I../../src					\
	    -I../../src/runtime				\
	    -I../../src/exceptions			\
	    -I../..					\
	    -DLANGUAGE_DIR=\"${datadir}/ofhash/lang\"
LIBS := -L../../src -L../../src/linklib ${OBJFW_LIBS}			\
	-L../../src/runtime -L../../src/runtime/linklib ${RUNTIME_LIBS}	\
	${LIBS}
LD = ${OBJC}
LDFLAGS += ${LDFLAGS_RPATH}

Modified utils/ofhttp/Makefile from [54490626b4] to [717e0862da].

15
16
17
18
19
20
21
22
23
24
25
26
CPPFLAGS += -I../../src					\
	    -I../../src/runtime				\
	    -I../../src/exceptions			\
	    -I../..					\
	    -DLANGUAGE_DIR='"${datadir}/ofhttp/lang"'	\
	    -DLIB_PREFIX='"${LIB_PREFIX}"'		\
	    -DLIB_SUFFIX='"${LIB_SUFFIX}"'
LIBS := -L../../src -lobjfw						\
	-L../../src/runtime -L../../src/runtime/linklib ${RUNTIME_LIBS}	\
	${LIBS}
LD = ${OBJC}
LDFLAGS += ${LDFLAGS_RPATH}







|




15
16
17
18
19
20
21
22
23
24
25
26
CPPFLAGS += -I../../src					\
	    -I../../src/runtime				\
	    -I../../src/exceptions			\
	    -I../..					\
	    -DLANGUAGE_DIR='"${datadir}/ofhttp/lang"'	\
	    -DLIB_PREFIX='"${LIB_PREFIX}"'		\
	    -DLIB_SUFFIX='"${LIB_SUFFIX}"'
LIBS := -L../../src -L../../src/linklib ${OBJFW_LIBS}			\
	-L../../src/runtime -L../../src/runtime/linklib ${RUNTIME_LIBS}	\
	${LIBS}
LD = ${OBJC}
LDFLAGS += ${LDFLAGS_RPATH}