ObjFW  Check-in [5317b99250]

Overview
Comment:Generate files for Amiga .library using generator
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | amiga-library
Files: files | file ages | folders
SHA3-256: 5317b99250517329709f6d754e73913a5e4f1cf384b5354b15a0af423ec44941
User & Date: js on 2020-12-30 01:23:22
Other Links: branch diff | manifest | tags
Context
2021-01-02
22:06
Update copyright check-in: 27b401c7c2 user: js tags: amiga-library
2020-12-30
01:23
Generate files for Amiga .library using generator check-in: 5317b99250 user: js tags: amiga-library
00:03
Merge trunk into branch "amiga-library" check-in: cebf3184eb user: js tags: amiga-library
Changes

Modified .fossil-settings/clean-glob from [6a89f793e4] to [fbbf5e13d7].

23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
23
24
25
26
27
28
29

30
31
32
33
34
35
36







-







configure
docs
extra.mk
generators/library/gen_libraries
generators/unicode/gen_tables
src/Info.plist
src/bridge/Info.plist
src/inline.h
src/objfw-defs.h
src/runtime/Info.plist
tests/DerivedData
tests/EBOOT.PBP
tests/Info.plist
tests/PARAM.SFO
tests/objc_sync/objc_sync

Modified .fossil-settings/ignore-glob from [86c27bfc4f] to [262f083827].

25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
25
26
27
28
29
30
31

32
33
34
35
36
37
38







-







configure
docs
extra.mk
generators/library/gen_libraries
generators/unicode/gen_tables
src/Info.plist
src/bridge/Info.plist
src/inline.h
src/objfw-defs.h
src/runtime/Info.plist
tests/DerivedData
tests/EBOOT.PBP
tests/Info.plist
tests/PARAM.SFO
tests/iOS.xcodeproj/*.pbxuser

Modified .gitignore from [8813a8edcf] to [b01b8121bd].

25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
25
26
27
28
29
30
31

32
33
34
35
36
37
38







-







configure
docs
extra.mk
generators/library/gen_libraries
generators/unicode/gen_tables
src/Info.plist
src/bridge/Info.plist
src/inline.h
src/objfw-defs.h
src/runtime/Info.plist
tests/DerivedData
tests/EBOOT.PBP
tests/Info.plist
tests/PARAM.SFO
tests/iOS.xcodeproj/*.pbxuser

Modified generators/library/LibraryGenerator.m from [23375cfc22] to [6412ee0cd2].

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







-
+


-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+

-
-
-
-
+
+
+
+
+
+
+
+
+
+




@interface LibraryGenerator: OFObject <OFApplicationDelegate>
@end

OF_APPLICATION_DELEGATE(LibraryGenerator)

@implementation LibraryGenerator
- (void)applicationDidFinishLaunching
- (void)generateInDirectory: (OFString *)directory
{
	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
	    URLByAppendingPathComponent: directory];
	OFURL *libraryURL = [sourcesURL
	    URLByAppendingPathComponent: @"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 *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];
	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 *runtimeFuncArrayGenerator;
	runtimeFuncArrayGenerator = [[[FuncArrayGenerator alloc]
	    initWithLibrary: runtimeLibrary
		    include: runtimeFuncArray] autorelease];
	FuncArrayGenerator *funcArrayGenerator = [[[FuncArrayGenerator alloc]
	    initWithLibrary: library
		    include: funcArray] autorelease];

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

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

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

	[OFApplication terminate];
}
@end

Modified src/Makefile from [3946874689] to [adbca9f8d2].

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
253
254
255
256
257
258
259








260
261
262
263
264
265
266
267
268
269
270
271







-
-
-
-
-
-
-
-












		       encodings/encodings.amigalib.a	\
		       forwarding/forwarding.amigalib.a	\
		       invocation/invocation.amigalib.a	\
		       amiga-end.amigalib.o

include ../buildsys.mk

${OBJFW_AMIGA_LIB}: inline.h

${SFDC_INLINE_H}: ${SFD_FILE}
	sfdc -q --target=${SFDC_TARGET} --mode=macros -o $@ $<; \

${CVINCLUDE_INLINE_H}: morphos.fd morphos-clib.h
	cvinclude.pl --quiet --fd=morphos.fd --clib=morphos-clib.h --inlines=$@

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}

Added src/amiga-funcarray.inc version [c35428e30e].



































































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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/*
 * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
 *               2018, 2019, 2020
 *   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 library.xml */

(CONST_APTR)glue_of_init,
(CONST_APTR)glue_of_alloc,
(CONST_APTR)glue_of_alloc_zeroed,
(CONST_APTR)glue_of_realloc,
(CONST_APTR)glue_of_hash_seed_ref,
(CONST_APTR)glue_of_stdin_ref,
(CONST_APTR)glue_of_stdout_ref,
(CONST_APTR)glue_of_stderr_ref,
(CONST_APTR)glue_of_logv,
(CONST_APTR)glue_of_application_main,
(CONST_APTR)glue_of_http_request_method_to_string,
(CONST_APTR)glue_of_http_request_method_from_string,
(CONST_APTR)glue_of_http_status_code_to_string,
(CONST_APTR)glue_of_sizeof_type_encoding,
(CONST_APTR)glue_of_alignof_type_encoding,
(CONST_APTR)glue_of_string_parse_encoding,
(CONST_APTR)glue_of_string_name_of_encoding,
(CONST_APTR)glue_of_string_utf8_encode,
(CONST_APTR)glue_of_string_utf8_decode,
(CONST_APTR)glue_of_string_utf16_length,
(CONST_APTR)glue_of_string_utf32_length,
(CONST_APTR)glue_of_zip_archive_entry_version_to_string,
(CONST_APTR)glue_of_zip_archive_entry_compression_method_to_string,
(CONST_APTR)glue_of_zip_archive_entry_extra_field_find,
(CONST_APTR)glue_of_pbkdf2,
(CONST_APTR)glue_of_salsa20_8_core,
(CONST_APTR)glue_of_scrypt_block_mix,
(CONST_APTR)glue_of_scrypt_romix,
(CONST_APTR)glue_of_scrypt,
(CONST_APTR)glue_of_strptime,
(CONST_APTR)glue_of_socket_address_parse_ip,
(CONST_APTR)glue_of_socket_address_parse_ipv4,
(CONST_APTR)glue_of_socket_address_parse_ipv6,
(CONST_APTR)glue_of_socket_address_ipx,
(CONST_APTR)glue_of_socket_address_equal,
(CONST_APTR)glue_of_socket_address_hash,
(CONST_APTR)glue_of_socket_address_ip_string,
(CONST_APTR)glue_of_socket_address_set_port,
(CONST_APTR)glue_of_socket_address_get_port,
(CONST_APTR)glue_of_socket_address_set_ipx_network,
(CONST_APTR)glue_of_socket_address_get_ipx_network,
(CONST_APTR)glue_of_socket_address_set_ipx_node,
(CONST_APTR)glue_of_socket_address_get_ipx_node,
(CONST_APTR)glue_of_dns_class_to_string,
(CONST_APTR)glue_of_dns_record_type_to_string,
(CONST_APTR)glue_of_dns_class_parse,
(CONST_APTR)glue_of_dns_record_type_parse,

Added src/amiga-glue.h version [f77a1639ce].




























































































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, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
 *               2018, 2019, 2020
 *   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 library.xml */

