diff options
author | David Turner <david@freetype.org> | 2020-07-02 10:31:28 +0200 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2020-07-05 09:59:29 +0200 |
commit | 0322efb5e5fcd2c64f9fb433b890ff476abb696f (patch) | |
tree | ca18797682534ff359e269d3b9417b16cd279db2 /include | |
parent | bd7251ac97eea134873118f4d9f005c333e31953 (diff) | |
download | freetype2-0322efb5e5fcd2c64f9fb433b890ff476abb696f.tar.gz |
[build] Move mac support code to `mac-support.h'.
* builds/unix/ftconfig.h.in, builds/vms/ftconfig.h,
include/freetype/config/ftconfig.h: Split off mac-specific stuff
to...
* include/freetype/config/mac-support.h: ...this new file.
* CMakeLists.txt, builds/unix/configure.raw: Remove `/undef ->
#undef' string replacement; the affected code is no longer part of
the `ftconfig.h' template.
Diffstat (limited to 'include')
-rw-r--r-- | include/freetype/config/ftconfig.h | 31 | ||||
-rw-r--r-- | include/freetype/config/mac-support.h | 49 |
2 files changed, 50 insertions, 30 deletions
diff --git a/include/freetype/config/ftconfig.h b/include/freetype/config/ftconfig.h index 72fbf360e..40d9078cf 100644 --- a/include/freetype/config/ftconfig.h +++ b/include/freetype/config/ftconfig.h @@ -42,6 +42,7 @@ #include FT_CONFIG_STANDARD_LIBRARY_H #include <freetype/config/integer-types.h> +#include <freetype/config/mac-support.h> FT_BEGIN_HEADER @@ -63,36 +64,6 @@ FT_BEGIN_HEADER */ - /************************************************************************** - * - * Mac support - * - * This is the only necessary change, so it is defined here instead - * providing a new configuration file. - */ -#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) ) - /* No Carbon frameworks for 64bit 10.4.x. */ - /* `AvailabilityMacros.h` is available since Mac OS X 10.2, */ - /* so guess the system version by maximum errno before inclusion. */ -#include <errno.h> -#ifdef ECANCELED /* defined since 10.2 */ -#include "AvailabilityMacros.h" -#endif -#if defined( __LP64__ ) && \ - ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 ) -#undef FT_MACINTOSH -#endif - -#elif defined( __SC__ ) || defined( __MRC__ ) - /* Classic MacOS compilers */ -#include "ConditionalMacros.h" -#if TARGET_OS_MAC -#define FT_MACINTOSH 1 -#endif - -#endif - - /* Fix compiler warning with sgi compiler. */ #if defined( __sgi ) && !defined( __GNUC__ ) #if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION >= 730 ) diff --git a/include/freetype/config/mac-support.h b/include/freetype/config/mac-support.h new file mode 100644 index 000000000..94867088e --- /dev/null +++ b/include/freetype/config/mac-support.h @@ -0,0 +1,49 @@ +/**************************************************************************** + * + * config/mac-support.h + * + * Mac/OS X support configuration header. + * + * Copyright (C) 1996-2020 by + * David Turner, Robert Wilhelm, and Werner Lemberg. + * + * This file is part of the FreeType project, and may only be used, + * modified, and distributed under the terms of the FreeType project + * license, LICENSE.TXT. By continuing to use, modify, or distribute + * this file you indicate that you have read the license and + * understand and accept it fully. + * + */ +#ifndef FREETYPE_CONFIG_MAC_SUPPORT_H_ +#define FREETYPE_CONFIG_MAC_SUPPORT_H_ + + /************************************************************************** + * + * Mac support + * + * This is the only necessary change, so it is defined here instead + * providing a new configuration file. + */ +#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) ) + /* No Carbon frameworks for 64bit 10.4.x. */ + /* `AvailabilityMacros.h` is available since Mac OS X 10.2, */ + /* so guess the system version by maximum errno before inclusion. */ +#include <errno.h> +#ifdef ECANCELED /* defined since 10.2 */ +#include "AvailabilityMacros.h" +#endif +#if defined( __LP64__ ) && \ + ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 ) +#undef FT_MACINTOSH +#endif + +#elif defined( __SC__ ) || defined( __MRC__ ) + /* Classic MacOS compilers */ +#include "ConditionalMacros.h" +#if TARGET_OS_MAC +#define FT_MACINTOSH 1 +#endif + +#endif /* Mac support */ + +#endif /* FREETYPE_CONFIG_MAC_SUPPORT_H_ */ |