Skip to content

Commit 2be91f1

Browse files
committed
Update version mapping to recognize macOS 26.0 (Tahoe).
1 parent 39c4974 commit 2be91f1

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

src/opesys.c

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -232,47 +232,49 @@ get_real_win (const char *win) {
232232
* returned. */
233233
static char *
234234
get_real_mac_osx (const char *osx) {
235-
if (strstr (osx, "15.0"))
235+
if (strstr (osx, "26.0") || strstr(osx, "Tahoe"))
236+
return alloc_string ("macOS 26 Tahoe");
237+
else if (strstr (osx, "15.0") || strstr(osx, "Sequoia"))
236238
return alloc_string ("macOS 15 Sequoia");
237-
else if (strstr (osx, "14.0"))
239+
else if (strstr (osx, "14.0") || strstr(osx, "Sonoma"))
238240
return alloc_string ("macOS 14 Sonoma");
239-
else if (strstr (osx, "13.0"))
241+
else if (strstr (osx, "13.0") || strstr(osx, "Ventura"))
240242
return alloc_string ("macOS 13 Ventura");
241-
else if (strstr (osx, "12.0"))
243+
else if (strstr (osx, "12.0") || strstr(osx, "Monterey"))
242244
return alloc_string ("macOS 12 Monterey");
243-
else if (strstr (osx, "11.0"))
245+
else if (strstr (osx, "11.0") || strstr(osx, "Big Sur"))
244246
return alloc_string ("macOS 11 Big Sur");
245-
else if (strstr (osx, "10.15"))
247+
else if (strstr (osx, "10.15")) /* Catalina */
246248
return alloc_string ("macOS 10.15 Catalina");
247-
else if (strstr (osx, "10.14"))
249+
else if (strstr (osx, "10.14")) /* Mojave */
248250
return alloc_string ("macOS 10.14 Mojave");
249-
else if (strstr (osx, "10.13"))
251+
else if (strstr (osx, "10.13")) /* High Sierra */
250252
return alloc_string ("macOS 10.13 High Sierra");
251-
else if (strstr (osx, "10.12"))
253+
else if (strstr (osx, "10.12")) /* Sierra */
252254
return alloc_string ("macOS 10.12 Sierra");
253-
else if (strstr (osx, "10.11"))
255+
else if (strstr (osx, "10.11")) /* El Capitan */
254256
return alloc_string ("OS X 10.11 El Capitan");
255-
else if (strstr (osx, "10.10"))
257+
else if (strstr (osx, "10.10")) /* Yosemite */
256258
return alloc_string ("OS X 10.10 Yosemite");
257-
else if (strstr (osx, "10.9"))
259+
else if (strstr (osx, "10.9")) /* Mavericks */
258260
return alloc_string ("OS X 10.9 Mavericks");
259-
else if (strstr (osx, "10.8"))
261+
else if (strstr (osx, "10.8")) /* Mountain Lion */
260262
return alloc_string ("OS X 10.8 Mountain Lion");
261-
else if (strstr (osx, "10.7"))
263+
else if (strstr (osx, "10.7")) /* Lion */
262264
return alloc_string ("OS X 10.7 Lion");
263-
else if (strstr (osx, "10.6"))
265+
else if (strstr (osx, "10.6")) /* Snow Leopard */
264266
return alloc_string ("OS X 10.6 Snow Leopard");
265-
else if (strstr (osx, "10.5"))
267+
else if (strstr (osx, "10.5")) /* Leopard */
266268
return alloc_string ("OS X 10.5 Leopard");
267-
else if (strstr (osx, "10.4"))
269+
else if (strstr (osx, "10.4")) /* Tiger */
268270
return alloc_string ("OS X 10.4 Tiger");
269-
else if (strstr (osx, "10.3"))
271+
else if (strstr (osx, "10.3")) /* Panther */
270272
return alloc_string ("OS X 10.3 Panther");
271-
else if (strstr (osx, "10.2"))
273+
else if (strstr (osx, "10.2")) /* Jaguar */
272274
return alloc_string ("OS X 10.2 Jaguar");
273-
else if (strstr (osx, "10.1"))
275+
else if (strstr (osx, "10.1")) /* Puma */
274276
return alloc_string ("OS X 10.1 Puma");
275-
else if (strstr (osx, "10.0"))
277+
else if (strstr (osx, "10.0")) /* Cheetah */
276278
return alloc_string ("OS X 10.0 Cheetah");
277279
return alloc_string (osx);
278280
}

0 commit comments

Comments
 (0)