#import "amiga-library.h"
#import "OFObject.h"
#import "OFStdIOStream.h"
#import "OFApplication.h"
#import "OFHTTPRequest.h"
#import "OFHTTPResponse.h"
#import "OFMethodSignature.h"
#import "OFString.h"
#import "OFZIPArchiveEntry.h"
#import "pbkdf2.h"
#import "scrypt.h"
#import "of_strptime.h"
#import "socket.h"
#import "OFDNSResourceRecord.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_of_init PPC_PARAMS(unsigned int version, struct of_libc *_Nonnull libc, FILE *_Nonnull *_Nonnull sF);
extern void *_Nullable glue_of_alloc PPC_PARAMS(size_t count, size_t size);
extern void *_Nullable glue_of_alloc_zeroed PPC_PARAMS(size_t count, size_t size);
extern void *_Nullable glue_of_realloc PPC_PARAMS(void *_Nullable pointer, size_t count, size_t size);
extern uint32_t *_Nonnull glue_of_hash_seed_ref(void);
extern OFStdIOStream *_Nonnull *_Nullable glue_of_stdin_ref(void);
extern OFStdIOStream *_Nonnull *_Nullable glue_of_stdout_ref(void);
extern OFStdIOStream *_Nonnull *_Nullable glue_of_stderr_ref(void);
extern void glue_of_logv PPC_PARAMS(OFConstantString *format, va_list arguments);
extern int glue_of_application_main PPC_PARAMS(int *_Nonnull argc, char *_Nullable *_Nonnull *_Nonnull argv, id <OFApplicationDelegate> delegate);
extern const char *_Nullable glue_of_http_request_method_to_string PPC_PARAMS(of_http_request_method_t method);
extern of_http_request_method_t glue_of_http_request_method_from_string PPC_PARAMS(OFString *string);
extern OFString *_Nonnull glue_of_http_status_code_to_string PPC_PARAMS(short code);
extern size_t glue_of_sizeof_type_encoding PPC_PARAMS(const char *type);
extern size_t glue_of_alignof_type_encoding PPC_PARAMS(const char *type);
extern of_string_encoding_t glue_of_string_parse_encoding PPC_PARAMS(OFString *string);
extern OFString *_Nullable glue_of_string_name_of_encoding PPC_PARAMS(of_string_encoding_t encoding);
extern size_t glue_of_string_utf8_encode PPC_PARAMS(of_unichar_t c, char *UTF8);
extern ssize_t glue_of_string_utf8_decode PPC_PARAMS(const char *UTF8, size_t len, of_unichar_t *c);
extern size_t glue_of_string_utf16_length PPC_PARAMS(const of_char16_t *string);
extern size_t glue_of_string_utf32_length PPC_PARAMS(const of_char32_t *string);
extern OFString *_Nonnull glue_of_zip_archive_entry_version_to_string PPC_PARAMS(uint16_t version);
extern OFString *_Nonnull glue_of_zip_archive_entry_compression_method_to_string PPC_PARAMS(uint16_t compressionMethod);
extern size_t glue_of_zip_archive_entry_extra_field_find PPC_PARAMS(OFData *extraField, uint16_t tag, uint16_t *size);
extern void glue_of_pbkdf2 PPC_PARAMS(of_pbkdf2_parameters_t param);
extern void glue_of_salsa20_8_core PPC_PARAMS(uint32_t *_Nonnull buffer);
extern void glue_of_scrypt_block_mix PPC_PARAMS(uint32_t *_Nonnull output, const uint32_t *_Nonnull input, size_t blockSize);
extern void glue_of_scrypt_romix PPC_PARAMS(uint32_t *buffer, size_t blockSize, size_t costFactor, uint32_t *tmp);
extern void glue_of_scrypt PPC_PARAMS(of_scrypt_parameters_t param);
extern const char *_Nullable glue_of_strptime PPC_PARAMS(const char *buf, const char *fmt, struct tm *tm, int16_t *_Nullable tz);
extern of_socket_address_t glue_of_socket_address_parse_ip PPC_PARAMS(OFString *IP, uint16_t port);
extern of_socket_address_t glue_of_socket_address_parse_ipv4 PPC_PARAMS(OFString *IP, uint16_t port);
extern of_socket_address_t glue_of_socket_address_parse_ipv6 PPC_PARAMS(OFString *IP, uint16_t port);
extern of_socket_address_t glue_of_socket_address_ipx PPC_PARAMS(const unsigned char *_Nonnull node, uint32_t network, uint16_t port);
extern bool glue_of_socket_address_equal PPC_PARAMS(const of_socket_address_t *_Nonnull address1, const of_socket_address_t *_Nonnull address2);
extern unsigned long glue_of_socket_address_hash PPC_PARAMS(const of_socket_address_t *_Nonnull address);
extern OFString *_Nonnull glue_of_socket_address_ip_string PPC_PARAMS(const of_socket_address_t *_Nonnull address, uint16_t *_Nullable port);
extern void glue_of_socket_address_set_port PPC_PARAMS(of_socket_address_t *_Nonnull address, uint16_t port);
extern uint16_t glue_of_socket_address_get_port PPC_PARAMS(const of_socket_address_t *_Nonnull address);
extern void glue_of_socket_address_set_ipx_network PPC_PARAMS(of_socket_address_t *_Nonnull address, uint32_t network);
extern uint32_t glue_of_socket_address_get_ipx_network PPC_PARAMS(const of_socket_address_t *_Nonnull address);
extern void glue_of_socket_address_set_ipx_node PPC_PARAMS(of_socket_address_t *_Nonnull address, const unsigned char *_Nonnull node);
extern void glue_of_socket_address_get_ipx_node PPC_PARAMS(const of_socket_address_t *_Nonnull address, unsigned char *_Nonnull node);
extern OFString *_Nonnull glue_of_dns_class_to_string PPC_PARAMS(of_dns_class_t DNSClass);
extern OFString *_Nonnull glue_of_dns_record_type_to_string PPC_PARAMS(of_dns_record_type_t recordType);
extern of_dns_class_t glue_of_dns_class_parse PPC_PARAMS(OFString *_Nonnull string);
extern of_dns_record_type_t glue_of_dns_record_type_parse PPC_PARAMS(OFString *_Nonnull string);

Modified src/amiga-glue.m from [212fc89c69] to [8f13ae59e7].

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







-
+

-
-
-
-
-
-
-
-
+
-

-
+
-
-
-
-
-
-
-
-
-
-
-
-
-













-
+


-
-
+
+




-
+
-
-
-
-
-
-
-
-
-
-
-








-
+








-
-
+
+

-
+






-
+





-
+





-
+





-
+














+
+
+
+
+
+
+
+
+
+
-
-
+
+
-














-
+







 *
 * 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"
/* This file is automatically generated from library.xml */

#import "OFApplication.h"
#import "OFDNSResourceRecord.h"
#import "OFHTTPRequest.h"
#import "OFHTTPResponse.h"
#import "OFMethodSignature.h"
#import "OFObject.h"
#import "OFStdIOStream.h"
#import "OFString.h"
#include "config.h"
#import "OFZIPArchiveEntry.h"

#import "amiga-library.h"
#import "amiga-glue.h"
#import "of_strptime.h"
#import "pbkdf2.h"
#import "platform.h"
#import "scrypt.h"
#import "socket.h"

#ifdef OF_AMIGAOS_M68K
# define PPC_PARAMS(...) (void)
# define M68K_ARG OF_M68K_ARG
#else
# define PPC_PARAMS(...) (__VA_ARGS__)
# define M68K_ARG(...)
#endif

#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_of_init PPC_PARAMS(unsigned int version, struct of_libc *libc, FILE **sF)
glue_of_init PPC_PARAMS(unsigned int version, struct of_libc *_Nonnull libc, FILE *_Nonnull *_Nonnull sF)
{
	M68K_ARG(unsigned int, version, d0)
	M68K_ARG(struct of_libc *, libc, a0)
	M68K_ARG(FILE **, sF, a1)
	M68K_ARG(struct of_libc *_Nonnull, libc, a0)
	M68K_ARG(FILE *_Nonnull *_Nonnull, sF, a1)

	return of_init(version, libc, sF);
}

