ObjFW  Check-in [d57a77b9cd]

Overview
Comment:Fix AmigaOS and devkitPro build
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d57a77b9cdd89d3c95dce7fe7ff4ef74c66f91a25556369470963cc1bf9008e6
User & Date: js on 2020-04-21 19:51:43
Other Links: manifest | tags
Context
2020-04-21
22:47
OFWindowsRegistryKey: Compatibility with Win XP check-in: 94f1f0f479 user: js tags: trunk
19:51
Fix AmigaOS and devkitPro build check-in: d57a77b9cd user: js tags: trunk
2020-04-19
15:24
Several documentation improvements check-in: f27905c199 user: js tags: trunk
Changes

Modified src/OFLocale.m from [aa7c2af69a] to [ddcda35855].

462
463
464
465
466
467
468
469

470
471
472
473
474
475
476
462
463
464
465
466
467
468

469
470
471
472
473
474
475
476







-
+







				    OF_BSWAP32_IF_LE(locale->loc_CountryCode);

				for (length = 0; length < 4; length++)
					if (((char *)territory)[length] == 0)
						break;

				_territory = [[OFString alloc]
				    initWithCString: territory.c
				    initWithCString: territory
					   encoding: _encoding
					     length: length];
			} @finally {
				CloseLocale(locale);
			}
		}

Modified src/macros.h from [0ec579f5ac] to [b900515d8a].

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







-
+


-
+












-
+


-
+







{
	uint32_t ret;
	memcpy(&ret, &f, 4);
	return ret;
}

static OF_INLINE float
OF_INT_TO_FLOAT_RAW(uint32_t u32)
OF_INT_TO_FLOAT_RAW(uint32_t uInt32)
{
	float ret;
	memcpy(&ret, &u32, 4);
	memcpy(&ret, &uInt32, 4);
	return ret;
}

static OF_INLINE uint64_t
OF_DOUBLE_TO_INT_RAW(double d)
{
	uint64_t ret;
	memcpy(&ret, &d, 8);
	return ret;
}

static OF_INLINE double
OF_INT_TO_DOUBLE_RAW(uint64_t u64)
OF_INT_TO_DOUBLE_RAW(uint64_t uInt64)
{
	double ret;
	memcpy(&ret, &u64, 8);
	memcpy(&ret, &uInt64, 8);
	return ret;
}

static OF_INLINE float OF_CONST_FUNC
OF_BSWAP_FLOAT(float f)
{
	return OF_INT_TO_FLOAT_RAW(OF_BSWAP32(OF_FLOAT_TO_INT_RAW(f)));