Index: src/Makefile ================================================================== --- src/Makefile +++ src/Makefile @@ -260,10 +260,13 @@ ${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 ADDED src/morphos-clib.h Index: src/morphos-clib.h ================================================================== --- src/morphos-clib.h +++ src/morphos-clib.h @@ -0,0 +1,44 @@ +/* The following function is only for the linklib. */ +bool glue_of_init(unsigned int version, struct of_libc *libc, FILE **sF); +void *glue_of_alloc(size_t count, size_t size); +void *glue_of_alloc_zeroed(size_t count, size_t size); +void *glue_of_realloc(void *pointer, size_t count, size_t size); +uint32_t *glue_of_hash_seed_ref(void); +OFStdIOStream **glue_of_stdin_ref(void); +OFStdIOStream **glue_of_stdout_ref(void); +OFStdIOStream **glue_of_stderr_ref(void); +void glue_of_logv(OFConstantString *format, va_list arguments); +int glue_of_application_main(int *argc, char ***argv, id delegate); +const char *glue_of_http_request_method_to_string(of_http_request_method_t method); +of_http_request_method_t glue_of_http_request_method_from_string(OFString *string); +OFString *glue_of_http_status_code_to_string(short code); +size_t glue_of_sizeof_type_encoding(const char *type); +size_t glue_of_alignof_type_encoding(const char *type); +of_string_encoding_t glue_of_string_parse_encoding(OFString *string); +OFString *glue_of_string_name_of_encoding(of_string_encoding_t encoding); +size_t glue_of_string_utf8_encode(of_unichar_t c, char *UTF8); +ssize_t glue_of_string_utf8_decode(const char *UTF8, size_t len, of_unichar_t *c); +size_t glue_of_string_utf16_length(const of_char16_t *string); +size_t glue_of_string_utf32_length(const of_char32_t *string); +OFString *glue_of_zip_archive_entry_version_to_string(uint16_t version); +OFString *glue_of_zip_archive_entry_compression_method_to_string(uint16_t compressionMethod); +size_t glue_of_zip_archive_entry_extra_field_find(OFData *extraField, uint16_t tag, uint16_t *size); +void glue_of_pbkdf2(const of_pbkdf2_parameters_t *param); +void glue_of_salsa20_8_core(uint32_t *buffer); +void glue_of_scrypt_block_mix(uint32_t *output, const uint32_t *input, size_t blockSize); +void glue_of_scrypt_romix(uint32_t *buffer, size_t blockSize, size_t costFactor, uint32_t *tmp); +void glue_of_scrypt(const of_scrypt_parameters_t *param); +const char *glue_of_strptime(const char *buf, const char *fmt, struct tm *tm, int16_t *tz); +void glue_of_socket_address_parse_ip(of_socket_address_t *address, OFString *IP, uint16_t port); +void glue_of_socket_address_parse_ipv4(of_socket_address_t *address, OFString *IP, uint16_t port); +void glue_of_socket_address_parse_ipv6(of_socket_address_t *address, OFString *IP, uint16_t port); +void glue_of_socket_address_ipx(of_socket_address_t *address, const unsigned char *node, uint32_t network, uint16_t port); +bool glue_of_socket_address_equal(const of_socket_address_t *address1, const of_socket_address_t *address2); +unsigned long glue_of_socket_address_hash(const of_socket_address_t *address); +OFString *glue_of_socket_address_ip_string(const of_socket_address_t *address, uint16_t *port); +void glue_of_socket_address_set_port(of_socket_address_t *address, uint16_t port); +uint16_t glue_of_socket_address_get_port(const of_socket_address_t *address); +void glue_of_socket_address_set_ipx_network(of_socket_address_t *address, uint32_t network); +uint32_t glue_of_socket_address_get_ipx_network(const of_socket_address_t *address); +void glue_of_socket_address_set_ipx_node(of_socket_address_t *address, const unsigned char *node); +void glue_of_socket_address_get_ipx_node(const of_socket_address_t *address, unsigned char *node); ADDED src/morphos.fd Index: src/morphos.fd ================================================================== --- src/morphos.fd +++ src/morphos.fd @@ -0,0 +1,47 @@ +##base _ObjFWBase +##bias 30 +##public +* The following function is only for the linklib. +glue_of_init(version,libc,sF)(sysv,r12base) +glue_of_alloc(count,size)(sysv,r12base) +glue_of_alloc_zeroed(count,size)(sysv,r12base) +glue_of_realloc(pointer,count,size)(sysv,r12base) +glue_of_hash_seed_ref()(sysv,r12base) +glue_of_stdin_ref()(sysv,r12base) +glue_of_stdout_ref()(sysv,r12base) +glue_of_stderr_ref()(sysv,r12base) +glue_of_logv(format,arguments)(sysv,r12base) +glue_of_application_main(argc,argv,delegate)(sysv,r12base) +glue_of_http_request_method_to_string(method)(sysv,r12base) +glue_of_http_request_method_from_string(string)(sysv,r12base) +glue_of_http_status_code_to_string(code)(sysv,r12base) +glue_of_sizeof_type_encoding(type)(sysv,r12base) +glue_of_alignof_type_encoding(type)(sysv,r12base) +glue_of_string_parse_encoding(string)(sysv,r12base) +glue_of_string_name_of_encoding(encoding)(sysv,r12base) +glue_of_string_utf8_encode(c,UTF8)(sysv,r12base) +glue_of_string_utf8_decode(UTF8,len,c)(sysv,r12base) +glue_of_string_utf16_length(string)(sysv,r12base) +glue_of_string_utf32_length(string)(sysv,r12base) +glue_of_zip_archive_entry_version_to_string(version)(sysv,r12base) +glue_of_zip_archive_entry_compression_method_to_string(compressionMethod)(sysv,r12base) +glue_of_zip_archive_entry_extra_field_find(extraField,tag,size)(sysv,r12base) +glue_of_pbkdf2(param)(sysv,r12base) +glue_of_salsa20_8_core(buffer)(sysv,r12base) +glue_of_scrypt_block_mix(output,input,blockSize)(sysv,r12base) +glue_of_scrypt_romix(buffer,blockSize,costFactor,tmp)(sysv,r12base) +glue_of_scrypt(param)(sysv,r12base) +glue_of_strptime(buf,fmt,tm,tz)(sysv,r12base) +glue_of_socket_address_parse_ip(address,IP,port)(sysv,r12base) +glue_of_socket_address_parse_ipv4(address,IP,port)(sysv,r12base) +glue_of_socket_address_parse_ipv6(address,IP,port)(sysv,r12base) +glue_of_socket_address_ipx(address,node,network,port)(sysv,r12base) +glue_of_socket_address_equal(address1,address2)(sysv,r12base) +glue_of_socket_address_hash(address)(sysv,r12base) +glue_of_socket_address_ip_string(address,port)(sysv,r12base) +glue_of_socket_address_set_port(address,port)(sysv,r12base) +glue_of_socket_address_get_port(address)(sysv,r12base) +glue_of_socket_address_set_ipx_network(address,network)(sysv,r12base) +glue_of_socket_address_get_ipx_network(address)(sysv,r12base) +glue_of_socket_address_set_ipx_node(address,node)(sysv,r12base) +glue_of_socket_address_get_ipx_node(address,node)(sysv,r12base)