1/****************************************************************************
2 *
3 * config/mac-support.h
4 *
5 * Mac/OS X support configuration header.
6 *
7 * Copyright (C) 1996-2025 by
8 * David Turner, Robert Wilhelm, and Werner Lemberg.
9 *
10 * This file is part of the FreeType project, and may only be used,
11 * modified, and distributed under the terms of the FreeType project
12 * license, LICENSE.TXT. By continuing to use, modify, or distribute
13 * this file you indicate that you have read the license and
14 * understand and accept it fully.
15 *
16 */
17#ifndef FREETYPE_CONFIG_MAC_SUPPORT_H_
18#define FREETYPE_CONFIG_MAC_SUPPORT_H_
19
20 /**************************************************************************
21 *
22 * Mac support
23 *
24 * This is the only necessary change, so it is defined here instead
25 * providing a new configuration file.
26 */
27#ifdef FT_MACINTOSH
28#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) )
29 /* No Carbon frameworks for 64bit 10.4.x. */
30 /* `AvailabilityMacros.h` is available since Mac OS X 10.2, */
31 /* so guess the system version by maximum errno before inclusion. */
32#include <errno.h>
33#ifdef ECANCELED /* defined since 10.2 */
34#include "AvailabilityMacros.h"
35#endif
36#if defined( __LP64__ ) && \
37 ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
38#undef FT_MACINTOSH
39#endif
40#endif /* __APPLE__ ... */
41
42#elif defined( __SC__ ) || defined( __MRC__ )
43 /* Classic MacOS compilers */
44#include "ConditionalMacros.h"
45#if TARGET_OS_MAC
46#define FT_MACINTOSH 1
47#endif
48
49#endif /* Mac support */
50
51#endif /* FREETYPE_CONFIG_MAC_SUPPORT_H_ */
52