···2525 else (FRAMEWORK_IOSSUPPORT)
2626 set(sys_library_dir "System/Library")
2727 endif (FRAMEWORK_IOSSUPPORT)
2828-2828+2929 if(DEFINED FRAMEWORK_PARENT)
3030 if(NOT DEFINED FRAMEWORK_PARENT_VERSION)
3131 # 99% of the time it's version A
+1-1
cmake/dsym.cmake
···33333434function(FindDsymutil)
3535 # llvm-dsymutil-4.0 is not listed, because it's very buggy
3636- find_program(DSYMUTIL_EXE NAMES "llvm-dsymutil" "dsymutil" "dsymutil-7" "llvm-dsymutil-7.0" "llvm-dsymutil-6.0" "llvm-dsymutil-5.0" "llvm-dsymutil-3.9" "llvm-dsymutil-3.8" "llvm-dsymutil-3.7")
3636+ find_program(DSYMUTIL_EXE NAMES "llvm-dsymutil" "dsymutil" "dsymutil-7" "llvm-dsymutil-7.0" "llvm-dsymutil-6.0" "llvm-dsymutil-5.0" "llvm-dsymutil-3.9" "llvm-dsymutil-3.8" "llvm-dsymutil-3.7" "dsymutil-10")
3737 if (DSYMUTIL_EXE)
3838 message(STATUS "Found dsymutil: ${DSYMUTIL_EXE}")
3939 else (DSYMUTIL_EXE)
···11+/*
22+ This file is part of Darling.
33+44+ Copyright (C) 2020 Lubos Dolezel
55+66+ Darling is free software: you can redistribute it and/or modify
77+ it under the terms of the GNU General Public License as published by
88+ the Free Software Foundation, either version 3 of the License, or
99+ (at your option) any later version.
1010+1111+ Darling is distributed in the hope that it will be useful,
1212+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1313+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414+ GNU General Public License for more details.
1515+1616+ You should have received a copy of the GNU General Public License
1717+ along with Darling. If not, see <http://www.gnu.org/licenses/>.
1818+*/
1919+2020+#ifndef SIMD_H
2121+#define SIMD_H
2222+2323+#include <simd/vector_make.h>
2424+#include <simd/vector_types.h>
2525+2626+#endif
+33
src/simd/include/simd/vector_make.h
···11+/*
22+ This file is part of Darling.
33+44+ Copyright (C) 2020 Lubos Dolezel
55+66+ Darling is free software: you can redistribute it and/or modify
77+ it under the terms of the GNU General Public License as published by
88+ the Free Software Foundation, either version 3 of the License, or
99+ (at your option) any later version.
1010+1111+ Darling is distributed in the hope that it will be useful,
1212+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1313+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414+ GNU General Public License for more details.
1515+1616+ You should have received a copy of the GNU General Public License
1717+ along with Darling. If not, see <http://www.gnu.org/licenses/>.
1818+*/
1919+2020+#ifndef VECTOR_MAKE_H
2121+#define VECTOR_MAKE_H
2222+2323+#include <simd/vector_types.h>
2424+2525+inline simd_float3 simd_make_float3(float x, float y, float z) {
2626+ return (simd_float3){x, y, z};
2727+}
2828+2929+inline simd_uint2 simd_make_uint2(unsigned int x, unsigned int y) {
3030+ return (simd_uint2){x, y};
3131+}
3232+3333+#endif
+211
src/simd/include/simd/vector_types.h
···11+/*
22+ This file is part of Darling.
33+44+ Copyright (C) 2020 Lubos Dolezel
55+66+ Darling is free software: you can redistribute it and/or modify
77+ it under the terms of the GNU General Public License as published by
88+ the Free Software Foundation, either version 3 of the License, or
99+ (at your option) any later version.
1010+1111+ Darling is distributed in the hope that it will be useful,
1212+ but WITHOUT ANY WARRANTY; without even the implied warranty of
1313+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1414+ GNU General Public License for more details.
1515+1616+ You should have received a copy of the GNU General Public License
1717+ along with Darling. If not, see <http://www.gnu.org/licenses/>.
1818+*/
1919+2020+#ifndef VECTOR_TYPE_H
2121+#define VECTOR_TYPE_H
2222+2323+// typedef __attribute__((ext_vector_type())) ;
2424+#define simd_struct(NAME_TYPE, A, B) \
2525+typedef struct { \
2626+ NAME_TYPE##B columns[A]; \
2727+} NAME_TYPE##A##x##B
2828+2929+#define simd_type(NAME_TYPE, SIZE) \
3030+typedef NAME_TYPE##1 __attribute__((ext_vector_type(SIZE))) NAME_TYPE##SIZE
3131+3232+typedef bool simd_bool;
3333+3434+3535+typedef char simd_char1;
3636+simd_type(simd_char, 2); // simd_char2
3737+simd_type(simd_char, 3); // simd_char3
3838+simd_type(simd_char, 4); // simd_char4
3939+simd_type(simd_char, 8); // simd_char8
4040+simd_type(simd_char, 16); // simd_char16
4141+simd_type(simd_char, 32); // simd_char32
4242+simd_type(simd_char, 64); // simd_char64
4343+4444+typedef simd_char2 vector_char2;
4545+typedef simd_char3 vector_char3;
4646+typedef simd_char4 vector_char4;
4747+typedef simd_char8 vector_char8;
4848+typedef simd_char16 vector_char16;
4949+typedef simd_char32 vector_char32;
5050+5151+5252+typedef unsigned char simd_uchar1;
5353+simd_type(simd_uchar, 2); // simd_uchar2
5454+simd_type(simd_uchar, 3); // simd_uchar3
5555+simd_type(simd_uchar, 4); // simd_uchar4
5656+simd_type(simd_uchar, 8); // simd_uchar8
5757+simd_type(simd_uchar, 16); // simd_uchar16
5858+simd_type(simd_uchar, 32); // simd_uchar32
5959+simd_type(simd_uchar, 64); // simd_uchar64
6060+6161+typedef simd_uchar2 vector_uchar2;
6262+typedef simd_uchar3 vector_uchar3;
6363+typedef simd_uchar4 vector_uchar4;
6464+typedef simd_uchar8 vector_uchar8;
6565+typedef simd_uchar16 vector_uchar16;
6666+typedef simd_uchar32 vector_uchar32;
6767+6868+6969+typedef short simd_short1;
7070+simd_type(simd_short, 2); // simd_short2
7171+simd_type(simd_short, 3); // simd_short3
7272+simd_type(simd_short, 4); // simd_short4
7373+simd_type(simd_short, 8); // simd_short8
7474+simd_type(simd_short, 16); // simd_short16
7575+simd_type(simd_short, 32); // simd_short32
7676+7777+typedef simd_short2 vector_short2;
7878+typedef simd_short3 vector_short3;
7979+typedef simd_short4 vector_short4;
8080+typedef simd_short8 vector_short8;
8181+typedef simd_short16 vector_short16;
8282+typedef simd_short32 vector_short32;
8383+8484+8585+typedef unsigned short simd_ushort1;
8686+simd_type(simd_ushort, 2); // simd_ushort2
8787+simd_type(simd_ushort, 3); // simd_ushort3
8888+simd_type(simd_ushort, 4); // simd_ushort4
8989+simd_type(simd_ushort, 8); // simd_ushort8
9090+simd_type(simd_ushort, 16); // simd_ushort16
9191+simd_type(simd_ushort, 32); // simd_ushort32
9292+9393+typedef simd_ushort2 vector_ushort2;
9494+typedef simd_ushort3 vector_ushort3;
9595+typedef simd_ushort4 vector_ushort4;
9696+typedef simd_ushort8 vector_ushort8;
9797+typedef simd_ushort16 vector_ushort16;
9898+typedef simd_ushort32 vector_ushort32;
9999+100100+101101+typedef int simd_int1;
102102+simd_type(simd_int, 2); // simd_int2
103103+simd_type(simd_int, 3); // simd_int3
104104+simd_type(simd_int, 4); // simd_int4
105105+simd_type(simd_int, 8); // simd_int8
106106+simd_type(simd_int, 16); // simd_int16
107107+108108+typedef simd_int2 vector_int2;
109109+typedef simd_int3 vector_int3;
110110+typedef simd_int4 vector_int4;
111111+typedef simd_int8 vector_int8;
112112+typedef simd_int16 vector_int16;
113113+114114+115115+typedef unsigned int simd_uint1;
116116+simd_type(simd_uint, 2); // simd_uint2
117117+simd_type(simd_uint, 3); // simd_uint3
118118+simd_type(simd_uint, 4); // simd_uint4
119119+simd_type(simd_uint, 8); // simd_uint8
120120+simd_type(simd_uint, 16); // simd_uint16
121121+122122+typedef simd_uint2 vector_uint2;
123123+typedef simd_uint3 vector_uint3;
124124+typedef simd_uint4 vector_uint4;
125125+typedef simd_uint8 vector_uint8;
126126+typedef simd_uint16 vector_uint16;
127127+128128+129129+typedef long simd_long1;
130130+simd_type(simd_long, 2); // simd_long2
131131+simd_type(simd_long, 3); // simd_long3
132132+simd_type(simd_long, 4); // simd_long4
133133+simd_type(simd_long, 8); // simd_long8
134134+135135+typedef simd_long1 vector_long1;
136136+typedef simd_long2 vector_long2;
137137+typedef simd_long3 vector_long3;
138138+typedef simd_long4 vector_long4;
139139+typedef simd_long8 vector_long8;
140140+141141+142142+typedef unsigned long simd_ulong1;
143143+simd_type(simd_ulong, 2); // simd_ulong2
144144+simd_type(simd_ulong, 3); // simd_ulong3
145145+simd_type(simd_ulong, 4); // simd_ulong4
146146+simd_type(simd_ulong, 8); // simd_ulong8
147147+148148+typedef simd_ulong1 vector_ulong1;
149149+typedef simd_ulong2 vector_ulong2;
150150+typedef simd_ulong3 vector_ulong3;
151151+typedef simd_ulong4 vector_ulong4;
152152+typedef simd_ulong8 vector_ulong8;
153153+154154+155155+typedef float simd_float1;
156156+simd_type(simd_float, 2); // simd_float2
157157+simd_type(simd_float, 3); // simd_float3
158158+simd_type(simd_float, 4); // simd_float4
159159+simd_type(simd_float, 8); // simd_float8
160160+simd_type(simd_float, 16); // simd_float16
161161+162162+typedef simd_float2 vector_float2;
163163+typedef simd_float4 vector_float4;
164164+typedef simd_float8 vector_float8;
165165+typedef simd_float16 vector_float16;
166166+167167+168168+typedef double simd_double1;
169169+simd_type(simd_double, 2); // simd_double2
170170+simd_type(simd_double, 3); // simd_double3
171171+simd_type(simd_double, 4); // simd_double4
172172+simd_type(simd_double, 8); // simd_double8
173173+174174+typedef simd_double2 vector_double2;
175175+typedef simd_double3 vector_double3;
176176+typedef simd_double4 vector_double4;
177177+typedef simd_double8 vector_double8;
178178+179179+180180+simd_struct(simd_float, 2, 2); // simd_float2x2
181181+simd_struct(simd_float, 3, 2); // simd_float3x2
182182+simd_struct(simd_float, 4, 2); // simd_float4x2
183183+simd_struct(simd_float, 2, 3); // simd_float2x3
184184+simd_struct(simd_float, 3, 3); // simd_float3x3
185185+simd_struct(simd_float, 4, 3); // simd_float4x3
186186+simd_struct(simd_float, 2, 4); // simd_float2x4
187187+simd_struct(simd_float, 3, 4); // simd_float3x4
188188+simd_struct(simd_float, 4, 4); // simd_float4x4
189189+190190+simd_struct(simd_double, 2, 2); // simd_double2x2
191191+simd_struct(simd_double, 3, 2); // simd_double3x2
192192+simd_struct(simd_double, 4, 2); // simd_double4x2
193193+simd_struct(simd_double, 2, 3); // simd_double2x3
194194+simd_struct(simd_double, 3, 3); // simd_double3x3
195195+simd_struct(simd_double, 4, 3); // simd_double4x3
196196+simd_struct(simd_double, 2, 4); // simd_double2x4
197197+simd_struct(simd_double, 3, 4); // simd_double3x4
198198+simd_struct(simd_double, 4, 4); // simd_double4x4
199199+200200+201201+typedef struct {
202202+ simd_double4 vector;
203203+} simd_quatd;
204204+205205+typedef struct {
206206+ simd_float4 vector;
207207+} simd_quatf;
208208+209209+#undef simd_struct
210210+#undef simd_type
211211+#endif
+8-1
src/startup/darling.c
···563563 "/sbin:"
564564 "/usr/local/bin");
565565566566- const char* login = getlogin();
566566+ const char* login = NULL;
567567+ struct passwd* pw = getpwuid(geteuid());
568568+569569+ if (pw != NULL)
570570+ login = pw->pw_name;
571571+572572+ if (!login)
573573+ login = getlogin();
567574 if (!login)
568575 {
569576 fprintf(stderr, "Cannot determine your user name\n");