int __saveds
void *_Nullable __saveds
glue_of_application_main PPC_PARAMS(int *argc, char ***argv,
    id <OFApplicationDelegate> delegate)
{
	M68K_ARG(int *, argc, a0)
	M68K_ARG(char ***, argv, a1)
	M68K_ARG(id <OFApplicationDelegate>, delegate, a2)

	return of_application_main(argc, argv, delegate);
}

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

	return of_alloc(count, size);
}

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

	return of_alloc_zeroed(count, size);
}

void *__saveds
glue_of_realloc PPC_PARAMS(void *pointer, size_t count, size_t size)
void *_Nullable __saveds
glue_of_realloc PPC_PARAMS(void *_Nullable pointer, size_t count, size_t size)
{
	M68K_ARG(void *, pointer, a0)
	M68K_ARG(void *_Nullable, pointer, a0)
	M68K_ARG(size_t, count, d0)
	M68K_ARG(size_t, size, d1)

	return of_realloc(pointer, count, size);
}

uint32_t *__saveds
uint32_t *_Nonnull __saveds
glue_of_hash_seed_ref(void)
{
	return of_hash_seed_ref();
}

OFStdIOStream **__saveds
OFStdIOStream *_Nonnull *_Nullable __saveds
glue_of_stdin_ref(void)
{
	return of_stdin_ref();
}

OFStdIOStream **__saveds
OFStdIOStream *_Nonnull *_Nullable __saveds
glue_of_stdout_ref(void)
{
	return of_stdout_ref();
}

OFStdIOStream **__saveds
OFStdIOStream *_Nonnull *_Nullable __saveds
glue_of_stderr_ref(void)
{
	return of_stderr_ref();
}

void __saveds
glue_of_logv PPC_PARAMS(OFConstantString *format, va_list arguments)
{
	M68K_ARG(OFConstantString *, format, a0)
	M68K_ARG(va_list, arguments, a1)

	of_logv(format, arguments);
}

int __saveds
glue_of_application_main 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 of_application_main(argc, argv, delegate);
}

const char *__saveds
glue_of_http_request_method_to_string PPC_PARAMS(
const char *_Nullable __saveds
glue_of_http_request_method_to_string PPC_PARAMS(of_http_request_method_t method)
    of_http_request_method_t method)
{
	M68K_ARG(of_http_request_method_t, method, d0)

	return of_http_request_method_to_string(method);
}

of_http_request_method_t __saveds
glue_of_http_request_method_from_string PPC_PARAMS(OFString *string)
{
	M68K_ARG(OFString *, string, a0)

	return of_http_request_method_from_string(string);
}

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

	return of_http_status_code_to_string(code);
}

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







-
+

















-
+
-







glue_of_string_parse_encoding PPC_PARAMS(OFString *string)
{
	M68K_ARG(OFString *, string, a0)

	return of_string_parse_encoding(string);
}

OFString *__saveds
OFString *_Nullable __saveds
glue_of_string_name_of_encoding PPC_PARAMS(of_string_encoding_t encoding)
{
	M68K_ARG(of_string_encoding_t, encoding, d0)

	return of_string_name_of_encoding(encoding);
}

size_t __saveds
glue_of_string_utf8_encode PPC_PARAMS(of_unichar_t c, char *UTF8)
{
	M68K_ARG(of_unichar_t, c, d0)
	M68K_ARG(char *, UTF8, a0)

	return of_string_utf8_encode(c, UTF8);
}

ssize_t __saveds
glue_of_string_utf8_decode PPC_PARAMS(const char *UTF8, size_t len,
glue_of_string_utf8_decode PPC_PARAMS(const char *UTF8, size_t len, of_unichar_t *c)
    of_unichar_t *c)
{
	M68K_ARG(const char *, UTF8, a0)
	M68K_ARG(size_t, len, d0)
	M68K_ARG(of_unichar_t *, c, a1)

	return of_string_utf8_decode(UTF8, len, c);
}
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
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







-
+







-
-
+
+
-



-
+
-



-
+
-









-
+

-
+

-
+



-
+

-
+





-
+
-

-
-
+
+






-
+
-










-
+

-
+

-
+


-
-
+
+
-




-
+




-
-
+
+
-

-
-
+


-
+


-
-
+
+
-

-
-
+


-
+


-
-
+
+
-

-
-
+


-
+


-
-
+
+
-

-
-
+



-
+



-
+
-

-
-
+
+





-
+

-
+




-
-
+
+
-

-
-
+
+





-
+
-

-
+






-
+

-
+





-
+
-

-
+






-
+
-

-
+





-
+
-

-
-
+
+





-
+
-

-
-
+
+




-
+







-
+








-
+

-
+





-
+

-
+



glue_of_string_utf32_length PPC_PARAMS(const of_char32_t *string)
{
	M68K_ARG(const of_char32_t *, string, a0)

	return of_string_utf32_length(string);
}

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

	return of_zip_archive_entry_version_to_string(version);
}

OFString *__saveds
glue_of_zip_archive_entry_compression_method_to_string PPC_PARAMS(
OFString *_Nonnull __saveds
glue_of_zip_archive_entry_compression_method_to_string PPC_PARAMS(uint16_t compressionMethod)
    uint16_t compressionMethod)
{
	M68K_ARG(uint16_t, compressionMethod, d0)

	return of_zip_archive_entry_compression_method_to_string(
	return of_zip_archive_entry_compression_method_to_string(compressionMethod);
	    compressionMethod);
}

size_t __saveds
glue_of_zip_archive_entry_extra_field_find PPC_PARAMS(OFData *extraField,
glue_of_zip_archive_entry_extra_field_find PPC_PARAMS(OFData *extraField, uint16_t tag, uint16_t *size)
    uint16_t tag, uint16_t *size)
{
	M68K_ARG(OFData *, extraField, a0)
	M68K_ARG(uint16_t, tag, d0)
	M68K_ARG(uint16_t *, size, a1)

	return of_zip_archive_entry_extra_field_find(extraField, tag, size);
}

void __saveds
glue_of_pbkdf2 PPC_PARAMS(const of_pbkdf2_parameters_t *param)
glue_of_pbkdf2 PPC_PARAMS(of_pbkdf2_parameters_t param)
{
	M68K_ARG(const of_pbkdf2_parameters_t *, param, a0)
	M68K_ARG(of_pbkdf2_parameters_t, param, a0)

	of_pbkdf2(*param);
	of_pbkdf2(param);
}

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

	of_salsa20_8_core(buffer);
}

void __saveds
glue_of_scrypt_block_mix PPC_PARAMS(uint32_t *output, const uint32_t *input,
glue_of_scrypt_block_mix PPC_PARAMS(uint32_t *_Nonnull output, const uint32_t *_Nonnull input, size_t blockSize)
    size_t blockSize)
{
	M68K_ARG(uint32_t *, output, a0)
	M68K_ARG(const uint32_t *, input, a1)
	M68K_ARG(uint32_t *_Nonnull, output, a0)
	M68K_ARG(const uint32_t *_Nonnull, input, a1)
	M68K_ARG(size_t, blockSize, d0)

	of_scrypt_block_mix(output, input, blockSize);
}

void __saveds
glue_of_scrypt_romix PPC_PARAMS(uint32_t *buffer, size_t blockSize,
glue_of_scrypt_romix PPC_PARAMS(uint32_t *buffer, size_t blockSize, size_t costFactor, uint32_t *tmp)
    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)

	of_scrypt_romix(buffer, blockSize, costFactor, tmp);
}

void __saveds
glue_of_scrypt PPC_PARAMS(const of_scrypt_parameters_t *param)
glue_of_scrypt PPC_PARAMS(of_scrypt_parameters_t param)
{
	M68K_ARG(const of_scrypt_parameters_t *, param, a0)
	M68K_ARG(of_scrypt_parameters_t, param, a0)

	of_scrypt(*param);
	of_scrypt(param);
}

