Comment: | Allow building the runtime as a .framework
This also renames ObjFW-RT to ObjFW_RT, as hyphens should not be in |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
0f42b0eafdca3d8edc07d0b440f225c8 |
User & Date: | js on 2018-01-21 22:16:23 |
Other Links: | manifest | tags |
2018-01-21
| ||
22:29 | Make sure FRAMEWORK_LIBS is always set correctly check-in: 7615f3d657 user: js tags: trunk | |
22:16 | Allow building the runtime as a .framework check-in: 0f42b0eafd user: js tags: trunk | |
21:47 | Update buildsys check-in: 3392826e13 user: js tags: trunk | |
Modified .gitignore from [644c27744a] to [ddf1cb76b4].
︙ | ︙ | |||
25 26 27 28 29 30 31 32 33 34 35 36 37 38 | generators/gen_tables generators/gen_tables.exe src/Info.plist src/ObjFW.framework src/bridge/Info.plist src/bridge/ObjFW_Bridge.framework src/objfw-defs.h src/runtime/ppcinline.h tests/*.map tests/EBOOT.PBP tests/Info.plist tests/PARAM.SFO tests/iOS.xcodeproj/*.pbxuser tests/iOS.xcodeproj/project.xcworkspace | > | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | generators/gen_tables generators/gen_tables.exe src/Info.plist src/ObjFW.framework src/bridge/Info.plist src/bridge/ObjFW_Bridge.framework src/objfw-defs.h src/runtime/ObjFW_RT.framework src/runtime/ppcinline.h tests/*.map tests/EBOOT.PBP tests/Info.plist tests/PARAM.SFO tests/iOS.xcodeproj/*.pbxuser tests/iOS.xcodeproj/project.xcworkspace |
︙ | ︙ |
Modified configure.ac from [51b7eeb39e] to [e96d7e8c11].
︙ | ︙ | |||
25 26 27 28 29 30 31 | *-morphos*) AS_IF([test x"$with_ixemul" != x"yes"], [ OBJCFLAGS="$OBJCFLAGS -noixemul" LDFLAGS="$LDFLAGS -noixemul" enable_files="yes" # Required for reading ENV: AC_SUBST(NOIXEMUL, -noixemul) | | | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | *-morphos*) AS_IF([test x"$with_ixemul" != x"yes"], [ OBJCFLAGS="$OBJCFLAGS -noixemul" LDFLAGS="$LDFLAGS -noixemul" enable_files="yes" # Required for reading ENV: AC_SUBST(NOIXEMUL, -noixemul) AC_SUBST(OBJFW_RT_MORPHOS_LIB, objfw_rt.library) ]) enable_shared="no" enable_threads="no" ;; *-msdosdjgpp*) enable_shared="no" |
︙ | ︙ | |||
247 248 249 250 251 252 253 254 255 256 257 258 259 260 | AC_SUBST(INVOCATION_LIB_A, "invocation.lib.a") AC_SUBST(INVOCATION_INVOCATION_LIB_A, "invocation/invocation.lib.a") AC_SUBST(LOOKUP_ASM_LIB_A, "lookup-asm.lib.a") AC_SUBST(LOOKUP_ASM_LOOKUP_ASM_LIB_A, "lookup-asm/lookup-asm.lib.a") BUILDSYS_FRAMEWORK([ AC_SUBST(OBJFW_FRAMEWORK, "ObjFW.framework") ]) ], [ AC_SUBST(LIBOBJFW_DEP, "../src/libobjfw.a") AC_SUBST(LIBOBJFW_DEP_LVL2, "../../src/libobjfw.a") ]) AC_ARG_ENABLE(static, AS_HELP_STRING([--enable-static], [build static library])) AS_IF([test x"$enable_static" = x"yes" -o x"$enable_shared" = x"no"], [ | > | 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | AC_SUBST(INVOCATION_LIB_A, "invocation.lib.a") AC_SUBST(INVOCATION_INVOCATION_LIB_A, "invocation/invocation.lib.a") AC_SUBST(LOOKUP_ASM_LIB_A, "lookup-asm.lib.a") AC_SUBST(LOOKUP_ASM_LOOKUP_ASM_LIB_A, "lookup-asm/lookup-asm.lib.a") BUILDSYS_FRAMEWORK([ AC_SUBST(OBJFW_FRAMEWORK, "ObjFW.framework") build_framework="yes" ]) ], [ AC_SUBST(LIBOBJFW_DEP, "../src/libobjfw.a") AC_SUBST(LIBOBJFW_DEP_LVL2, "../../src/libobjfw.a") ]) AC_ARG_ENABLE(static, AS_HELP_STRING([--enable-static], [build static library])) AS_IF([test x"$enable_static" = x"yes" -o x"$enable_shared" = x"no"], [ |
︙ | ︙ | |||
370 371 372 373 374 375 376 | ]) AC_SUBST(RUNTIME, "runtime") AC_SUBST(RUNTIME_FLAGS) AS_IF([test x"$enable_shared" != x"no"], [ AC_SUBST(OBJFW_RT_SHARED_LIB, | | | > > > | > | 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 | ]) AC_SUBST(RUNTIME, "runtime") AC_SUBST(RUNTIME_FLAGS) AS_IF([test x"$enable_shared" != x"no"], [ AC_SUBST(OBJFW_RT_SHARED_LIB, "${LIB_PREFIX}objfw_rt${LIB_SUFFIX}") ]) AS_IF([test x"$enable_static" = x"yes" \ -o x"$enable_shared" = x"no"], [ AC_SUBST(OBJFW_RT_STATIC_LIB, "libobjfw_rt.a") ]) AS_IF([test x"$build_framework" = x"yes"], [ AC_SUBST(OBJFW_RT_FRAMEWORK, "ObjFW_RT.framework") ]) AC_SUBST(RUNTIME_LIBS, "-lobjfw_rt") AC_SUBST(RUNTIME_FRAMEWORK_LIBS, "-framework ObjFW_RT") AS_IF([test x"$enable_seluid24" = x"yes"], [ AC_DEFINE(OF_SELUID24, 1, [Whether to use 24 bit selector UIDs]) ]) AC_MSG_CHECKING(for exception type) |
︙ | ︙ | |||
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 | ;; "Apple runtime") AC_DEFINE(OF_APPLE_RUNTIME, 1, [Whether we use the Apple ObjC runtime]) AC_CHECK_LIB(objc, objc_msgSend, [ AC_SUBST(RUNTIME_LIBS, "-lobjc") ], [ AC_MSG_ERROR([libobjc not found!]) ]) ;; esac AC_CHECK_FUNC(objc_constructInstance, [], [ AC_SUBST(INSTANCE_M, "instance.m") ]) AC_CHECK_FUNC(objc_autoreleasePoolPush, [], [ AC_SUBST(AUTORELEASE_M, "autorelease.m") ]) case "$host_os" in darwin*) AC_SUBST(LDFLAGS_REEXPORT, ["-Wl,-reexport-lobjfw"]) AS_IF([test x"$objc_runtime" = x"Apple runtime"], [ AC_SUBST(REEXPORT_RUNTIME, ["-Wl,-reexport-lobjc"]) AC_SUBST(WEAK_NSFOUNDATIONVERSIONNUMBER, ["-Wl,-U,_NSFoundationVersionNumber"]) LDFLAGS="$LDFLAGS -Wl,-U,_NSFoundationVersionNumber" ]) AS_IF([test x"$objc_runtime" = x"ObjFW runtime"], [ AS_IF([test x"$exception_type" = x"DWARF"], [ LDFLAGS="$LDFLAGS -Wl,-U,___gxx_personality_v0" ]) AS_IF([test x"$exception_type" = x"SjLj"], [ LDFLAGS="$LDFLAGS -Wl,-U,___gxx_personality_sj0" ]) | > > > | > > | 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 | ;; "Apple runtime") AC_DEFINE(OF_APPLE_RUNTIME, 1, [Whether we use the Apple ObjC runtime]) AC_CHECK_LIB(objc, objc_msgSend, [ AC_SUBST(RUNTIME_LIBS, "-lobjc") AC_SUBST(RUNTIME_FRAMEWORK_LIBS, "-lobjc") ], [ AC_MSG_ERROR([libobjc not found!]) ]) ;; esac AC_CHECK_FUNC(objc_constructInstance, [], [ AC_SUBST(INSTANCE_M, "instance.m") ]) AC_CHECK_FUNC(objc_autoreleasePoolPush, [], [ AC_SUBST(AUTORELEASE_M, "autorelease.m") ]) case "$host_os" in darwin*) AC_SUBST(LDFLAGS_REEXPORT, ["-Wl,-reexport-lobjfw"]) AS_IF([test x"$objc_runtime" = x"Apple runtime"], [ AC_SUBST(REEXPORT_RUNTIME, ["-Wl,-reexport-lobjc"]) AC_SUBST(REEXPORT_RUNTIME_FRAMEWORK, ["-Wl,-reexport-lobjc"]) AC_SUBST(WEAK_NSFOUNDATIONVERSIONNUMBER, ["-Wl,-U,_NSFoundationVersionNumber"]) LDFLAGS="$LDFLAGS -Wl,-U,_NSFoundationVersionNumber" ]) AS_IF([test x"$objc_runtime" = x"ObjFW runtime"], [ AS_IF([test x"$exception_type" = x"DWARF"], [ LDFLAGS="$LDFLAGS -Wl,-U,___gxx_personality_v0" ]) AS_IF([test x"$exception_type" = x"SjLj"], [ LDFLAGS="$LDFLAGS -Wl,-U,___gxx_personality_sj0" ]) AC_SUBST(REEXPORT_RUNTIME, ["-Wl,-reexport-lobjfw_rt"]) AC_SUBST(REEXPORT_RUNTIME_FRAMEWORK, ["-Wl,-reexport_framework,ObjFW_RT"]) ]) AC_CHECK_HEADERS(sysdir.h) AC_CHECK_FUNCS(sysdir_start_search_path_enumeration) AC_MSG_CHECKING(whether host is iOS) AC_EGREP_CPP(yes, [ |
︙ | ︙ | |||
1288 1289 1290 1291 1292 1293 1294 | AC_CHECK_HEADER(Foundation/NSObject.h, [ AC_SUBST(FOUNDATION_COMPAT_M, "foundation-compat.m") AC_SUBST(BRIDGE, "bridge") AS_IF([test x"$enable_shared" != x"no"], [ AC_SUBST(OBJFW_BRIDGE_SHARED_LIB, "${LIB_PREFIX}objfw_bridge${LIB_SUFFIX}") | < < < < < < < > > > > | 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 | AC_CHECK_HEADER(Foundation/NSObject.h, [ AC_SUBST(FOUNDATION_COMPAT_M, "foundation-compat.m") AC_SUBST(BRIDGE, "bridge") AS_IF([test x"$enable_shared" != x"no"], [ AC_SUBST(OBJFW_BRIDGE_SHARED_LIB, "${LIB_PREFIX}objfw_bridge${LIB_SUFFIX}") ]) AS_IF([test x"$enable_static" = x"yes" \ -o x"$enable_shared" = x"no"], [ AC_SUBST(OBJFW_BRIDGE_STATIC_LIB, "libobjfw_bridge.a") ]) AS_IF([test x"$build_framework" = x"yes"], [ AC_SUBST(OBJFW_BRIDGE_FRAMEWORK, "ObjFW_Bridge.framework") ]) ]) ]) dnl This needs to be after all other header checks, as they include unistd.h, dnl which in old glibc versions uses __block. This is worked around in the code dnl by providing a wrapper for unistd.h which takes care of this. |
︙ | ︙ |
Modified extra.mk.in from [2a9525e704] to [6c0745c9f3].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | OBJFW_SHARED_LIB = @OBJFW_SHARED_LIB@ OBJFW_STATIC_LIB = @OBJFW_STATIC_LIB@ OBJFW_FRAMEWORK = @OBJFW_FRAMEWORK@ # When changing: Be sure to also change these in the Xcode project! OBJFW_LIB_MAJOR = 9 OBJFW_LIB_MINOR = 0 OBJFW_LIB_MAJOR_MINOR = ${OBJFW_LIB_MAJOR}.${OBJFW_LIB_MINOR} OBJFW_RT_SHARED_LIB = @OBJFW_RT_SHARED_LIB@ OBJFW_RT_STATIC_LIB = @OBJFW_RT_STATIC_LIB@ OBJFW_RT_MORPHOS_LIB = @OBJFW_RT_MORPHOS_LIB@ OBJFW_RT_LIB_MAJOR = 0 OBJFW_RT_LIB_MINOR = 0 OBJFW_RT_LIB_MAJOR_MINOR = ${OBJFW_RT_LIB_MAJOR}.${OBJFW_RT_LIB_MINOR} OBJFW_BRIDGE_SHARED_LIB = @OBJFW_BRIDGE_SHARED_LIB@ OBJFW_BRIDGE_STATIC_LIB = @OBJFW_BRIDGE_STATIC_LIB@ | > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | OBJFW_SHARED_LIB = @OBJFW_SHARED_LIB@ OBJFW_STATIC_LIB = @OBJFW_STATIC_LIB@ OBJFW_FRAMEWORK = @OBJFW_FRAMEWORK@ # When changing: Be sure to also change these in the Xcode project! OBJFW_LIB_MAJOR = 9 OBJFW_LIB_MINOR = 0 OBJFW_LIB_MAJOR_MINOR = ${OBJFW_LIB_MAJOR}.${OBJFW_LIB_MINOR} OBJFW_RT_SHARED_LIB = @OBJFW_RT_SHARED_LIB@ OBJFW_RT_STATIC_LIB = @OBJFW_RT_STATIC_LIB@ OBJFW_RT_FRAMEWORK = @OBJFW_RT_FRAMEWORK@ OBJFW_RT_MORPHOS_LIB = @OBJFW_RT_MORPHOS_LIB@ OBJFW_RT_LIB_MAJOR = 0 OBJFW_RT_LIB_MINOR = 0 OBJFW_RT_LIB_MAJOR_MINOR = ${OBJFW_RT_LIB_MAJOR}.${OBJFW_RT_LIB_MINOR} OBJFW_BRIDGE_SHARED_LIB = @OBJFW_BRIDGE_SHARED_LIB@ OBJFW_BRIDGE_STATIC_LIB = @OBJFW_BRIDGE_STATIC_LIB@ |
︙ | ︙ | |||
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | OFKERNELEVENTOBSERVER_KQUEUE_M = @OFKERNELEVENTOBSERVER_KQUEUE_M@ OFKERNELEVENTOBSERVER_POLL_M = @OFKERNELEVENTOBSERVER_POLL_M@ OFKERNELEVENTOBSERVER_SELECT_M = @OFKERNELEVENTOBSERVER_SELECT_M@ OFPROCESS_M = @OFPROCESS_M@ OFSTDIOSTREAM_WIN32CONSOLE_M = @OFSTDIOSTREAM_WIN32CONSOLE_M@ OFZIP = @OFZIP@ REEXPORT_RUNTIME = @REEXPORT_RUNTIME@ RUNTIME = @RUNTIME@ RUNTIME_LIBS = @RUNTIME_LIBS@ RUN_TESTS = @RUN_TESTS@ TESTPLUGIN = @TESTPLUGIN@ TESTS_LIBS = @TESTS_LIBS@ TESTS_OBJCFLAGS = @TESTS_OBJCFLAGS@ TESTS_STATIC_LIB = @TESTS_STATIC_LIB@ UNICODE_M = @UNICODE_M@ | > > | 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | OFKERNELEVENTOBSERVER_KQUEUE_M = @OFKERNELEVENTOBSERVER_KQUEUE_M@ OFKERNELEVENTOBSERVER_POLL_M = @OFKERNELEVENTOBSERVER_POLL_M@ OFKERNELEVENTOBSERVER_SELECT_M = @OFKERNELEVENTOBSERVER_SELECT_M@ OFPROCESS_M = @OFPROCESS_M@ OFSTDIOSTREAM_WIN32CONSOLE_M = @OFSTDIOSTREAM_WIN32CONSOLE_M@ OFZIP = @OFZIP@ REEXPORT_RUNTIME = @REEXPORT_RUNTIME@ REEXPORT_RUNTIME_FRAMEWORK = @REEXPORT_RUNTIME_FRAMEWORK@ RUNTIME = @RUNTIME@ RUNTIME_FRAMEWORK_LIBS = @RUNTIME_FRAMEWORK_LIBS@ RUNTIME_LIBS = @RUNTIME_LIBS@ RUN_TESTS = @RUN_TESTS@ TESTPLUGIN = @TESTPLUGIN@ TESTS_LIBS = @TESTS_LIBS@ TESTS_OBJCFLAGS = @TESTS_OBJCFLAGS@ TESTS_STATIC_LIB = @TESTS_STATIC_LIB@ UNICODE_M = @UNICODE_M@ |
︙ | ︙ |
Modified src/Makefile from [fddf9b0f91] to [d05485b022].
︙ | ︙ | |||
201 202 203 204 205 206 207 | ${FORWARDING_FORWARDING_LIB_A} \ ${INVOCATION_INVOCATION_LIB_A} include ../buildsys.mk CPPFLAGS += -I. -I.. -Iexceptions -Iruntime LD = ${OBJC} | < | | > > | 201 202 203 204 205 206 207 208 209 210 211 | ${FORWARDING_FORWARDING_LIB_A} \ ${INVOCATION_INVOCATION_LIB_A} include ../buildsys.mk CPPFLAGS += -I. -I.. -Iexceptions -Iruntime LD = ${OBJC} LIBS += -Lruntime ${RUNTIME_LIBS} ${REEXPORT_RUNTIME} FRAMEWORK_LIBS += -Fruntime \ ${RUNTIME_FRAMEWORK_LIBS} \ ${REEXPORT_RUNTIME_FRAMEWORK} |
Modified src/OFObject.m from [27d4e83713] to [cc8b3ee1a4].
︙ | ︙ | |||
45 46 47 48 49 50 51 | #import "OFNotImplementedException.h" #import "OFOutOfMemoryException.h" #import "OFOutOfRangeException.h" #if defined(OF_APPLE_RUNTIME) && __OBJC2__ # import <objc/objc-exception.h> #elif defined(OF_OBJFW_RUNTIME) | | | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | #import "OFNotImplementedException.h" #import "OFOutOfMemoryException.h" #import "OFOutOfRangeException.h" #if defined(OF_APPLE_RUNTIME) && __OBJC2__ # import <objc/objc-exception.h> #elif defined(OF_OBJFW_RUNTIME) # import "ObjFW_RT.h" #endif #ifdef OF_WINDOWS # include <windows.h> #endif #import "OFString.h" |
︙ | ︙ |
Modified src/macros.h from [eade3d2bc3] to [6b06f3d8b7].
︙ | ︙ | |||
31 32 33 34 35 36 37 | #include <stdlib.h> #include <string.h> #include "platform.h" #ifdef OF_OBJFW_RUNTIME # ifdef OF_COMPILING_OBJFW | | | | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | #include <stdlib.h> #include <string.h> #include "platform.h" #ifdef OF_OBJFW_RUNTIME # ifdef OF_COMPILING_OBJFW # import "ObjFW_RT.h" # else # import <ObjFW_RT/ObjFW_RT.h> # endif #endif #ifdef OF_APPLE_RUNTIME # import <objc/objc.h> # import <objc/runtime.h> # import <objc/message.h> #endif |
︙ | ︙ |
Modified src/runtime/Makefile from [80fa148287] to [c6d4eca569].
1 2 3 4 5 6 7 8 9 10 11 12 13 | include ../../extra.mk SUBDIRS = lookup-asm SHARED_LIB = ${OBJFW_RT_SHARED_LIB} STATIC_LIB = ${OBJFW_RT_STATIC_LIB} MORPHOS_LIB = ${OBJFW_RT_MORPHOS_LIB} LIB_MAJOR = ${OBJFW_RT_LIB_MAJOR} LIB_MINOR = ${OBJFW_RT_LIB_MINOR} SRCS = arc.m \ category.m \ class.m \ | > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | include ../../extra.mk SUBDIRS = lookup-asm SHARED_LIB = ${OBJFW_RT_SHARED_LIB} STATIC_LIB = ${OBJFW_RT_STATIC_LIB} FRAMEWORK = ${OBJFW_RT_FRAMEWORK} MORPHOS_LIB = ${OBJFW_RT_MORPHOS_LIB} LIB_MAJOR = ${OBJFW_RT_LIB_MAJOR} LIB_MINOR = ${OBJFW_RT_LIB_MINOR} SRCS = arc.m \ category.m \ class.m \ |
︙ | ︙ | |||
22 23 24 25 26 27 28 | selector.m \ sparsearray.m \ static-instances.m \ synchronized.m \ ${USE_SRCS_THREADS} SRCS_THREADS = threading.m \ ../threading.m | | | | | | 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 | selector.m \ sparsearray.m \ static-instances.m \ synchronized.m \ ${USE_SRCS_THREADS} SRCS_THREADS = threading.m \ ../threading.m INCLUDES = ObjFW_RT.h includesubdir = ObjFW_RT OBJS_EXTRA = ${LOOKUP_ASM_LOOKUP_ASM_A} LIB_OBJS_EXTRA = ${LOOKUP_ASM_LOOKUP_ASM_LIB_A} MORPHOS_LIB_OBJS_EXTRA = morphos-library.o ${LOOKUP_ASM_LOOKUP_ASM_A} include ../../buildsys.mk ${MORPHOS_LIB}: ppcinline.h ppcinline.h: ObjFW_RT.fd protos.h cvinclude.pl \ --root ObjFW_RT \ --fd ObjFW_RT.fd \ --clib protos.h \ --inline $@ CPPFLAGS += -I. -I.. -I../.. \ -DOF_COMPILING_OBJFW_RT \ -DOBJFW_RT_LIB_MAJOR=${OBJFW_RT_LIB_MAJOR} \ -DOBJFW_RT_LIB_MINOR=${OBJFW_RT_LIB_MINOR} LD = ${OBJC} |
Deleted src/runtime/ObjFW-RT.fd version [1cf82b39e9].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted src/runtime/ObjFW-RT.h version [d5822f4845].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added src/runtime/ObjFW_RT.fd version [50739d3a7f].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | ##base _ObjFWRTBase ##bias 30 ##public * Functions for the glue code objc_set_exit()(sysv,r12base) * Used by the compiler - these need glue code __objc_exec_class_inline()(sysv,r12base) objc_msg_lookup_inline()(sysv,r12base) objc_msg_lookup_stret_inline()(sysv,r12base) objc_msg_lookup_super_inline()(sysv,r12base) objc_msg_lookup_super_stret_inline()(sysv,r12base) objc_lookUpClass_inline()(sysv,r12base) objc_getClass_inline()(sysv,r12base) objc_getRequiredClass_inline()(sysv,r12base) objc_exception_throw_inline()(sysv,r12base) objc_sync_enter_inline()(sysv,r12base) objc_sync_exit_inline()(sysv,r12base) objc_getProperty_inline()(sysv,r12base) objc_setProperty_inline()(sysv,r12base) objc_getPropertyStruct_inline()(sysv,r12base) objc_setPropertyStruct_inline()(sysv,r12base) objc_enumerationMutation_inline()(sysv,r12base) * Functions declared in ObjFW_RT.h sel_registerName()(sysv,r12base) sel_getName()(sysv,r12base) sel_isEqual()(sysv,r12base) objc_allocateClassPair()(sysv,r12base) objc_registerClassPair()(sysv,r12base) objc_getClassList()(sysv,r12base) objc_copyClassList()(sysv,r12base) class_isMetaClass()(sysv,r12base) class_getName()(sysv,r12base) class_getSuperclass()(sysv,r12base) class_getInstanceSize()(sysv,r12base) class_respondsToSelector()(sysv,r12base) class_conformsToProtocol()(sysv,r12base) class_getMethodImplementation()(sysv,r12base) class_getMethodImplementation_stret()(sysv,r12base) class_getMethodTypeEncoding()(sysv,r12base) class_addMethod()(sysv,r12base) class_replaceMethod()(sysv,r12base) object_getClass()(sysv,r12base) object_setClass()(sysv,r12base) object_getClassName()(sysv,r12base) protocol_getName()(sysv,r12base) protocol_isEqual()(sysv,r12base) protocol_conformsToProtocol()(sysv,r12base) objc_exit()(sysv,r12base) objc_setUncaughtExceptionHandler()(sysv,r12base) objc_setForwardHandler()(sysv,r12base) objc_setEnumerationMutationHandler()(sysv,r12base) objc_zero_weak_references()(sysv,r12base) ##end |
Added src/runtime/ObjFW_RT.h version [d5822f4845].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | /* * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, * 2018 * Jonathan Schleifer <js@heap.zone> * * 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. */ #ifndef __OBJFW_RUNTIME_H__ #define __OBJFW_RUNTIME_H__ #ifndef __STDC_LIMIT_MACROS # define __STDC_LIMIT_MACROS #endif #ifndef __STDC_CONSTANT_MACROS # define __STDC_CONSTANT_MACROS #endif #include <stdbool.h> #include <stddef.h> #include <stdint.h> #ifndef __has_feature # define __has_feature(x) 0 #endif #ifndef __has_attribute # define __has_attribute(x) 0 #endif #if !__has_feature(nullability) # ifndef _Nonnull # define _Nonnull # endif # ifndef _Nullable # define _Nullable # endif # ifndef _Null_unspecified # define _Null_unspecified # endif #endif #if !__has_feature(objc_arc) && !defined(__unsafe_unretained) # define __unsafe_unretained #endif #define Nil (Class _Null_unspecified)0 #define nil (id _Null_unspecified)0 #define YES (BOOL)1 #define NO (BOOL)0 typedef struct objc_class *Class; typedef struct objc_object *id; typedef const struct objc_selector *SEL; typedef signed char BOOL; typedef id _Nullable (*IMP)(id _Nonnull, SEL _Nonnull, ...); typedef void (*objc_uncaught_exception_handler)(id _Nullable); typedef void (*objc_enumeration_mutation_handler)(id _Nonnull); struct objc_class { Class _Nonnull isa; Class _Nullable superclass; const char *_Nonnull name; unsigned long version; unsigned long info; long instance_size; struct objc_ivar_list *_Nullable ivars; struct objc_method_list *_Nullable methodlist; struct objc_dtable *_Nonnull dtable; Class _Nullable *_Nullable subclass_list; void *_Nullable sibling_class; struct objc_protocol_list *_Nullable protocols; void *_Nullable gc_object_type; unsigned long abi_version; int32_t *_Nonnull *_Nullable ivar_offsets; struct objc_property_list *_Nullable properties; }; enum objc_class_info { OBJC_CLASS_INFO_CLASS = 0x001, OBJC_CLASS_INFO_METACLASS = 0x002, OBJC_CLASS_INFO_NEW_ABI = 0x010, OBJC_CLASS_INFO_SETUP = 0x100, OBJC_CLASS_INFO_LOADED = 0x200, OBJC_CLASS_INFO_DTABLE = 0x400, OBJC_CLASS_INFO_INITIALIZED = 0x800 }; struct objc_object { Class _Nonnull isa; }; struct objc_selector { uintptr_t uid; const char *_Nullable types; }; struct objc_super { id __unsafe_unretained _Nullable self; Class _Nonnull cls; }; struct objc_method { struct objc_selector sel; IMP _Nonnull imp; }; struct objc_method_list { struct objc_method_list *_Nullable next; unsigned int count; struct objc_method methods[1]; }; struct objc_category { const char *_Nonnull category_name; const char *_Nonnull class_name; struct objc_method_list *_Nullable instance_methods; struct objc_method_list *_Nullable class_methods; struct objc_protocol_list *_Nullable protocols; }; struct objc_ivar { const char *_Nonnull name; const char *_Nonnull type; unsigned int offset; }; struct objc_ivar_list { unsigned int count; struct objc_ivar ivars[1]; }; enum objc_property_attributes { OBJC_PROPERTY_READONLY = 0x01, OBJC_PROPERTY_GETTER = 0x02, OBJC_PROPERTY_ASSIGN = 0x04, OBJC_PROPERTY_READWRITE = 0x08, OBJC_PROPERTY_RETAIN = 0x10, OBJC_PROPERTY_COPY = 0x20, OBJC_PROPERTY_NONATOMIC = 0x40, OBJC_PROPERTY_SETTER = 0x80 }; enum objc_property_extended_attributes { OBJC_PROPERTY_SYNTHESIZE = 0x1, OBJC_PROPERTY_DYNAMIC = 0x2, OBJC_PROPERTY_PROTOCOL = 0x3, OBJC_PROPERTY_ATOMIC = 0x4, OBJC_PROPERTY_WEAK = 0x8, OBJC_PROPERTY_STRONG = 0x10, OBJC_PROPERTY_UNSAFE_UNRETAINED = 0x20 }; struct objc_property { const char *_Nonnull name; unsigned char attributes, extended_attributes; struct { const char *_Nullable name; const char *_Nullable type; } getter, setter; }; struct objc_property_list { unsigned int count; struct objc_property_list *_Nullable next; struct objc_property properties[1]; }; #ifdef __OBJC__ # if __has_attribute(__objc_root_class__) __attribute__((__objc_root_class__)) # endif @interface Protocol { @public #else typedef struct { #endif Class _Nonnull isa; const char *_Nonnull name; struct objc_protocol_list *_Nullable protocol_list; struct objc_abi_method_description_list *_Nullable instance_methods; struct objc_abi_method_description_list *_Nullable class_methods; #ifdef __OBJC__ } @end #else } Protocol; #endif struct objc_protocol_list { struct objc_protocol_list *_Nullable next; long count; Protocol *__unsafe_unretained _Nonnull list[1]; }; #if 1 /* !defined(__MORPHOS__) || defined(OF_COMPILING_OBJFW_RT) */ # ifdef __cplusplus extern "C" { # endif extern SEL _Nonnull sel_registerName(const char *_Nonnull); extern const char *_Nonnull sel_getName(SEL _Nonnull); extern bool sel_isEqual(SEL _Nonnull, SEL _Nonnull); extern Class _Nonnull objc_allocateClassPair(Class _Nullable, const char *_Nonnull, size_t); extern void objc_registerClassPair(Class _Nonnull); extern unsigned int objc_getClassList(Class _Nonnull *_Nullable, unsigned int); extern Class _Nonnull *_Nonnull objc_copyClassList(unsigned int *_Nullable); extern bool class_isMetaClass(Class _Nullable); extern const char *_Nullable class_getName(Class _Nullable); extern Class _Nullable class_getSuperclass(Class _Nullable); extern unsigned long class_getInstanceSize(Class _Nullable); extern bool class_respondsToSelector(Class _Nullable, SEL _Nonnull); extern bool class_conformsToProtocol(Class _Nullable, Protocol *_Nonnull); extern IMP _Nullable class_getMethodImplementation(Class _Nullable, SEL _Nonnull); extern IMP _Nullable class_getMethodImplementation_stret(Class _Nullable, SEL _Nonnull); extern const char *_Nullable class_getMethodTypeEncoding(Class _Nullable, SEL _Nonnull); extern bool class_addMethod(Class _Nonnull, SEL _Nonnull, IMP _Nonnull, const char *_Nullable); extern IMP _Nullable class_replaceMethod(Class _Nonnull, SEL _Nonnull, IMP _Nonnull, const char *_Nullable); extern Class _Nullable object_getClass(id _Nullable); extern Class _Nullable object_setClass(id _Nullable, Class _Nonnull); extern const char *_Nullable object_getClassName(id _Nullable); extern const char *_Nonnull protocol_getName(Protocol *_Nonnull); extern bool protocol_isEqual(Protocol *_Nonnull, Protocol *_Nonnull); extern bool protocol_conformsToProtocol(Protocol *_Nonnull, Protocol *_Nonnull); extern void objc_exit(void); extern _Nullable objc_uncaught_exception_handler objc_setUncaughtExceptionHandler( objc_uncaught_exception_handler _Nullable); extern void objc_setForwardHandler(IMP _Nullable, IMP _Nullable); extern void objc_setEnumerationMutationHandler( objc_enumeration_mutation_handler _Nullable); extern void objc_zero_weak_references(id _Nonnull); # ifdef __cplusplus } # endif #else # define BOOL EXEC_BOOL # include <ppcinline/macros.h> # undef BOOL # ifdef __cplusplus extern "C" { # endif extern struct Library *ObjFWRTBase; # ifdef __cplusplus } # endif # include "ppcinline.h" #endif #ifdef __cplusplus extern "C" { #endif /* * Used by the compiler, but can also be called manually. * * They need to be in the glue code for the MorphOS library. * * These declarations are also required to prevent Clang's implicit * declarations which include __declspec(dllimport) on Windows. */ struct objc_abi_module; extern void __objc_exec_class(void *_Nonnull); extern IMP _Nonnull objc_msg_lookup(id _Nullable, SEL _Nonnull); extern IMP _Nonnull objc_msg_lookup_stret(id _Nullable, SEL _Nonnull); extern IMP _Nonnull objc_msg_lookup_super(struct objc_super *_Nonnull, SEL _Nonnull); extern IMP _Nonnull objc_msg_lookup_super_stret(struct objc_super *_Nonnull, SEL _Nonnull); extern id _Nullable objc_lookUpClass(const char *_Nonnull); extern id _Nullable objc_getClass(const char *_Nonnull); extern id _Nonnull objc_getRequiredClass(const char *_Nonnull); extern void objc_exception_throw(id _Nullable); extern int objc_sync_enter(id _Nullable); extern int objc_sync_exit(id _Nullable); extern id _Nullable objc_getProperty(id _Nonnull, SEL _Nonnull, ptrdiff_t, BOOL); extern void objc_setProperty(id _Nonnull, SEL _Nonnull, ptrdiff_t, id _Nullable, BOOL, signed char); extern void objc_getPropertyStruct(void *_Nonnull, const void *_Nonnull, ptrdiff_t, BOOL, BOOL); extern void objc_setPropertyStruct(void *_Nonnull, const void *_Nonnull, ptrdiff_t, BOOL, BOOL); extern void objc_enumerationMutation(id _Nonnull); #ifdef __cplusplus } #endif #endif |
Modified src/runtime/arc.m from [8c146c9d27] to [50f4a977be].
︙ | ︙ | |||
13 14 15 16 17 18 19 | * 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" | | | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #import "ObjFW_RT.h" #import "private.h" #ifdef OF_HAVE_THREADS # import "threading.h" #endif #import "OFObject.h" |
︙ | ︙ |
Modified src/runtime/category.m from [d8f8ad3153] to [d7901edc43].
︙ | ︙ | |||
17 18 19 20 21 22 23 | #include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> | | | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #import "ObjFW_RT.h" #import "private.h" static struct objc_hashtable *categories = NULL; static void register_selectors(struct objc_abi_category *cat) { |
︙ | ︙ |
Modified src/runtime/class.m from [355653e066] to [2ddf79d34d].
︙ | ︙ | |||
20 21 22 23 24 25 26 | #include <stdio.h> #include <stdlib.h> #include <string.h> #include <limits.h> #include <assert.h> | | | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #include <stdio.h> #include <stdlib.h> #include <string.h> #include <limits.h> #include <assert.h> #import "ObjFW_RT.h" #import "private.h" static struct objc_hashtable *classes = NULL; static unsigned classes_cnt = 0; static Class *load_queue = NULL; static size_t load_queue_cnt = 0; static struct objc_dtable *empty_dtable = NULL; |
︙ | ︙ |
Modified src/runtime/dtable.m from [8fe9d17772] to [ba92be815f].
︙ | ︙ | |||
16 17 18 19 20 21 22 | */ #include "config.h" #include <stdio.h> #include <stdlib.h> | | | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | */ #include "config.h" #include <stdio.h> #include <stdlib.h> #import "ObjFW_RT.h" #import "private.h" static struct objc_dtable_level2 *empty_level2 = NULL; #ifdef OF_SELUID24 static struct objc_dtable_level3 *empty_level3 = NULL; #endif |
︙ | ︙ |
Modified src/runtime/exception.m from [2831c7587e] to [2f76cd89bc].
︙ | ︙ | |||
17 18 19 20 21 22 23 | #include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> | | | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #import "ObjFW_RT.h" #import "private.h" #import "macros.h" #ifdef OF_HAVE_THREADS # include "threading.h" #endif |
︙ | ︙ |
Modified src/runtime/hashtable.m from [bd4088ddb7] to [7d3f783222].
︙ | ︙ | |||
19 20 21 22 23 24 25 | #include <limits.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> | | | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #include <limits.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #import "ObjFW_RT.h" #import "private.h" struct objc_hashtable_bucket objc_deleted_bucket; uint32_t objc_hash_string(const void *str_) { |
︙ | ︙ |
Modified src/runtime/init.m from [542d62ba79] to [9ac67071b3].
︙ | ︙ | |||
13 14 15 16 17 18 19 | * 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" | | | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #import "ObjFW_RT.h" #import "private.h" void __objc_exec_class(void *module_) { struct objc_abi_module *module = module_; |
︙ | ︙ |
Modified src/runtime/lookup.m from [0a8dc1a730] to [d66050c602].
︙ | ︙ | |||
16 17 18 19 20 21 22 | */ #include "config.h" #include <stdio.h> #include <stdlib.h> | | | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | */ #include "config.h" #include <stdio.h> #include <stdlib.h> #import "ObjFW_RT.h" #import "private.h" #import "macros.h" @interface DummyObject { Class isa; } |
︙ | ︙ |
Modified src/runtime/misc.m from [801d0ecfef] to [c235fc1cd0].
︙ | ︙ | |||
16 17 18 19 20 21 22 | */ #include "config.h" #include <stdio.h> #include <stdlib.h> | | | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | */ #include "config.h" #include <stdio.h> #include <stdlib.h> #include "ObjFW_RT.h" #include "private.h" static objc_enumeration_mutation_handler enumeration_mutation_handler = NULL; void objc_enumerationMutation(id obj) { |
︙ | ︙ |
Modified src/runtime/morphos-library.m from [7147012c81] to [04b4a50718].
︙ | ︙ | |||
13 14 15 16 17 18 19 | * 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" | | | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #import "ObjFW_RT.h" #import "macros.h" #define BOOL EXEC_BOOL #include <dos/dos.h> #include <emul/emulregs.h> #include <exec/execbase.h> #include <exec/nodes.h> |
︙ | ︙ | |||
68 69 70 71 72 73 74 | (ULONG)objc_sync_enter, (ULONG)objc_sync_exit, (ULONG)objc_getProperty, (ULONG)objc_setProperty, (ULONG)objc_getPropertyStruct, (ULONG)objc_setPropertyStruct, (ULONG)objc_enumerationMutation, | | | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | (ULONG)objc_sync_enter, (ULONG)objc_sync_exit, (ULONG)objc_getProperty, (ULONG)objc_setProperty, (ULONG)objc_getPropertyStruct, (ULONG)objc_setPropertyStruct, (ULONG)objc_enumerationMutation, /* Functions declared in ObjFW_RT.h */ (ULONG)sel_registerName, (ULONG)sel_getName, (ULONG)sel_isEqual, (ULONG)objc_allocateClassPair, (ULONG)objc_registerClassPair, (ULONG)objc_getClassList, (ULONG)objc_copyClassList, |
︙ | ︙ | |||
126 127 128 129 130 131 132 | .rt_MatchWord = RTC_MATCHWORD, .rt_MatchTag = &resident, .rt_EndSkip = &resident + 1, .rt_Flags = RTF_AUTOINIT | RTF_PPC, .rt_Version = OBJFW_RT_LIB_MAJOR * 10 + OBJFW_RT_LIB_MINOR, .rt_Type = NT_LIBRARY, .rt_Pri = 0, | | | | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | .rt_MatchWord = RTC_MATCHWORD, .rt_MatchTag = &resident, .rt_EndSkip = &resident + 1, .rt_Flags = RTF_AUTOINIT | RTF_PPC, .rt_Version = OBJFW_RT_LIB_MAJOR * 10 + OBJFW_RT_LIB_MINOR, .rt_Type = NT_LIBRARY, .rt_Pri = 0, .rt_Name = (char *)"objfw_rt.library", .rt_IdString = (char *)"ObjFW_RT " PACKAGE_VERSION " \xA9 2008-2017 Jonathan Schleifer", .rt_Init = &init_table }; /* Magic required to make this a MorphOS binary */ const ULONG __abox__ = 1; |
︙ | ︙ |
Modified src/runtime/property.m from [222e1aa9ff] to [ad22d9f929].
︙ | ︙ | |||
15 16 17 18 19 20 21 | * file. */ #include "config.h" #include <string.h> | | | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | * file. */ #include "config.h" #include <string.h> #import "ObjFW_RT.h" #import "private.h" #import "OFObject.h" #ifdef OF_HAVE_THREADS # import "threading.h" # define NUM_SPINLOCKS 8 /* needs to be a power of 2 */ |
︙ | ︙ |
Modified src/runtime/protocol.m from [3f9b49b76b] to [373c118537].
︙ | ︙ | |||
15 16 17 18 19 20 21 | * file. */ #include "config.h" #include <string.h> | | | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | * file. */ #include "config.h" #include <string.h> #import "ObjFW_RT.h" #import "private.h" @implementation Protocol @end const char * protocol_getName(Protocol *p) |
︙ | ︙ |
Modified src/runtime/selector.m from [b706eb0b5b] to [c1a16c1dcc].
︙ | ︙ | |||
17 18 19 20 21 22 23 | #include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> | | | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #import "ObjFW_RT.h" #import "private.h" #import "macros.h" #ifdef OF_SELUID24 # define SEL_MAX 0xFFFFFF # define SEL_SIZE 3 |
︙ | ︙ |
Modified src/runtime/sparsearray.m from [e4f2e149b9] to [0e0f3e055d].
︙ | ︙ | |||
16 17 18 19 20 21 22 | */ #include "config.h" #include <stdio.h> #include <stdlib.h> | | | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | */ #include "config.h" #include <stdio.h> #include <stdlib.h> #import "ObjFW_RT.h" #import "private.h" struct objc_sparsearray * objc_sparsearray_new(uint8_t index_size) { struct objc_sparsearray *sparsearray; |
︙ | ︙ |
Modified src/runtime/static-instances.m from [e11967d4b1] to [88afa289a1].
︙ | ︙ | |||
16 17 18 19 20 21 22 | */ #include "config.h" #include <stdio.h> #include <stdlib.h> | | | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | */ #include "config.h" #include <stdio.h> #include <stdlib.h> #import "ObjFW_RT.h" #import "private.h" static struct objc_abi_static_instances **static_instances = NULL; static size_t static_instances_cnt = 0; void objc_init_static_instances(struct objc_abi_symtab *symtab) |
︙ | ︙ |
Modified src/runtime/synchronized.m from [f070b5128f] to [9c9179113a].
︙ | ︙ | |||
16 17 18 19 20 21 22 | */ #include "config.h" #include <stdio.h> #include <stdlib.h> | | | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | */ #include "config.h" #include <stdio.h> #include <stdlib.h> #import "ObjFW_RT.h" #import "private.h" #ifdef OF_HAVE_THREADS # import "threading.h" static struct lock_s { id object; |
︙ | ︙ |
Modified src/runtime/threading.m from [94b640a762] to [485a93cc19].
︙ | ︙ | |||
16 17 18 19 20 21 22 | */ #include "config.h" #include <stdio.h> #include <stdlib.h> | | | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | */ #include "config.h" #include <stdio.h> #include <stdlib.h> #import "ObjFW_RT.h" #import "private.h" #import "threading.h" static of_rmutex_t global_mutex; static of_once_t once_control = OF_ONCE_INIT; static void |
︙ | ︙ |
Modified tests/Makefile from [5e33164e81] to [c8e50f1c4a].
︙ | ︙ | |||
65 66 67 68 69 70 71 | post-all: ${RUN_TESTS} .PHONY: run run-on-ios run-on-android run: rm -f libobjfw.so.${OBJFW_LIB_MAJOR} rm -f libobjfw.so.${OBJFW_LIB_MAJOR_MINOR} rm -f libobjfw.dll libobjfw.${OBJFW_LIB_MAJOR}.dylib | | | | | | | | | | | | | | | | | | | | 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 | post-all: ${RUN_TESTS} .PHONY: run run-on-ios run-on-android run: rm -f libobjfw.so.${OBJFW_LIB_MAJOR} rm -f libobjfw.so.${OBJFW_LIB_MAJOR_MINOR} rm -f libobjfw.dll libobjfw.${OBJFW_LIB_MAJOR}.dylib rm -f libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR} rm -f libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR_MINOR} rm -f libobjfw_rt.dll libobjfw_rt.${OBJFW_RT_LIB_MAJOR}.dylib if test -f ../src/libobjfw.so; then \ ${LN_S} ../src/libobjfw.so libobjfw.so.${OBJFW_LIB_MAJOR}; \ ${LN_S} ../src/libobjfw.so \ libobjfw.so.${OBJFW_LIB_MAJOR_MINOR}; \ elif test -f ../src/libobjfw.so.${OBJFW_LIB_MAJOR_MINOR}; then \ ${LN_S} ../src/libobjfw.so.${OBJFW_LIB_MAJOR_MINOR} \ libobjfw.so.${OBJFW_LIB_MAJOR_MINOR}; \ fi if test -f ../src/libobjfw.dll; then \ ${LN_S} ../src/libobjfw.dll libobjfw.dll; \ fi if test -f ../src/libobjfw.dylib; then \ ${LN_S} ../src/libobjfw.dylib \ libobjfw.${OBJFW_LIB_MAJOR}.dylib; \ fi if test -f ../src/runtime/libobjfw_rt.so; then \ ${LN_S} ../src/runtime/libobjfw_rt.so \ libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR}; \ ${LN_S} ../src/runtime/libobjfw_rt.so \ libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR_MINOR}; \ elif test -f ../src/runtime/libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR_MINOR}; then \ ${LN_S} ../src/runtime/libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR_MINOR} libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR_MINOR}; \ fi if test -f ../src/runtime/libobjfw_rt.dll; then \ ${LN_S} ../src/runtime/libobjfw_rt.dll libobjfw_rt.dll; \ fi if test -f ../src/runtime/libobjfw_rt.dylib; then \ ${LN_S} ../src/runtime/libobjfw_rt.dylib \ libobjfw_rt.${OBJFW_RT_LIB_MAJOR}.dylib; \ fi LD_LIBRARY_PATH=.$${LD_LIBRARY_PATH+:}$$LD_LIBRARY_PATH \ DYLD_LIBRARY_PATH=.$${DYLD_LIBRARY_PATH+:}$$DYLD_LIBRARY_PATH \ LIBRARY_PATH=.$${LIBRARY_PATH+:}$$LIBRARY_PATH \ ASAN_OPTIONS=allocator_may_return_null=1 \ ${WRAPPER} ./${PROG_NOINST}; EXIT=$$?; \ rm -f libobjfw.so.${OBJFW_LIB_MAJOR}; \ rm -f libobjfw.so.${OBJFW_LIB_MAJOR_MINOR} libobjfw.dll; \ rm -f libobjfw.${OBJFW_LIB_MAJOR}.dylib; \ rm -f libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR}; \ rm -f libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR_MINOR} libobjfw_rt.dll; \ rm -f libobjfw_rt.${OBJFW_RT_LIB_MAJOR}.dylib; \ exit $$EXIT run-on-ios: all if [ -z "${IOS_HOST}" ]; then \ echo "Please set IOS_HOST to the hostname of your iOS host!"; \ exit 1; \ fi |
︙ | ︙ | |||
136 137 138 139 140 141 142 | run-on-android: all echo "Uploading files to Android device..." if test -f ../src/libobjfw.so; then \ adb push ../src/libobjfw.so \ /data/local/tmp/objfw/libobjfw.so.${OBJFW_LIB_MAJOR}; \ fi | | | | | 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | run-on-android: all echo "Uploading files to Android device..." if test -f ../src/libobjfw.so; then \ adb push ../src/libobjfw.so \ /data/local/tmp/objfw/libobjfw.so.${OBJFW_LIB_MAJOR}; \ fi if test -f ../src/runtime/libobjfw_rt.so; then \ adb push ../src/runtime/libobjfw_rt.so \ /data/local/tmp/objfw/libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR}; \ fi adb push tests /data/local/tmp/objfw/tests adb push testfile.bin /data/local/tmp/objfw/testfile.bin adb push testfile.txt /data/local/tmp/objfw/testfile.txt adb push testfile.ini /data/local/tmp/objfw/testfile.ini adb push serialization.xml /data/local/tmp/objfw/serialization.xml if test -f plugin/TestPlugin.so; then \ |
︙ | ︙ |
Modified tests/OFBlockTests.m from [b393126e7b] to [06efef82d6].
︙ | ︙ | |||
18 19 20 21 22 23 24 | #include "config.h" #import "OFBlock.h" #import "OFString.h" #import "OFAutoreleasePool.h" #if defined(OF_OBJFW_RUNTIME) | | | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #include "config.h" #import "OFBlock.h" #import "OFString.h" #import "OFAutoreleasePool.h" #if defined(OF_OBJFW_RUNTIME) # include "ObjFW_RT.h" #elif defined(OF_APPLE_RUNTIME) # include <objc/runtime.h> #endif #import "TestsAppDelegate.h" static OFString *module = @"OFBlock"; |
︙ | ︙ |
Modified tests/objc_sync/Makefile from [9a7ef098a8] to [bedcf46763].
︙ | ︙ | |||
8 9 10 11 12 13 14 | post-all: ${RUN_TESTS} .PHONY: run run: rm -f libobjfw.so.${OBJFW_LIB_MAJOR} rm -f libobjfw.so.${OBJFW_LIB_MAJOR_MINOR} rm -f libobjfw.dll libobjfw.${OBJFW_LIB_MAJOR}.dylib | | | | | | | | | | | | | | | | | | | | 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 | post-all: ${RUN_TESTS} .PHONY: run run: rm -f libobjfw.so.${OBJFW_LIB_MAJOR} rm -f libobjfw.so.${OBJFW_LIB_MAJOR_MINOR} rm -f libobjfw.dll libobjfw.${OBJFW_LIB_MAJOR}.dylib rm -f libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR} rm -f libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR_MINOR} rm -f libobjfw_rt.dll libobjfw_rt.${OBJFW_RT_LIB_MAJOR}.dylib if test -f ../../src/libobjfw.so; then \ ${LN_S} ../../src/libobjfw.so libobjfw.so.${OBJFW_LIB_MAJOR}; \ ${LN_S} ../../src/libobjfw.so \ libobjfw.so.${OBJFW_LIB_MAJOR_MINOR}; \ elif test -f ../../src/libobjfw.so.${OBJFW_LIB_MAJOR_MINOR}; then \ ${LN_S} ../../src/libobjfw.so.${OBJFW_LIB_MAJOR_MINOR} \ libobjfw.so.${OBJFW_LIB_MAJOR_MINOR}; \ fi if test -f ../../src/libobjfw.dll; then \ ${LN_S} ../../src/libobjfw.dll libobjfw.dll; \ fi if test -f ../../src/libobjfw.dylib; then \ ${LN_S} ../../src/libobjfw.dylib \ libobjfw.${OBJFW_LIB_MAJOR}.dylib; \ fi if test -f ../../src/runtime/libobjfw_rt.so; then \ ${LN_S} ../../src/runtime/libobjfw_rt.so \ libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR}; \ ${LN_S} ../../src/runtime/libobjfw_rt.so \ libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR_MINOR}; \ elif test -f ../../src/runtime/libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR_MINOR}; then \ ${LN_S} ../../src/runtime/libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR_MINOR} libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR_MINOR}; \ fi if test -f ../../src/runtime/libobjfw_rt.dll; then \ ${LN_S} ../../src/runtime/libobjfw_rt.dll libobjfw_rt.dll; \ fi if test -f ../../src/runtime/libobjfw_rt.dylib; then \ ${LN_S} ../../src/runtime/libobjfw_rt.dylib \ libobjfw_rt.${OBJFW_RT_LIB_MAJOR}.dylib; \ fi LD_LIBRARY_PATH=.$${LD_LIBRARY_PATH+:}$$LD_LIBRARY_PATH \ DYLD_LIBRARY_PATH=.$${DYLD_LIBRARY_PATH+:}$$DYLD_LIBRARY_PATH \ LIBRARY_PATH=.$${LIBRARY_PATH+:}$$LIBRARY_PATH \ ${WRAPPER} ./${PROG_NOINST}; EXIT=$$?; \ rm -f libobjfw.so.${OBJFW_LIB_MAJOR}; \ rm -f libobjfw.so.${OBJFW_LIB_MAJOR_MINOR} libobjfw.dll; \ rm -f libobjfw.${OBJFW_LIB_MAJOR}.dylib; \ rm -f libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR}; \ rm -f libobjfw_rt.so.${OBJFW_RT_LIB_MAJOR_MINOR} libobjfw_rt.dll; \ rm -f libobjfw_rt.${OBJFW_RT_LIB_MAJOR}.dylib; \ exit $$EXIT CPPFLAGS += -I../../src/runtime -I../../src -I../.. LIBS := -L../../src -lobjfw ${LIBS} LD = ${OBJC} |
Modified utils/objfw-config.in from [cb27619734] to [4b31103da3].
︙ | ︙ | |||
32 33 34 35 36 37 38 | LIB_SUFFIX="@LIB_SUFFIX@" LDFLAGS="@NOIXEMUL@ @ALLOW_MULTIPLE_DEFINITION@" LDFLAGS="$LDFLAGS @WEAK_NSFOUNDATIONVERSIONNUMBER@" LDFLAGS_REEXPORT="@LDFLAGS_REEXPORT@" LDFLAGS_RPATH="@LDFLAGS_RPATH@" LIBS="-L${libdir} -lobjfw @RUNTIME_LIBS@ @LIBS@" FRAMEWORK_LIBS="-F${prefix}/Library/Frameworks -framework ObjFW" | | | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | LIB_SUFFIX="@LIB_SUFFIX@" LDFLAGS="@NOIXEMUL@ @ALLOW_MULTIPLE_DEFINITION@" LDFLAGS="$LDFLAGS @WEAK_NSFOUNDATIONVERSIONNUMBER@" LDFLAGS_REEXPORT="@LDFLAGS_REEXPORT@" LDFLAGS_RPATH="@LDFLAGS_RPATH@" LIBS="-L${libdir} -lobjfw @RUNTIME_LIBS@ @LIBS@" FRAMEWORK_LIBS="-F${prefix}/Library/Frameworks -framework ObjFW" FRAMEWORK_LIBS="$FRAMEWORK_LIBS @RUNTIME_FRAMEWORK_LIBS@ @LIBS@" PLUGIN_CFLAGS="@PLUGIN_CFLAGS@" PLUGIN_LDFLAGS="@PLUGIN_LDFLAGS@" PLUGIN_SUFFIX="@PLUGIN_SUFFIX@" PROG_SUFFIX="@EXEEXT@" STATIC_LIBS="${libdir}/libobjfw.a @LIBS@" VERSION="@PACKAGE_VERSION@" |
︙ | ︙ |