ObjFW  Diff

Differences From Artifact [a2974f4317]:

To Artifact [10db3a92d5]:


28
29
30
31
32
33
34






35

36
37
38
39
40
41
42
28
29
30
31
32
33
34
35
36
37
38
39
40

41
42
43
44
45
46
47
48







+
+
+
+
+
+
-
+







#ifdef HAVE_SYS_UTSNAME_H
# include <sys/utsname.h>
#endif
#ifdef OF_MACOS
# include <sys/sysctl.h>
#endif

#if defined(OF_AMIGAOS4)
# define __USE_INLINE__
# define __NOLIBBASE__
# define __NOGLOBALIFACE__
# include <exec/exectags.h>
# include <proto/exec.h>
#ifdef OF_MORPHOS
#elif defined(OF_MORPHOS)
# include <exec/system.h>
# include <proto/exec.h>
#endif

#import "OFSystemInfo.h"
#import "OFApplication.h"
#import "OFArray.h"
92
93
94
95
96
97
98




99
100
101
102
103
104
105
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115







+
+
+
+







#endif

#if defined(OF_X86_64) || defined(OF_X86)
struct x86_regs {
	uint32_t eax, ebx, ecx, edx;
};
#endif

#ifdef OF_AMIGAOS4
extern struct ExecIFace *IExec;
#endif

static size_t pageSize = 4096;
static size_t numberOfCPUs = 1;
static OFString *operatingSystemName = nil;
static OFString *operatingSystemVersion = nil;

static void
616
617
618
619
620
621
622






623
624
625
626
627
628
629
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645







+
+
+
+
+
+







{
# if defined(OF_MACOS)
	int name[2] = { CTL_HW, HW_VECTORUNIT }, value = 0;
	size_t length = sizeof(value);

	if (sysctl(name, 2, &value, &length, NULL, 0) == 0)
		return value;
# elif defined(OF_AMIGAOS4)
	uint32_t vectorUnit;

	GetCPUInfoTags(GCIT_VectorUnit, &vectorUnit, TAG_END);

	return (vectorUnit == VECTORTYPE_ALTIVEC);
# elif defined(OF_MORPHOS)
	uint32_t supportsAltiVec;

	if (NewGetSystemAttrs(&supportsAltiVec, sizeof(supportsAltiVec),
	    SYSTEMINFOTYPE_PPC_ALTIVEC, TAG_DONE) > 0)
		return supportsAltiVec;