const char *__saveds
glue_of_strptime PPC_PARAMS(const char *buf, const char *fmt, struct tm *tm,
const char *_Nullable __saveds
glue_of_strptime PPC_PARAMS(const char *buf, const char *fmt, struct tm *tm, int16_t *_Nullable tz)
    int16_t *tz)
{
	M68K_ARG(const char *, buf, a0)
	M68K_ARG(const char *, fmt, a1)
	M68K_ARG(struct tm *, tm, a2)
	M68K_ARG(int16_t *, tz, a3)
	M68K_ARG(int16_t *_Nullable, tz, a3)

	return of_strptime(buf, fmt, tm, tz);
}

void __saveds
glue_of_socket_address_parse_ip PPC_PARAMS(of_socket_address_t *address,
of_socket_address_t __saveds
glue_of_socket_address_parse_ip PPC_PARAMS(OFString *IP, uint16_t port)
    OFString *IP, uint16_t port)
{
	M68K_ARG(of_socket_address_t *, address, a0)
	M68K_ARG(OFString *, IP, a1)
	M68K_ARG(OFString *, IP, a0)
	M68K_ARG(uint16_t, port, d0)

	*address = of_socket_address_parse_ip(IP, port);
	return of_socket_address_parse_ip(IP, port);
}

void __saveds
glue_of_socket_address_parse_ipv4 PPC_PARAMS(of_socket_address_t *address,
of_socket_address_t __saveds
glue_of_socket_address_parse_ipv4 PPC_PARAMS(OFString *IP, uint16_t port)
    OFString *IP, uint16_t port)
{
	M68K_ARG(of_socket_address_t *, address, a0)
	M68K_ARG(OFString *, IP, a1)
	M68K_ARG(OFString *, IP, a0)
	M68K_ARG(uint16_t, port, d0)

	*address = of_socket_address_parse_ipv4(IP, port);
	return of_socket_address_parse_ipv4(IP, port);
}

void __saveds
glue_of_socket_address_parse_ipv6 PPC_PARAMS(of_socket_address_t *address,
of_socket_address_t __saveds
glue_of_socket_address_parse_ipv6 PPC_PARAMS(OFString *IP, uint16_t port)
    OFString *IP, uint16_t port)
{
	M68K_ARG(of_socket_address_t *, address, a0)
	M68K_ARG(OFString *, IP, a1)
	M68K_ARG(OFString *, IP, a0)
	M68K_ARG(uint16_t, port, d0)

	*address = of_socket_address_parse_ipv6(IP, port);
	return of_socket_address_parse_ipv6(IP, port);
}

void __saveds
glue_of_socket_address_ipx PPC_PARAMS(of_socket_address_t *address,
of_socket_address_t __saveds
glue_of_socket_address_ipx PPC_PARAMS(const unsigned char *_Nonnull node, uint32_t network, uint16_t port)
    const unsigned char *node, uint32_t network, uint16_t port)
{
	M68K_ARG(of_socket_address_t *, address, a0)
	M68K_ARG(const unsigned char *, node, a1)
	M68K_ARG(const unsigned char *_Nonnull, node, a0)
	M68K_ARG(uint32_t, network, d0)
	M68K_ARG(uint16_t, port, d1)

	*address = of_socket_address_ipx(node, network, port);
	return of_socket_address_ipx(node, network, port);
}

bool __saveds
glue_of_socket_address_equal PPC_PARAMS(const of_socket_address_t *address1,
glue_of_socket_address_equal PPC_PARAMS(const of_socket_address_t *_Nonnull address1, const of_socket_address_t *_Nonnull address2)
    const of_socket_address_t *address2)
{
	M68K_ARG(const of_socket_address_t *, address1, a0)
	M68K_ARG(const of_socket_address_t *, address2, a1)
	M68K_ARG(const of_socket_address_t *_Nonnull, address1, a0)
	M68K_ARG(const of_socket_address_t *_Nonnull, address2, a1)

	return of_socket_address_equal(address1, address2);
}

unsigned long __saveds
glue_of_socket_address_hash PPC_PARAMS(const of_socket_address_t *address)
glue_of_socket_address_hash PPC_PARAMS(const of_socket_address_t *_Nonnull address)
{
	M68K_ARG(const of_socket_address_t *, address, a0)
	M68K_ARG(const of_socket_address_t *_Nonnull, address, a0)

	return of_socket_address_hash(address);
}

OFString *__saveds
glue_of_socket_address_ip_string PPC_PARAMS(const of_socket_address_t *address,
OFString *_Nonnull __saveds
glue_of_socket_address_ip_string PPC_PARAMS(const of_socket_address_t *_Nonnull address, uint16_t *_Nullable port)
    uint16_t *port)
{
	M68K_ARG(const of_socket_address_t *, address, a0)
	M68K_ARG(uint16_t *, port, a1)
	M68K_ARG(const of_socket_address_t *_Nonnull, address, a0)
	M68K_ARG(uint16_t *_Nullable, port, a1)

	return of_socket_address_ip_string(address, port);
}

void __saveds
glue_of_socket_address_set_port PPC_PARAMS(of_socket_address_t *address,
glue_of_socket_address_set_port PPC_PARAMS(of_socket_address_t *_Nonnull address, uint16_t port)
    uint16_t port)
{
	M68K_ARG(of_socket_address_t *, address, a0)
	M68K_ARG(of_socket_address_t *_Nonnull, address, a0)
	M68K_ARG(uint16_t, port, d0)

	of_socket_address_set_port(address, port);
}

uint16_t __saveds
glue_of_socket_address_get_port PPC_PARAMS(const of_socket_address_t *address)
glue_of_socket_address_get_port PPC_PARAMS(const of_socket_address_t *_Nonnull address)
{
	M68K_ARG(const of_socket_address_t *, address, a0)
	M68K_ARG(const of_socket_address_t *_Nonnull, address, a0)

	return of_socket_address_get_port(address);
}

void __saveds
glue_of_socket_address_set_ipx_network PPC_PARAMS(of_socket_address_t *address,
glue_of_socket_address_set_ipx_network PPC_PARAMS(of_socket_address_t *_Nonnull address, uint32_t network)
    uint32_t network)
{
	M68K_ARG(of_socket_address_t *, address, a0)
	M68K_ARG(of_socket_address_t *_Nonnull, address, a0)
	M68K_ARG(uint32_t, network, d0)

	of_socket_address_set_ipx_network(address, network);
}

uint32_t __saveds
glue_of_socket_address_get_ipx_network PPC_PARAMS(
glue_of_socket_address_get_ipx_network PPC_PARAMS(const of_socket_address_t *_Nonnull address)
    const of_socket_address_t *address)
{
	M68K_ARG(const of_socket_address_t *, address, a0)
	M68K_ARG(const of_socket_address_t *_Nonnull, address, a0)

	return of_socket_address_get_ipx_network(address);
}

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

	of_socket_address_set_ipx_node(address, node);
}

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

	of_socket_address_get_ipx_node(address, node);
}

OFString *__saveds
OFString *_Nonnull __saveds
glue_of_dns_class_to_string PPC_PARAMS(of_dns_class_t DNSClass)
{
	M68K_ARG(of_dns_class_t, DNSClass, d0)

	return of_dns_class_to_string(DNSClass);
}

OFString *__saveds
OFString *_Nonnull __saveds
glue_of_dns_record_type_to_string PPC_PARAMS(of_dns_record_type_t recordType)
{
	M68K_ARG(of_dns_record_type_t, recordType, d0)

	return of_dns_record_type_to_string(recordType);
}

of_dns_class_t __saveds
glue_of_dns_class_parse PPC_PARAMS(OFString *string)
glue_of_dns_class_parse PPC_PARAMS(OFString *_Nonnull string)
{
	M68K_ARG(OFString *, string, a0)
	M68K_ARG(OFString *_Nonnull, string, a0)

	return of_dns_class_parse(string);
}

of_dns_record_type_t __saveds
glue_of_dns_record_type_parse PPC_PARAMS(OFString *string)
glue_of_dns_record_type_parse PPC_PARAMS(OFString *_Nonnull string)
{
	M68K_ARG(OFString *, string, a0)
	M68K_ARG(OFString *_Nonnull, string, a0)

	return of_dns_record_type_parse(string);
}

