freetype2/include/freetype/internal
Alex Richardson f7c6a06cb7 Support architectures where `long` is smaller than pointers.
I am currently trying to compile FreeType for CHERI-extended ISAs
(CHERI-RISC-V and Arm's Morello), but I am getting compiler warnings
from the `FT_UINT_TO_POINTER` macro.  When compiling with the CHERI
Clang compiler, not using `uinptr_t` for casts between integers an
pointers results in the following `-Werror` build failures:

```
In file included from .../src/truetype/truetype.c:22:
  .../src/truetype/ttgload.c:1925:22: error:
    cast from provenance-free integer type to pointer type will
    give pointer that can not be dereferenced
    [-Werror,-Wcheri-capability-misuse]
  node->data = FT_UINT_TO_POINTER( glyph_index );
               ^
  .../include/freetype/internal/compiler-macros.h:79:34: note:
    expanded from macro 'FT_UINT_TO_POINTER'
```

* include/freetype/internal/compiler-macros.h (FT_UINT_TO_POINTER):
The ISO C standard compliant fix for this would be to use
`uintptr_t` from `stdint.h`, but I am not sure if this is supported
by the minimum compiler version.  Therefore, use the
compiler-defined `__UINTPTR_TYPE__` macro (supported in GCC 4.6+ and
Clang since about 3.0) before checking for `_WIN64` and falling back
to `unsigned long`.
2021-07-15 12:09:04 +02:00
..
services Update all copyright notices. 2021-01-17 07:18:48 +01:00
autohint.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
cffotypes.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
cfftypes.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
compiler-macros.h Support architectures where `long` is smaller than pointers. 2021-07-15 12:09:04 +02:00
ftcalc.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftdebug.h [base] Add trace level to logging output. 2021-06-25 09:24:07 +02:00
ftdrv.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftgloadr.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
fthash.h Remove redundant inclusion of `ft2build.h'. 2020-06-13 21:15:45 +02:00
ftmemory.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftobjs.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftpsprop.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftrfork.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftserv.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
ftstream.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
fttrace.h Small clean-ups for the last few commits. 2021-07-12 22:03:25 +02:00
ftvalid.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
psaux.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
pshints.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
sfnt.h [sfnt] Provide optional root transform for 'COLR' v1 glyph graph. 2021-02-10 18:51:04 +01:00
t1types.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
tttypes.h Update all copyright notices. 2021-01-17 07:18:48 +01:00
wofftypes.h Update all copyright notices. 2021-01-17 07:18:48 +01:00