Overview
Comment: | Make all tests pass on AmigaOS 3
Note: There is still some weirdness in the compiler. Instead of Before running the tests, you need to run "stack 8192". |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
49cb6ada5f8e15f4daad81ff16ef0418 |
User & Date: | js on 2018-04-22 23:42:20 |
Other Links: | manifest | tags |
Context
2018-04-23
| ||
22:19 | Use more native AmigaOS APIs on AmigaOS 3 check-in: b16fc262c0 user: js tags: trunk | |
2018-04-22
| ||
23:42 | Make all tests pass on AmigaOS 3 check-in: 49cb6ada5f user: js tags: trunk | |
18:52 | Relink everything if libobjfw_rt.a changed check-in: 4c7b3ee778 user: js tags: trunk | |
Changes
Modified configure.ac from [50d23c6b89] to [c90d8efdd2].
︙ | ︙ | |||
37 38 39 40 41 42 43 | AC_DEFINE(ULLONG_MAX, 0xFFFFFFFFFFFFFFFFULL, [Maximum value for unsigned long long]) AC_DEFINE(LLONG_MAX, 0x7FFFFFFFFFFFFFFFLL, [Maximum value for long long]) AC_DEFINE(LLONG_MIN, [(-0x7FFFFFFFFFFFFFFFLL - 1)], [Minimum value for long long]) | < < < < < < < < < < < < < < < < < < < < | | < < < < < < < < < < | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | AC_DEFINE(ULLONG_MAX, 0xFFFFFFFFFFFFFFFFULL, [Maximum value for unsigned long long]) AC_DEFINE(LLONG_MAX, 0x7FFFFFFFFFFFFFFFLL, [Maximum value for long long]) AC_DEFINE(LLONG_MIN, [(-0x7FFFFFFFFFFFFFFFLL - 1)], [Minimum value for long long]) AC_DEFINE(__have_longlong64, 1, [Required for AmigaOS to correctly define PRI?64]) AC_SUBST(NOIXEMUL, -noixemul) ;; powerpc-*-amigaos*) enable_shared="no" enable_threads="no" ;; |
︙ | ︙ |
Modified src/OFString.m from [1882c89ea1] to [2d7f2091d4].
︙ | ︙ | |||
2502 2503 2504 2505 2506 2507 2508 | return value; } - (float)floatValue { void *pool = objc_autoreleasePoolPush(); | | | 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 | return value; } - (float)floatValue { void *pool = objc_autoreleasePoolPush(); #if defined(OF_AMIGAOS3) || defined(OF_MORPHOS) OFString *stripped = [self stringByDeletingEnclosingWhitespaces]; if ([stripped caseInsensitiveCompare: @"INF"] == OF_ORDERED_SAME || [stripped caseInsensitiveCompare: @"INFINITY"] == OF_ORDERED_SAME) return INFINITY; if ([stripped caseInsensitiveCompare: @"-INF"] == OF_ORDERED_SAME || [stripped caseInsensitiveCompare: @"-INFINITY"] == OF_ORDERED_SAME) |
︙ | ︙ | |||
2552 2553 2554 2555 2556 2557 2558 | return value; } - (double)doubleValue { void *pool = objc_autoreleasePoolPush(); | | | 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 | return value; } - (double)doubleValue { void *pool = objc_autoreleasePoolPush(); #if defined(OF_AMIGAOS3) || defined(OF_MORPHOS) OFString *stripped = [self stringByDeletingEnclosingWhitespaces]; if ([stripped caseInsensitiveCompare: @"INF"] == OF_ORDERED_SAME || [stripped caseInsensitiveCompare: @"INFINITY"] == OF_ORDERED_SAME) return INFINITY; if ([stripped caseInsensitiveCompare: @"-INF"] == OF_ORDERED_SAME || [stripped caseInsensitiveCompare: @"-INFINITY"] == OF_ORDERED_SAME) |
︙ | ︙ |
Modified src/OFSystemInfo.m from [d70c261d5b] to [a6ae61b1e9].
︙ | ︙ | |||
109 110 111 112 113 114 115 116 117 118 119 120 121 122 | operatingSystemName = @"iOS"; #elif defined(OF_MACOS) operatingSystemName = @"macOS"; #elif defined(OF_WINDOWS) operatingSystemName = @"Windows"; #elif defined(OF_ANDROID) operatingSystemName = @"Android"; #elif defined(OF_MORPHOS) operatingSystemName = @"MorphOS"; #elif defined(OF_AMIGAOS4) operatingSystemName = @"AmigaOS 4"; #elif defined(OF_WII) operatingSystemName = @"Nintendo Wii"; #elif defined(NINTENDO_3DS) | > > | 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | operatingSystemName = @"iOS"; #elif defined(OF_MACOS) operatingSystemName = @"macOS"; #elif defined(OF_WINDOWS) operatingSystemName = @"Windows"; #elif defined(OF_ANDROID) operatingSystemName = @"Android"; #elif defined(OF_AMIGAOS3) operatingSystemName = @"AmigaOS"; #elif defined(OF_MORPHOS) operatingSystemName = @"MorphOS"; #elif defined(OF_AMIGAOS4) operatingSystemName = @"AmigaOS 4"; #elif defined(OF_WII) operatingSystemName = @"Nintendo Wii"; #elif defined(NINTENDO_3DS) |
︙ | ︙ |
Modified src/objfw-defs.h.in from [63d5610c05] to [558f07b729].
︙ | ︙ | |||
37 38 39 40 41 42 43 | #undef OF_HAVE_THREADS #undef OF_HAVE_UNICODE_TABLES #undef OF_HAVE__THREAD_LOCAL #undef OF_HAVE___THREAD #undef OF_NINTENDO_DS #undef OF_OBJFW_RUNTIME #undef OF_UNIVERSAL | < < < < < < < < < < < < < < < < < < < < < < < < > | 37 38 39 40 41 42 43 44 45 46 47 | #undef OF_HAVE_THREADS #undef OF_HAVE_UNICODE_TABLES #undef OF_HAVE__THREAD_LOCAL #undef OF_HAVE___THREAD #undef OF_NINTENDO_DS #undef OF_OBJFW_RUNTIME #undef OF_UNIVERSAL #undef SIZE_MAX #undef UINTPTR_MAX #undef ULLONG_MAX #undef __have_longlong64 |
Modified tests/OFStringTests.m from [38c5330f76] to [e81e35af26].
︙ | ︙ | |||
874 875 876 877 878 879 880 | /* * These test numbers can be generated without rounding if we have IEEE * floating point numbers, thus we can use == on them. */ TEST(@"-[floatValue]", [C(@"\t-0.25 ") floatValue] == -0.25 && | | | > | | > | > > | 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 | /* * These test numbers can be generated without rounding if we have IEEE * floating point numbers, thus we can use == on them. */ TEST(@"-[floatValue]", [C(@"\t-0.25 ") floatValue] == -0.25 && [C(@"\r\n\tINF\t\n") floatValue] == INFINITY && [C(@"\r -INFINITY\n") floatValue] == -INFINITY && isnan([C(@" NAN\t\t") floatValue])) #if !defined(OF_ANDROID) && !defined(OF_SOLARIS) && !defined(OF_DJGPP) && \ !defined(OF_AMIGAOS3) # define INPUT @"\t-0x1.FFFFFFFFFFFFFP-1020 " # define EXPECTED -0x1.FFFFFFFFFFFFFP-1020 #else /* Android, Solaris, DJGPP and AmigaOS3 do not accept 0x for strtod() */ # if (!defined(OF_SOLARIS) || !defined(OF_X86)) && !defined(OF_AMIGAOS3) # define INPUT @"\t-0.123456789 " # define EXPECTED -0.123456789 # else /* * Solaris' strtod() has weird rounding on x86, but not on x86_64/ * AmigaOS 3 with libnix has weird rounding as well. */ # define INPUT @"\t-0.125 " # define EXPECTED -0.125 # endif #endif TEST(@"-[doubleValue]", [INPUT doubleValue] == EXPECTED && [C(@"\r\n\tINF\t\n") doubleValue] == INFINITY && |
︙ | ︙ |