Added src/library.xml version [8a66b6f69a].














































































































































































































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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<amiga-library version='1.0' base='ObjFWBase'>
  <include>amiga-library.h</include>
  <!-- The following function is only for the linklib. -->
  <function name='of_init' return-type='bool'>
    <argument name='version' type='unsigned int' m68k-reg='d0'/>
    <argument name='libc' type='struct of_libc *_Nonnull' m68k-reg='a0'/>
    <argument name='sF' type='FILE *_Nonnull *_Nonnull' m68k-reg='a1'/>
  </function>
  <include>OFObject.h</include>
  <function name='of_alloc' 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='of_alloc_zeroed' 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='of_realloc' 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='of_hash_seed_ref' return-type='uint32_t *_Nonnull'/>
  <include>OFStdIOStream.h</include>
  <function name='of_stdin_ref'
            return-type='OFStdIOStream *_Nonnull *_Nullable'/>
  <function name='of_stdout_ref'
            return-type='OFStdIOStream *_Nonnull *_Nullable'/>
  <function name='of_stderr_ref'
            return-type='OFStdIOStream *_Nonnull *_Nullable'/>
  <function name='of_logv'>
    <argument name='format' type='OFConstantString *' m68k-reg='a0'/>
    <argument name='arguments' type='va_list' m68k-reg='a1'/>
  </function>
  <include>OFApplication.h</include>
  <function name='of_application_main' 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>OFHTTPRequest.h</include>
  <function name='of_http_request_method_to_string'
            return-type='const char *_Nullable'>
    <argument name='method' type='of_http_request_method_t' m68k-reg='d0'/>
  </function>
  <function name='of_http_request_method_from_string'
            return-type='of_http_request_method_t'>
    <argument name='string' type='OFString *' m68k-reg='a0'/>
  </function>
  <include>OFHTTPResponse.h</include>
  <function name='of_http_status_code_to_string'
            return-type='OFString *_Nonnull'>
    <argument name='code' type='short' m68k-reg='d0'/>
  </function>
  <include>OFMethodSignature.h</include>
  <function name='of_sizeof_type_encoding' return-type='size_t'>
    <argument name='type' type='const char *' m68k-reg='a0'/>
  </function>
  <function name='of_alignof_type_encoding' return-type='size_t'>
    <argument name='type' type='const char *' m68k-reg='a0'/>
  </function>
  <include>OFString.h</include>
  <function name='of_string_parse_encoding' return-type='of_string_encoding_t'>
    <argument name='string' type='OFString *' m68k-reg='a0'/>
  </function>
  <function name='of_string_name_of_encoding' return-type='OFString *_Nullable'>
    <argument name='encoding' type='of_string_encoding_t' m68k-reg='d0'/>
  </function>
  <function name='of_string_utf8_encode' return-type='size_t'>
    <argument name='c' type='of_unichar_t' m68k-reg='d0'/>
    <argument name='UTF8' type='char *' m68k-reg='a0'/>
  </function>
  <function name='of_string_utf8_decode' return-type='ssize_t'>
    <argument name='UTF8' type='const char *' m68k-reg='a0'/>
    <argument name='len' type='size_t' m68k-reg='d0'/>
    <argument name='c' type='of_unichar_t *' m68k-reg='a1'/>
  </function>
  <function name='of_string_utf16_length' return-type='size_t'>
    <argument name='string' type='const of_char16_t *' m68k-reg='a0'/>
  </function>
  <function name='of_string_utf32_length' return-type='size_t'>
    <argument name='string' type='const of_char32_t *' m68k-reg='a0'/>
  </function>
  <include>OFZIPArchiveEntry.h</include>
  <function name='of_zip_archive_entry_version_to_string'
            return-type='OFString *_Nonnull'>
    <argument name='version' type='uint16_t' m68k-reg='d0'/>
  </function>
  <function name='of_zip_archive_entry_compression_method_to_string'
            return-type='OFString *_Nonnull'>
    <argument name='compressionMethod' type='uint16_t' m68k-reg='d0'/>
  </function>
  <function name='of_zip_archive_entry_extra_field_find' return-type='size_t'>
    <argument name='extraField' type='OFData *' m68k-reg='a0'/>
    <argument name='tag' type='uint16_t' m68k-reg='d0'/>
    <argument name='size' type='uint16_t *' m68k-reg='a1'/>
  </function>
  <include>pbkdf2.h</include>
  <function name='of_pbkdf2'>
    <argument name='param' type='of_pbkdf2_parameters_t' m68k-reg='a0'/>
  </function>
  <include>scrypt.h</include>
  <function name='of_salsa20_8_core'>
    <argument name='buffer' type='uint32_t *_Nonnull' m68k-reg='a0'/>
  </function>
  <function name='of_scrypt_block_mix'>
    <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='of_scrypt_romix'>
    <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>
  <function name='of_scrypt'>
    <argument name='param' type='of_scrypt_parameters_t' m68k-reg='a0'/>
  </function>
  <include>of_strptime.h</include>
  <function name='of_strptime' return-type='const char *_Nullable'>
    <argument name='buf' type='const char *' m68k-reg='a0'/>
    <argument name='fmt' 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>socket.h</include>
  <function name='of_socket_address_parse_ip' return-type='of_socket_address_t'>
    <argument name='IP' type='OFString *' m68k-reg='a0'/>
    <argument name='port' type='uint16_t' m68k-reg='d0'/>
  </function>
  <function name='of_socket_address_parse_ipv4'
            return-type='of_socket_address_t'>
    <argument name='IP' type='OFString *' m68k-reg='a0'/>
    <argument name='port' type='uint16_t' m68k-reg='d0'/>
  </function>
  <function name='of_socket_address_parse_ipv6'
            return-type='of_socket_address_t'>
    <argument name='IP' type='OFString *' m68k-reg='a0'/>
    <argument name='port' type='uint16_t' m68k-reg='d0'/>
  </function>
  <function name='of_socket_address_ipx' return-type='of_socket_address_t'>
    <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='of_socket_address_equal' return-type='bool'>
    <argument name='address1' type='const of_socket_address_t *_Nonnull'
              m68k-reg='a0'/>
    <argument name='address2' type='const of_socket_address_t *_Nonnull'
              m68k-reg='a1'/>
  </function>
  <function name='of_socket_address_hash' return-type='unsigned long'>
    <argument name='address' type='const of_socket_address_t *_Nonnull'
              m68k-reg='a0'/>
  </function>
  <function name='of_socket_address_ip_string' return-type='OFString *_Nonnull'>
    <argument name='address' type='const of_socket_address_t *_Nonnull'
              m68k-reg='a0'/>
    <argument name='port' type='uint16_t *_Nullable' m68k-reg='a1'/>
  </function>
  <function name='of_socket_address_set_port'>
    <argument name='address' type='of_socket_address_t *_Nonnull'
              m68k-reg='a0'/>
    <argument name='port' type='uint16_t' m68k-reg='d0'/>
  </function>
  <function name='of_socket_address_get_port' return-type='uint16_t'>
    <argument name='address' type='const of_socket_address_t *_Nonnull'
              m68k-reg='a0'/>
  </function>
  <function name='of_socket_address_set_ipx_network'>
    <argument name='address' type='of_socket_address_t *_Nonnull'
              m68k-reg='a0'/>
    <argument name='network' type='uint32_t' m68k-reg='d0'/>
  </function>
  <function name='of_socket_address_get_ipx_network' return-type='uint32_t'>
    <argument name='address' type='const of_socket_address_t *_Nonnull'
              m68k-reg='a0'/>
  </function>
  <function name='of_socket_address_set_ipx_node'>
    <argument name='address' type='of_socket_address_t *_Nonnull'
              m68k-reg='a0'/>
    <argument name='node' type='const unsigned char *_Nonnull' m68k-reg='a1'/>
  </function>
  <function name='of_socket_address_get_ipx_node'>
    <argument name='address' type='const of_socket_address_t *_Nonnull'
              m68k-reg='a0'/>
    <argument name='node' type='unsigned char *_Nonnull' m68k-reg='a1'/>
  </function>
  <include>OFDNSResourceRecord.h</include>
  <function name='of_dns_class_to_string' return-type='OFString *_Nonnull'>
    <argument name='DNSClass' type='of_dns_class_t' m68k-reg='d0'/>
  </function>
  <function name='of_dns_record_type_to_string'
            return-type='OFString *_Nonnull'>
    <argument name='recordType' type='of_dns_record_type_t' m68k-reg='d0'/>
  </function>
  <function name='of_dns_class_parse' return-type='of_dns_class_t'>
    <argument name='string' type='OFString *_Nonnull' m68k-reg='a0'/>
  </function>
  <function name='of_dns_record_type_parse' return-type='of_dns_record_type_t'>
    <argument name='string' type='OFString *_Nonnull' m68k-reg='a0'/>
  </function>
