Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch amiga-library Excluding Merge-Ins
This is equivalent to a diff from 943df0748b to 06f90bdd29
|
2025-04-30
| ||
| 17:22 | Use m instead of ppc as version suffix for MorphOS check-in: c1e657df0c user: js tags: trunk | |
| 14:00 | Remove Amiga library except for MorphOS check-in: fb61ec81a1 user: js tags: morphos-library | |
| 13:26 | configure: Remove obsolete extra check Leaf check-in: 06f90bdd29 user: js tags: amiga-library | |
| 13:24 | Merge trunk into branch "amiga-library" check-in: 3a3134b465 user: js tags: amiga-library | |
| 13:13 | Rename a few Amiga library related files check-in: 943df0748b user: js tags: trunk | |
| 12:02 | Use CopyMem instead of memcpy in Amiga library check-in: 9cea4bb495 user: js tags: trunk | |
Changes to .github/workflows/amiga-gcc.yml.
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | + + + + + - + |
name: amiga-gcc
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
container: amigadev/crosstools:m68k-amigaos
strategy:
matrix:
configure_flags:
-
- --disable-amiga-lib
steps:
- uses: actions/checkout@v4
- name: autogen.sh
run: ./autogen.sh
- name: configure
|
Changes to configure.ac.
| ︙ | |||
50 51 52 53 54 55 56 57 58 59 60 61 62 63 | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | + + + + + + + + + + + + + + + + + |
OBJFW_LDFLAGS="$OBJFW_LDFLAGS -noixemul"
LIBS="-ldebug $LIBS"
OBJFW_LIBS="-ldebug $OBJFW_LIBS"
enable_files="yes" # Required for reading ENV:
enable_shared="no"
with_tls="no"
supports_amiga_lib="yes"
AS_IF([test x"$enable_amiga_lib" != x"no"], [
AC_SUBST(OBJFW_AMIGA_LIB, 'objfw${OBJFW_LIB_MAJOR}.library')
AC_SUBST(OBJFWRT_AMIGA_LIB,
['objfwrt${OBJFWRT_LIB_MAJOR}.library'])
dnl For 68000, GCC emits calls to helper functions that
dnl do not work properly in a library.
t="-mcpu=68020 -fbaserel32 -noixemul -ffreestanding"
AC_SUBST(AMIGA_LIB_CFLAGS, $t)
t="$t -resident32 -nostartfiles -nodefaultlibs -ldebug -lc"
AC_SUBST(AMIGA_LIB_LDFLAGS, $t)
AC_SUBST(AMIGA_LIBRARY_GLUE_AMIGALIB_O,
["amiga-library-glue.amigalib.o"])
])
AC_SUBST(LIBBASES_M, libbases.m)
;;
powerpc-*-amigaos*)
CPPFLAGS="$CPPFLAGS -D__USE_INLINE__"
enable_files="yes" # Required for reading ENV:
enable_shared="no"
with_tls="no"
|
| ︙ | |||
74 75 76 77 78 79 80 81 82 83 84 85 86 87 | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | + + |
OBJFW_LIBS="-ldebug $OBJFW_LIBS"
enable_files="yes" # Required for reading ENV:
enable_shared="no"
supports_amiga_lib="yes"
AS_IF([test x"$enable_amiga_lib" != x"no"], [
AC_SUBST(OBJFW_AMIGA_LIB,
['objfw${OBJFW_LIB_MAJOR}ppc.library'])
AC_SUBST(OBJFWRT_AMIGA_LIB,
['objfwrt${OBJFWRT_LIB_MAJOR}ppc.library'])
t="-mresident32 -ffreestanding -noixemul"
AC_SUBST(AMIGA_LIB_CFLAGS, $t)
t="-mresident32 -nostartfiles -nodefaultlibs -noixemul"
t="$t -laboxstubs -labox -lmath -ldebug -lc"
AC_SUBST(AMIGA_LIB_LDFLAGS, $t)
|
| ︙ | |||
493 494 495 496 497 498 499 | 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 | - + + + + - - - + + + + + + + + + + + - + - - + + - + + |
BUILDSYS_SHARED_LIB
BUILDSYS_PLUGIN
BUILDSYS_PIE
AC_SUBST(OBJFW_SHARED_LIB, '${LIB_PREFIX}objfw${LIB_SUFFIX}')
AC_SUBST(EXCEPTIONS_LIB_A, "exceptions.lib.a")
AC_SUBST(FORWARDING_LIB_A, "forwarding.lib.a")
|
| ︙ | |||
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 | 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 | + + + + + |
OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS -fgnu-runtime"
AC_MSG_RESULT(no)
old_compiler="yes"
])
AC_SUBST(RUNTIME, "runtime")
AC_CONFIG_FILES(src/runtime/Info.plist)
AS_IF([test x"$enable_shared" != x"no"], [
AC_SUBST(LOOKUP_ASM_LIB_A, "lookup-asm.lib.a")
])
AS_IF([test x"$enable_shared" != x"no"], [
AC_SUBST(OBJFWRT_SHARED_LIB,
'${LIB_PREFIX}objfwrt${LIB_SUFFIX}')
])
AS_IF([test x"$enable_static" = x"yes"], [
AC_SUBST(OBJFWRT_STATIC_LIB, "libobjfwrt.a")
AC_SUBST(LOOKUP_ASM_A, "lookup-asm.a")
])
AS_IF([test x"$build_framework" = x"yes"], [
AC_SUBST(OBJFWRT_FRAMEWORK, "ObjFWRT.framework")
AC_SUBST(RUNTIME_FRAMEWORK_LIBS, "-framework ObjFWRT")
])
AS_IF([test x"$enable_amiga_lib" != x"no"], [
AC_SUBST(RUNTIME_LIBS, "-lobjfwrt.library")
tmp="../src/runtime/linklib/libobjfwrt.library.a"
AC_SUBST(LOOKUP_ASM_AMIGALIB_A, "lookup-asm.amigalib.a")
AC_SUBST(LIBOBJFWRT_DEP, "$tmp")
AC_SUBST(LIBOBJFWRT_DEP_LVL2, "../$tmp")
], [
AC_SUBST(RUNTIME_LIBS, "-lobjfwrt")
])
AC_SUBST(RUNTIME_STATIC_LIBS, '${libdir}/libobjfwrt.a')
|
| ︙ | |||
1067 1068 1069 1070 1071 1072 1073 | 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 | + + + - + | AS_IF([test x"$ENCODINGS_SRCS" = x""], [ ENCODINGS_SRCS="dummy.m" ]) AC_SUBST(ENCODINGS_SRCS) AS_IF([test x"$enable_shared" != x"no"], [ AC_SUBST(ENCODINGS_LIB_A, "encodings.lib.a") ]) AS_IF([test x"$enable_amiga_lib" != x"no"], [ AC_SUBST(ENCODINGS_AMIGALIB_A, "encodings.amigalib.a") ]) |
| ︙ |
Changes to extra.mk.in.
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 11 | + |
OBJFW_SHARED_LIB = @OBJFW_SHARED_LIB@
OBJFW_STATIC_LIB = @OBJFW_STATIC_LIB@
OBJFW_FRAMEWORK = @OBJFW_FRAMEWORK@
OBJFW_AMIGA_LIB = @OBJFW_AMIGA_LIB@
OBJFW_LIB_MAJOR = 1
OBJFW_LIB_MINOR = 3
OBJFW_LIB_PATCH = 0
OBJFW_LIB_MAJOR_MINOR = ${OBJFW_LIB_MAJOR}.${OBJFW_LIB_MINOR}
OBJFWRT_SHARED_LIB = @OBJFWRT_SHARED_LIB@
OBJFWRT_STATIC_LIB = @OBJFWRT_STATIC_LIB@
|
| ︙ | |||
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | + + + + + | AMIGA_LIBRARY_GLUE_AMIGALIB_O = @AMIGA_LIBRARY_GLUE_AMIGALIB_O@ AUTORELEASE_FOUNDATION_M = @AUTORELEASE_FOUNDATION_M@ BIN_PREFIX = @BIN_PREFIX@ BRIDGE = @BRIDGE@ CVINCLUDE_INLINE_H = @CVINCLUDE_INLINE_H@ ENCODINGS_A = @ENCODINGS_A@ ENCODINGS_AMIGALIB_A = @ENCODINGS_AMIGALIB_A@ ENCODINGS_LIB_A = @ENCODINGS_LIB_A@ ENCODINGS_SRCS = @ENCODINGS_SRCS@ EXCEPTIONS_A = @EXCEPTIONS_A@ EXCEPTIONS_AMIGALIB_A = @EXCEPTIONS_AMIGALIB_A@ EXCEPTIONS_LIB_A = @EXCEPTIONS_LIB_A@ FORWARDING_A = @FORWARDING_A@ FORWARDING_AMIGALIB_A = @FORWARDING_AMIGALIB_A@ FORWARDING_LIB_A = @FORWARDING_LIB_A@ HID_FRAMEWORK_LIBS = @HID_FRAMEWORK_LIBS@ HID_LIBS = @HID_LIBS@ LIBBASES_M = @LIBBASES_M@ LIBOBJFWHID_DEP = @LIBOBJFWHID_DEP@ LIBOBJFWHID_DEP_LVL2 = @LIBOBJFWHID_DEP_LVL2@ LIBOBJFWRT_DEP = @LIBOBJFWRT_DEP@ LIBOBJFWRT_DEP_LVL2 = @LIBOBJFWRT_DEP_LVL2@ LIBOBJFW_DEP = @LIBOBJFW_DEP@ LIBOBJFW_DEP_LVL2 = @LIBOBJFW_DEP_LVL2@ LINKLIB = @LINKLIB@ LOOKUP_ASM_A = @LOOKUP_ASM_A@ LOOKUP_ASM_AMIGALIB_A = @LOOKUP_ASM_AMIGALIB_A@ LOOKUP_ASM_LIB_A = @LOOKUP_ASM_LIB_A@ MAP_LDFLAGS = @MAP_LDFLAGS@ OBJC_SYNC = @OBJC_SYNC@ OBJFW_LIB = @OBJFW_LIB@ OBJFW_LIBS = @OBJFW_LIBS@ OBJFW_NEW = @OBJFW_NEW@ OFARC = @OFARC@ OFARC_LIBS = @OFARC_LIBS@ OFDNS = @OFDNS@ OFHASH = @OFHASH@ OFHASH_LIBS = @OFHTTP_LIBS@ OFHTTP = @OFHTTP@ |
| ︙ |
Changes to generators/library/FuncArrayGenerator.m.
| ︙ | |||
70 71 72 73 74 75 76 | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | - + + + + + + + + + + + + |
- (void)generate
{
[_include writeString: COPYRIGHT];
[_include writeString:
@"/* This file is automatically generated from amiga-library.xml */"
@"\n\n"];
|
Changes to generators/library/GlueGenerator.h.
| ︙ | |||
21 22 23 24 25 26 27 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | - + + |
#import "OFStream.h"
#import "OFXMLElement.h"
@interface GlueGenerator: OFObject
{
OFXMLElement *_library;
|
Changes to generators/library/GlueGenerator.m.
| ︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + |
#import "OFUnsupportedVersionException.h"
#import "copyright.h"
@implementation GlueGenerator
- (instancetype)initWithLibrary: (OFXMLElement *)library
header: (OFStream *)header
implementation: (OFStream *)impl
morphOSImplementation: (OFStream *)morphOSImpl
{
self = [super init];
@try {
OFXMLAttribute *version;
if (![library.name isEqual: @"amiga-library"] ||
library.namespace != nil)
@throw [OFInvalidFormatException exception];
if ((version = [library attributeForName: @"version"]) == nil)
@throw [OFInvalidFormatException exception];
if (![version.stringValue isEqual: @"1.0"])
@throw [OFUnsupportedVersionException
exceptionWithVersion: version.stringValue];
_library = [library retain];
_header = [header retain];
_impl = [impl retain];
_morphOSImpl = [morphOSImpl retain];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- (void)dealloc
{
[_library release];
[_header release];
[_impl release];
[_morphOSImpl release];
[super dealloc];
}
- (void)generate
{
size_t includes = 0;
[_header writeString: COPYRIGHT];
[_impl writeString: COPYRIGHT];
[_morphOSImpl writeString: COPYRIGHT];
[_header writeString:
@"/* This file is automatically generated from amiga-library.xml */"
@"\n\n"];
[_impl writeString:
@"/* This file is automatically generated from amiga-library.xml */"
@"\n\n"
@"#include \"config.h\"\n"
@"\n"
@"#import \"amiga-glue.h\"\n"
@"\n"];
[_morphOSImpl writeString:
@"/* This file is automatically generated from amiga-library.xml */"
@"\n\n"
@"#include \"config.h\"\n"
@"\n"
@".section .text\n"];
for (OFXMLElement *include in [_library elementsForName: @"include"]) {
[_header writeFormat: @"#import \"%@\"\n",
include.stringValue];
includes++;
}
if (includes > 0)
[_header writeString: @"\n"];
[_header writeString:
@"#ifdef OF_AMIGAOS_M68K\n"
@"# define PPC_PARAMS(...) (void)\n"
@"# define M68K_ARG(type, name, reg)\t\t\\\n"
@"\tregister type reg##name __asm__(#reg);\t\\\n"
@"\ttype name = reg##name;\n"
@"#else\n"
@"# define PPC_PARAMS(...) (__VA_ARGS__)\n"
@"# define M68K_ARG(...)\n"
@"#endif\n"
@"\n"];
for (OFXMLElement *function in
[_library elementsForName: @"function"]) {
OFString *name =
[function attributeForName: @"name"].stringValue;
OFString *returnType =
[function attributeForName: @"return-type"].stringValue;
OFString *condition =
[function attributeForName: @"condition"].stringValue;
OFArray OF_GENERIC(OFXMLElement *) *arguments =
[function elementsForName: @"argument"];
size_t argumentIndex;
[_impl writeString: @"\n"];
[_morphOSImpl writeString: @"\n"];
if (condition != nil) {
[_header writeFormat: @"#if %@\n", condition];
[_impl writeFormat: @"#if %@\n", condition];
[_morphOSImpl writeFormat: @"#if %@\n", condition];
}
if (returnType == nil)
returnType = @"void";
[_header writeFormat:
@"extern %@%@glue_%@",
returnType,
(![returnType hasSuffix: @"*"] ? @" " : @""),
name];
[_impl writeFormat: @"%@ __saveds\n"
@"glue_%@",
returnType, name];
if (arguments.count > 0)
|
Changes to generators/library/LibraryGenerator.m.
| ︙ | |||
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | + + + + + + + |
IRIByAppendingPathComponent: directory];
OFIRI *libraryIRI = [sourcesIRI
IRIByAppendingPathComponent: @"amiga-library.xml"];
OFIRI *linkLibIRI = [sourcesIRI
IRIByAppendingPathComponent: @"linklib/linklib.m"];
OFIRI *glueHeaderIRI = [sourcesIRI
IRIByAppendingPathComponent: @"amiga-library-glue.h"];
OFIRI *glueIRI = [sourcesIRI
IRIByAppendingPathComponent: @"amiga-library-glue.m"];
OFIRI *morphOSGlueIRI = [sourcesIRI
IRIByAppendingPathComponent: @"amiga-library-glue-morphos.S"];
OFIRI *funcArrayIRI = [sourcesIRI
IRIByAppendingPathComponent: @"amiga-library-funcarray.inc"];
OFXMLElement *library = [OFXMLElement elementWithStream:
[OFFile fileWithPath: libraryIRI.fileSystemRepresentation
mode: @"r"]];
OFFile *linkLib =
[OFFile fileWithPath: linkLibIRI.fileSystemRepresentation
mode: @"w"];
OFFile *glueHeader =
[OFFile fileWithPath: glueHeaderIRI.fileSystemRepresentation
mode: @"w"];
OFFile *glue =
[OFFile fileWithPath: glueIRI.fileSystemRepresentation
mode: @"w"];
OFFile *morphOSGlue =
[OFFile fileWithPath: morphOSGlueIRI.fileSystemRepresentation
mode: @"w"];
OFFile *funcArray =
[OFFile fileWithPath: funcArrayIRI.fileSystemRepresentation
mode: @"w"];
LinkLibGenerator *linkLibGenerator = [[[LinkLibGenerator alloc]
initWithLibrary: library
implementation: linkLib] autorelease];
GlueGenerator *glueGenerator = [[[GlueGenerator alloc]
initWithLibrary: library
header: glueHeader
implementation: glue
morphOSImplementation: morphOSGlue] autorelease];
FuncArrayGenerator *funcArrayGenerator = [[[FuncArrayGenerator alloc]
initWithLibrary: library
include: funcArray] autorelease];
[linkLibGenerator generate];
[glueGenerator generate];
[funcArrayGenerator generate];
}
- (void)applicationDidFinishLaunching: (OFNotification *)notification
{
[self generateInDirectory: @"../../src"];
[self generateInDirectory: @"../../src/runtime"];
[OFApplication terminate];
}
@end
|
Changes to generators/library/LinkLibGenerator.m.
| ︙ | |||
123 124 125 126 127 128 129 | 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | [_impl writeString: argType]; if (![argType hasSuffix: @"*"]) [_impl writeString: @" "]; [_impl writeString: argName]; } |
| ︙ | |||
168 169 170 171 172 173 174 | 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | - + + | if (argumentIndex++ > 0) [_impl writeString: @", "]; [_impl writeString: argName]; } |
Changes to src/Makefile.
1 2 3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - + + + + + + + + + |
include ../extra.mk
SUBDIRS = ${RUNTIME} exceptions encodings forwarding
|
| ︙ | |||
258 259 260 261 262 263 264 265 266 267 268 269 | 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 | + + + + + + - + + + + + + |
OBJS_EXTRA = exceptions/exceptions.a \
encodings/encodings.a \
forwarding/forwarding.a
LIB_OBJS_EXTRA = exceptions/exceptions.lib.a \
encodings/encodings.lib.a \
forwarding/forwarding.lib.a
AMIGA_LIB_OBJS_START = amiga-library.amigalib.o
AMIGA_LIB_OBJS_EXTRA = ${AMIGA_LIBRARY_GLUE_AMIGALIB_O} \
exceptions/exceptions.amigalib.a \
encodings/encodings.amigalib.a \
forwarding/forwarding.amigalib.a \
amiga-library-end.amigalib.o
include ../buildsys.mk
${TLS} hid: ${BRIDGE}
|
| ︙ |
Changes to src/OFObject.m.
| ︙ | |||
80 81 82 83 84 85 86 87 88 89 90 91 92 93 | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | + + + + + + + + |
#endif
static struct {
Class isa;
} allocFailedException;
unsigned long OFHashSeed;
#ifdef OF_AMIGAOS
unsigned long *
OFHashSeedRef(void)
{
return &OFHashSeed;
}
#endif
void *
OFAllocMemory(size_t count, size_t size)
{
void *pointer;
if OF_UNLIKELY (count == 0 || size == 0)
|
| ︙ |
Changes to src/OFStdIOStream.h.
| ︙ | |||
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | + + + + + + + + + |
@end
#ifdef __cplusplus
extern "C" {
#endif
/** @file */
#ifndef OF_AMIGAOS
/**
* @brief The standard input as an OFStream.
*/
extern OFStdIOStream *_Nullable OFStdIn;
/**
* @brief The standard output as an OFStream.
*/
extern OFStdIOStream *_Nullable OFStdOut;
/**
* @brief The standard error as an OFStream.
*/
extern OFStdIOStream *_Nullable OFStdErr;
#else
extern OFStdIOStream *_Nonnull *_Nullable OFStdInRef(void);
extern OFStdIOStream *_Nonnull *_Nullable OFStdOutRef(void);
extern OFStdIOStream *_Nonnull *_Nullable OFStdErrRef(void);
# define OFStdIn (*OFStdInRef())
# define OFStdOut (*OFStdOutRef())
# define OFStdErr (*OFStdErrRef())
#endif
/**
* @brief Logs the specified printf-style format to @ref OFStdErr.
*
* This prefixes the output with the date, timestamp, process name and PID.
*
* @param format The format for the line to log. See @ref OFStream#writeFormat:.
|
| ︙ |
Changes to src/OFStdIOStream.m.
| ︙ | |||
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | + + + + + + + + + + + + + + + + + + + + + + + + + + |
#ifdef OF_WINDOWS
void
_reference_to_OFWin32ConsoleStdIOStream(void)
{
[OFWin32ConsoleStdIOStream class];
}
#endif
#ifdef OF_AMIGAOS
# undef OFStdIn
# undef OFStdOut
# undef OFStdErr
#endif
OFStdIOStream *OFStdIn = nil;
OFStdIOStream *OFStdOut = nil;
OFStdIOStream *OFStdErr = nil;
#ifdef OF_AMIGAOS
OFStdIOStream **
OFStdInRef(void)
{
return &OFStdIn;
}
OFStdIOStream **
OFStdOutRef(void)
{
return &OFStdOut;
}
OFStdIOStream **
OFStdErrRef(void)
{
return &OFStdErr;
}
#endif
#ifdef OF_AMIGAOS
OF_DESTRUCTOR()
{
[OFStdIn dealloc];
[OFStdOut dealloc];
[OFStdErr dealloc];
|
| ︙ |
Changes to src/OFTLSStream.h.
| ︙ | |||
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | + + + + + | /** * @brief The implementation for OFTLSStream to use. * * This can be set to a class that is always used for OFTLSStream. This is * useful to either force a specific implementation or to use one that ObjFW * does not know about. */ #ifndef OF_AMIGAOS extern Class OFTLSStreamImplementation; #else extern Class _Nonnull *_Nullable OFTLSStreamImplementationRef(void); # define OFTLSStreamImplementation (*OFTLSStreamImplementationRef()) #endif /** * @brief Returns a string description for the TLS stream error code. * * @param errorCode The error code to return the description for * @return A string description for the TLS stream error code */ |
| ︙ |
Changes to src/OFTLSStream.m.
| ︙ | |||
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | + + + + + + + + + + + + + |
@interface OFTLSStreamHandshakeDelegate: OFObject <OFTLSStreamDelegate>
{
@public
bool _done;
id _exception;
}
@end
#ifdef OF_AMIGAOS
# undef OFTLSStreamImplementation
#endif
Class OFTLSStreamImplementation = Nil;
#ifdef OF_AMIGAOS
Class *
OFTLSStreamImplementationRef(void)
{
return &OFTLSStreamImplementation;
}
#endif
static const OFRunLoopMode handshakeRunLoopMode =
@"OFTLSStreamHandshakeRunLoopMode";
/*
* References to exceptions. This is needed because they are only used by
* subclasses that are in a different library.
*/
|
| ︙ |
Added src/amiga-library-end.S.
|
Added src/amiga-library-funcarray.inc.