From abc7fbdbb0313536d2f9684dd527c736814e45d8 Mon Sep 17 00:00:00 2001
From: Oleg Oshmyan <chortos@inbox.lv>
Date: Fri, 13 Sep 2024 19:54:05 +0300
Subject: [PATCH] coretext: drop obsolete, bugged copy of #define __has_builtin

__has_builtin is a function-style macro, but this polyfill
definition is missing the argument, so __has_builtin(something)
gets expanded to 0(something), which fails to parse.

Commit c3ee4044d5cdf935752251f04da74736a9cc7633 added a correct
implementation to ass_utils.h, so the one in ass_coretext.c is neither
useful nor used any more, as ass_utils.h is transitively included.
For clarity, add an explicit include, and drop the bugged definition.

This makes ass_coretext actually compilable using old GCC (e.g. relevant
for PowerPC macOS as in https://github.com/libass/libass/issues/826).
---
 libass/ass_coretext.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/libass/ass_coretext.c b/libass/ass_coretext.c
index ba40ccab6..46cbfcf12 100644
--- libass/ass_coretext.c
+++ libass/ass_coretext.c
@@ -29,10 +29,7 @@
 #endif
 
 #include "ass_coretext.h"
-
-#ifndef __has_builtin
-#define __has_builtin 0
-#endif
+#include "ass_utils.h"
 
 #if __has_builtin(__builtin_available)
 #define CHECK_AVAILABLE(sym, ...) __builtin_available(__VA_ARGS__)