</amiga-library>

Modified src/linklib/Makefile from [f5bccff146] to [09b220af0c].

1
2
3

4

5
6
7
8
9
10
1
2
3
4

5
6
7
8
9
10
11



+
-
+






include ../../extra.mk

STATIC_LIB = libobjfw.library.a
SRCS = init.m		\
SRCS = linklib.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 [c4b7d9b4b5].














































































































































































































































































































































































































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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
/*
 * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
 *               2018, 2019, 2020
 *   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 *
get_errno(void)
{
	return &errno;
}

static void __attribute__((__used__))
ctor(void)
{
	static bool initialized = false;
	struct of_libc 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
		.get_errno = get_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 (!of_init(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

Modified src/linklib/linklib.m from [46c5143434] to [0f505c4367].

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







+
+


-

-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
+
-
-
-
-
-
+
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

-
+
-
+

+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
+
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+


+
+
+
+
+
+
+
+
+
-
+
+
+


-
+


+
+
+
+
+
+
+
+
+
-
+
+
+


-
-
+
+

+
+
+
+
+
+
+
+
+
-
+
+
+


-
-
+
+

-
-
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+


-
-
+
+

+
+
+
+
+
+
+
+
+
-
+
+
+


-
-
+
+

+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+





+
+
+
+
-
+
-


-
+


-
+
-
-
-




-
-
+

+
+
+
+
+
+
+
+
+
-
+
+
+


-
+


+
+
+
+
+
+
+
+
+
-
+
+
+





+
+
+
+
+
+
+
+
+
-
+
+
+


-
+


+
+
+
+
+
+
+
+
+
-
+
+
+





+
+
+
+
+
+
+
+
+
-
+
+
+





+
+
+
+
+
+
+
+
+
-
+
+
+





+
+
+
+
+
+
+
+
+
-
+
+
+


-
+


+
+
+
+
+
+
+
+
+
-
+
+
+





+
+
+
+
+
+
+
+
+
-
+
+
+





+
+
+
+
+
+
+
+
+
-
+
+
+





+
+
+
+
+
+
+
+
+
-
+
+
+





+
+
+
+
+
+
+
+
+
-
+
+
+


-
+


+
+
+
+
+
+
+
+
+
-
+
+
+


-
+


+
+
+
+
+
+
+
+
+
-
-
+
+
+



-
+
-

+
+
+
+
+
+
+
+
+
-
-
+
+
+





+
+
+
+
+
+
+
+
+
-
+
+
+



-
+

+
+
+
+
+
+
+
+
+
-
+
+
+



-
+

+
+
+
+
+
+
+
+
+
-
+
+
+



-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+





+
+
+
+
+
+
+
+
+
-
+
+
+


-
-
+
+

+
+
+
+
+
+
+
+
+
-
+
+
+





+
+
+
-
+
+
+
+
+
+

-
-
+
+
-





+
+
+
-
+
+
+
+
+
+

-
-
+
+
-





+
+
+
-
+
+
+
+
+
+

-
-
+
+
-



-
+
-

+
+
+
-
+
+
+
+
+
+

-
-
+
+
-



-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+



-
+

+
+
+
+
+
+
+
+
+
-
+
+
+


-
-
+
+

+
+
+
+
+
+
+
+
+
-
+
+
+



-
+

+
+
+
+
+
+
+
+
+
-
+
+
+



-
+

+
+
+
+
+
+
+
+
+
-
+
+
+



-
+
-

+
+
+
+
+
+
+
+
+
-
+
+
+



-
+

+
+
+
+
+
+
+
+
+
-
+
+
+



-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+



-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+


-
+


+
+
+
+
+
+
+
+
+
-
+
+
+

+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+



-
+

+
+
+
+
+
+
+
+
+
-
+
+
+

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

#import "OFObject.h"
#import "OFStdIOStream.h"
#include <proto/exec.h>
#define USE_INLINE_STDARG
#include <proto/intuition.h>

struct ObjFWBase;

#import "inline.h"

#include <errno.h>
#import "OFApplication.h"
#import "OFHTTPRequest.h"
#import "OFHTTPResponse.h"
#import "OFMethodSignature.h"
#import "OFString.h"
#import "OFZIPArchiveEntry.h"
#import "pbkdf2.h"
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>

#import "scrypt.h"
#if defined(OF_AMIGAOS_M68K)
# include <stabs.h>
# define SYM(name) __asm__("_" name)
#elif defined(OF_MORPHOS)
# include <constructor.h>
#import "of_strptime.h"
# define SYM(name) __asm__(name)
#endif

#import "socket.h"
#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 *);

#import "OFDNSResourceRecord.h"
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;
extern struct Library *ObjFWBase;
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
bool
error(const char *string, ULONG arg)
of_init(unsigned int version, struct of_libc *_Nonnull libc, FILE *_Nonnull *_Nonnull sF)
{
#if defined(OF_AMIGAOS_M68K)
	struct Library *IntuitionBase = OpenLibrary("intuition.library", 0);

	if (IntuitionBase != NULL) {
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((bool (*)(unsigned int __asm__("d0"), struct of_libc *_Nonnull __asm__("a0"), FILE *_Nonnull *_Nonnull __asm__("a1")))(((uintptr_t)ObjFWBase) - 30))(version, libc, sF);
#elif defined(OF_MORPHOS)
		struct EasyStruct easy = {
			.es_StructSize = sizeof(easy),
			.es_Flags = 0,
			.es_Title = (UBYTE *)NULL,
			.es_TextFormat = (UBYTE *)string,
			(UBYTE *)"OK"
		};

	__asm__ __volatile__ (
		EasyRequest(NULL, &easy, NULL, arg);

	    "mr		%%r12, %0"
		CloseLibrary(IntuitionBase);
	}

	    :: "r"(ObjFWBase) : "r12"
	exit(EXIT_FAILURE);
}

	);
static int *
get_errno(void)
{

	return &errno;
}

	return __extension__ ((bool (*)(unsigned int, struct of_libc *_Nonnull, FILE *_Nonnull *_Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 28))(version, libc, sF);
static void __attribute__((__used__))
ctor(void)
{
	static bool initialized = false;
	struct of_libc 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
		.get_errno = get_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 (!glue_of_init(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

void *
void *_Nullable
of_alloc(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 glue_of_alloc(count, size);

	return __extension__ ((void *_Nullable (*)(size_t, size_t))*(void **)(((uintptr_t)ObjFWBase) - 34))(count, size);
#endif
}

void *
void *_Nullable
of_alloc_zeroed(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 glue_of_alloc_zeroed(count, size);

	return __extension__ ((void *_Nullable (*)(size_t, size_t))*(void **)(((uintptr_t)ObjFWBase) - 40))(count, size);
#endif
}

void *
of_realloc(void *pointer, size_t count, size_t size)
void *_Nullable
of_realloc(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 glue_of_realloc(pointer, count, size);

	return __extension__ ((void *_Nullable (*)(void *_Nullable, size_t, size_t))*(void **)(((uintptr_t)ObjFWBase) - 46))(pointer, count, size);
#endif
}

uint32_t *
of_hash_seed_ref(void)
uint32_t *_Nonnull
of_hash_seed_ref()
{
	return glue_of_hash_seed_ref();
}

#if defined(OF_AMIGAOS_M68K)
OFStdIOStream **
of_stdin_ref(void)
{
	return glue_of_stdin_ref();
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((uint32_t *_Nonnull (*)())(((uintptr_t)ObjFWBase) - 54))();
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((uint32_t *_Nonnull (*)())*(void **)(((uintptr_t)ObjFWBase) - 52))();
#endif
}

OFStdIOStream **
of_stdout_ref(void)
OFStdIOStream *_Nonnull *_Nullable
of_stdin_ref()
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((OFStdIOStream *_Nonnull *_Nullable (*)())(((uintptr_t)ObjFWBase) - 60))();
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);
	return glue_of_stdout_ref();

	return __extension__ ((OFStdIOStream *_Nonnull *_Nullable (*)())*(void **)(((uintptr_t)ObjFWBase) - 58))();
#endif
}

OFStdIOStream **
of_stderr_ref(void)
OFStdIOStream *_Nonnull *_Nullable
of_stdout_ref()
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return glue_of_stderr_ref();
}

	return ((OFStdIOStream *_Nonnull *_Nullable (*)())(((uintptr_t)ObjFWBase) - 66))();
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((OFStdIOStream *_Nonnull *_Nullable (*)())*(void **)(((uintptr_t)ObjFWBase) - 64))();
#endif
}
void
of_log(OFConstantString *format, ...)
{
	va_list arguments;

	va_start(arguments, format);
	of_logv(format, arguments);
	va_end(arguments);

OFStdIOStream *_Nonnull *_Nullable
of_stderr_ref()
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((OFStdIOStream *_Nonnull *_Nullable (*)())(((uintptr_t)ObjFWBase) - 72))();
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((OFStdIOStream *_Nonnull *_Nullable (*)())*(void **)(((uintptr_t)ObjFWBase) - 70))();
#endif
}

void
of_logv(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) - 78))(format, arguments);
#ifdef OF_MORPHOS
#elif defined(OF_MORPHOS)
	/* The generated code does not work with va_list, so do it manually. */
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase)
	    :: "r"(ObjFWBase) : "r12"
	);

	((void (*)(OFConstantString *, va_list))*(void **)(ObjFWBase - 76))(
	__extension__ ((void (*)(OFConstantString *, va_list))*(void **)(((uintptr_t)ObjFWBase) - 76))(format, arguments);
	    format, arguments);
#else
	glue_of_logv(format, arguments);
#endif
}

int
of_application_main(int *argc, char ***argv,
    id <OFApplicationDelegate> delegate)
of_application_main(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) - 84))(argc, argv, delegate);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);
	return glue_of_application_main(argc, argv, delegate);

	return __extension__ ((int (*)(int *_Nonnull, char *_Nullable *_Nonnull *_Nonnull, id <OFApplicationDelegate>))*(void **)(((uintptr_t)ObjFWBase) - 82))(argc, argv, delegate);
#endif
}

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

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

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

	return __extension__ ((of_http_request_method_t (*)(OFString *))*(void **)(((uintptr_t)ObjFWBase) - 94))(string);
#endif
}

OFString *
OFString *_Nonnull
of_http_status_code_to_string(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) - 102))(code);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);
	return glue_of_http_status_code_to_string(code);

	return __extension__ ((OFString *_Nonnull (*)(short))*(void **)(((uintptr_t)ObjFWBase) - 100))(code);
#endif
}

size_t
of_sizeof_type_encoding(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) - 108))(type);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);
	return glue_of_sizeof_type_encoding(type);

	return __extension__ ((size_t (*)(const char *))*(void **)(((uintptr_t)ObjFWBase) - 106))(type);
#endif
}

size_t
of_alignof_type_encoding(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) - 114))(type);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);
	return glue_of_alignof_type_encoding(type);

	return __extension__ ((size_t (*)(const char *))*(void **)(((uintptr_t)ObjFWBase) - 112))(type);
#endif
}

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

	return __extension__ ((of_string_encoding_t (*)(OFString *))*(void **)(((uintptr_t)ObjFWBase) - 118))(string);
#endif
}

OFString *
OFString *_Nullable
of_string_name_of_encoding(of_string_encoding_t encoding)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((OFString *_Nullable (*)(of_string_encoding_t __asm__("d0")))(((uintptr_t)ObjFWBase) - 126))(encoding);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);
	return glue_of_string_name_of_encoding(encoding);

	return __extension__ ((OFString *_Nullable (*)(of_string_encoding_t))*(void **)(((uintptr_t)ObjFWBase) - 124))(encoding);
#endif
}

size_t
of_string_utf8_encode(of_unichar_t c, char *UTF8)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((size_t (*)(of_unichar_t __asm__("d0"), char *__asm__("a0")))(((uintptr_t)ObjFWBase) - 132))(c, UTF8);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);
	return glue_of_string_utf8_encode(c, UTF8);

	return __extension__ ((size_t (*)(of_unichar_t, char *))*(void **)(((uintptr_t)ObjFWBase) - 130))(c, UTF8);
#endif
}

ssize_t
of_string_utf8_decode(const char *UTF8, size_t len, of_unichar_t *c)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((ssize_t (*)(const char *__asm__("a0"), size_t __asm__("d0"), of_unichar_t *__asm__("a1")))(((uintptr_t)ObjFWBase) - 138))(UTF8, len, c);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);
	return glue_of_string_utf8_decode(UTF8, len, c);

	return __extension__ ((ssize_t (*)(const char *, size_t, of_unichar_t *))*(void **)(((uintptr_t)ObjFWBase) - 136))(UTF8, len, c);
#endif
}

size_t
of_string_utf16_length(const of_char16_t *string)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((size_t (*)(const of_char16_t *__asm__("a0")))(((uintptr_t)ObjFWBase) - 144))(string);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);
	return glue_of_string_utf16_length(string);

	return __extension__ ((size_t (*)(const of_char16_t *))*(void **)(((uintptr_t)ObjFWBase) - 142))(string);
#endif
}

size_t
of_string_utf32_length(const of_char32_t *string)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((size_t (*)(const of_char32_t *__asm__("a0")))(((uintptr_t)ObjFWBase) - 150))(string);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);
	return glue_of_string_utf32_length(string);

	return __extension__ ((size_t (*)(const of_char32_t *))*(void **)(((uintptr_t)ObjFWBase) - 148))(string);
#endif
}

OFString *
OFString *_Nonnull
of_zip_archive_entry_version_to_string(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) - 156))(version);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);
	return glue_of_zip_archive_entry_version_to_string(version);

	return __extension__ ((OFString *_Nonnull (*)(uint16_t))*(void **)(((uintptr_t)ObjFWBase) - 154))(version);
#endif
}

OFString *
OFString *_Nonnull
of_zip_archive_entry_compression_method_to_string(uint16_t compressionMethod)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((OFString *_Nonnull (*)(uint16_t __asm__("d0")))(((uintptr_t)ObjFWBase) - 162))(compressionMethod);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);
	return glue_of_zip_archive_entry_compression_method_to_string(
	    compressionMethod);

	return __extension__ ((OFString *_Nonnull (*)(uint16_t))*(void **)(((uintptr_t)ObjFWBase) - 160))(compressionMethod);
#endif
}

size_t
of_zip_archive_entry_extra_field_find(OFData *extraField, uint16_t tag,
of_zip_archive_entry_extra_field_find(OFData *extraField, uint16_t tag, uint16_t *size)
    uint16_t *size)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((size_t (*)(OFData *__asm__("a0"), uint16_t __asm__("d0"), uint16_t *__asm__("a1")))(((uintptr_t)ObjFWBase) - 168))(extraField, tag, size);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);
	return glue_of_zip_archive_entry_extra_field_find(
	    extraField, tag, size);

	return __extension__ ((size_t (*)(OFData *, uint16_t, uint16_t *))*(void **)(((uintptr_t)ObjFWBase) - 166))(extraField, tag, size);
#endif
}

void
of_pbkdf2(of_pbkdf2_parameters_t param)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	((void (*)(of_pbkdf2_parameters_t __asm__("a0")))(((uintptr_t)ObjFWBase) - 174))(param);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);
	glue_of_pbkdf2(&param);

	__extension__ ((void (*)(of_pbkdf2_parameters_t))*(void **)(((uintptr_t)ObjFWBase) - 172))(param);
#endif
}

void
of_salsa20_8_core(uint32_t *buffer)
of_salsa20_8_core(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) - 180))(buffer);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);
	glue_of_salsa20_8_core(buffer);

	__extension__ ((void (*)(uint32_t *_Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 178))(buffer);
#endif
}

void
of_scrypt_block_mix(uint32_t *output, const uint32_t *input, size_t blockSize)
of_scrypt_block_mix(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) - 186))(output, input, blockSize);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);
	glue_of_scrypt_block_mix(output, input, blockSize);

	__extension__ ((void (*)(uint32_t *_Nonnull, const uint32_t *_Nonnull, size_t))*(void **)(((uintptr_t)ObjFWBase) - 184))(output, input, blockSize);
#endif
}

void
of_scrypt_romix(uint32_t *buffer, size_t blockSize, size_t costFactor,
    uint32_t *tmp)
{
	glue_of_scrypt_romix(buffer, blockSize, costFactor, tmp);
of_scrypt_romix(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) - 192))(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) - 190))(buffer, blockSize, costFactor, tmp);
#endif
}

void
of_scrypt(of_scrypt_parameters_t param)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	((void (*)(of_scrypt_parameters_t __asm__("a0")))(((uintptr_t)ObjFWBase) - 198))(param);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);
	glue_of_scrypt(&param);

	__extension__ ((void (*)(of_scrypt_parameters_t))*(void **)(((uintptr_t)ObjFWBase) - 196))(param);
#endif
}

const char *
of_strptime(const char *buf, const char *fmt, struct tm *tm, int16_t *tz)
const char *_Nullable
of_strptime(const char *buf, const char *fmt, 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) - 204))(buf, fmt, tm, tz);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);
	return glue_of_strptime(buf, fmt, tm, tz);

	return __extension__ ((const char *_Nullable (*)(const char *, const char *, struct tm *, int16_t *_Nullable))*(void **)(((uintptr_t)ObjFWBase) - 202))(buf, fmt, tm, tz);
#endif
}

of_socket_address_t
of_socket_address_parse_ip(OFString *IP, uint16_t port)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	of_socket_address_t address;
	return ((of_socket_address_t (*)(OFString *__asm__("a0"), uint16_t __asm__("d0")))(((uintptr_t)ObjFWBase) - 210))(IP, port);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	glue_of_socket_address_parse_ip(&address, IP, port);

	return __extension__ ((of_socket_address_t (*)(OFString *, uint16_t))*(void **)(((uintptr_t)ObjFWBase) - 208))(IP, port);
#endif
	return address;
}

of_socket_address_t
of_socket_address_parse_ipv4(OFString *IP, uint16_t port)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	of_socket_address_t address;
	return ((of_socket_address_t (*)(OFString *__asm__("a0"), uint16_t __asm__("d0")))(((uintptr_t)ObjFWBase) - 216))(IP, port);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	glue_of_socket_address_parse_ipv4(&address, IP, port);

	return __extension__ ((of_socket_address_t (*)(OFString *, uint16_t))*(void **)(((uintptr_t)ObjFWBase) - 214))(IP, port);
#endif
	return address;
}

of_socket_address_t
of_socket_address_parse_ipv6(OFString *IP, uint16_t port)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	of_socket_address_t address;
	return ((of_socket_address_t (*)(OFString *__asm__("a0"), uint16_t __asm__("d0")))(((uintptr_t)ObjFWBase) - 222))(IP, port);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	glue_of_socket_address_parse_ipv6(&address, IP, port);

	return __extension__ ((of_socket_address_t (*)(OFString *, uint16_t))*(void **)(((uintptr_t)ObjFWBase) - 220))(IP, port);
#endif
	return address;
}

of_socket_address_t
of_socket_address_ipx(const unsigned char *node, uint32_t network,
of_socket_address_ipx(const unsigned char *_Nonnull node, uint32_t network, uint16_t port)
    uint16_t port)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	of_socket_address_t address;
	return ((of_socket_address_t (*)(const unsigned char *_Nonnull __asm__("a0"), uint32_t __asm__("d0"), uint16_t __asm__("d1")))(((uintptr_t)ObjFWBase) - 228))(node, network, port);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	glue_of_socket_address_ipx(&address, node, network, port);

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

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

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

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

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

OFString *
of_socket_address_ip_string(const of_socket_address_t *address, uint16_t *port)
OFString *_Nonnull
of_socket_address_ip_string(const of_socket_address_t *_Nonnull address, uint16_t *_Nullable port)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((OFString *_Nonnull (*)(const of_socket_address_t *_Nonnull __asm__("a0"), uint16_t *_Nullable __asm__("a1")))(((uintptr_t)ObjFWBase) - 246))(address, port);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);
	return glue_of_socket_address_ip_string(address, port);

	return __extension__ ((OFString *_Nonnull (*)(const of_socket_address_t *_Nonnull, uint16_t *_Nullable))*(void **)(((uintptr_t)ObjFWBase) - 244))(address, port);
#endif
}

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

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

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

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

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

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

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

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

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

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

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

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

OFString *_Nonnull
of_dns_class_to_string(of_dns_class_t DNSClass)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((OFString *_Nonnull (*)(of_dns_class_t __asm__("d0")))(((uintptr_t)ObjFWBase) - 288))(DNSClass);
#elif defined(OF_MORPHOS)

OFString *
of_dns_class_to_string(of_dns_class_t DNSClass)
{
	return glue_of_dns_class_to_string(DNSClass);
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);

	return __extension__ ((OFString *_Nonnull (*)(of_dns_class_t))*(void **)(((uintptr_t)ObjFWBase) - 286))(DNSClass);
#endif
}

OFString *
OFString *_Nonnull
of_dns_record_type_to_string(of_dns_record_type_t recordType)
{
#if defined(OF_AMIGAOS_M68K)
	register struct Library *a6 __asm__("a6") = ObjFWBase;
	(void)a6;
	return ((OFString *_Nonnull (*)(of_dns_record_type_t __asm__("d0")))(((uintptr_t)ObjFWBase) - 294))(recordType);
#elif defined(OF_MORPHOS)
	__asm__ __volatile__ (
	    "mr		%%r12, %0"
	    :: "r"(ObjFWBase) : "r12"
	);
	return glue_of_dns_record_type_to_string(recordType);

	return __extension__ ((OFString *_Nonnull (*)(of_dns_record_type_t))*(void **)(((uintptr_t)ObjFWBase) - 292))(recordType);
#endif
}

of_dns_class_t
of_dns_class_parse(OFString *_Nonnull string)
{

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

	return __extension__ ((of_dns_class_t (*)(OFString *_Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 298))(string);
#endif
}

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

	return __extension__ ((of_dns_record_type_t (*)(OFString *_Nonnull))*(void **)(((uintptr_t)ObjFWBase) - 304))(string);
#endif
}

Modified src/runtime/amiga-glue.h from [9918e4f9f1] to [fa91e5dca5].

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
15
16
17
18
19
20
21

22
23
24
25
26
27
28







-







 * file.
 */

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

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