Commit Graph

17 Commits

Author SHA1 Message Date
Werner Lemberg de8b92dd7e * Version 2.13 released.
==========================

Tag sources with `VER-2-13-0'.

* docs/VERSION.TXT: Add entry for version 2.13.
* docs/CHANGES: Updated.

* README, src/base/ftver.rc, builds/windows/vc2010/index.html,
builds/windows/visualc/index.html, builds/windows/visualce/index.html,
builds/wince/vc2005-ce/index.html, builds/wince/vc2008-ce/index.html,
docs/freetype-config.1: s/2.12.1/2.13/, s/2121/2130/.

* include/freetype/freetype.h (FREETYPE_MINOR): Set to 13.
(FREETYPE_PATCH): Set to 0.

* builds/unix/configure.raw (version_info): Set to 25:0:19.
* CMakeLists.txt (VERSION_MINOR): Set to 13.
(VERSION_PATCH): Set to 0.
2023-02-09 07:24:52 +01:00
Werner Lemberg ac5babe876 Fix 'fall-through' warning messages.
Modern compilers get more insistent on that...

* include/freetype/internal/compiler-macros.h (FALL_THROUGH): Define.
* src/*: Use it instead of `/* fall through */` comments.
2023-02-08 21:09:32 +01:00
Werner Lemberg 65f8523706 Update all copyright notices. 2023-01-17 09:18:25 +01:00
Ozkan Sezer 3f6497bdc5 Add Watcom C/C++ calling.
In the unlikely case the source is built with OpenWatcom's -ec?
switches to enforce a calling convention, the qsort() compare
function must still be set to __watcall.

* include/freetype/internal/compiler-macros.h (FT_COMPARE_DEF):
Updated.
2022-01-15 22:44:28 -05:00
Alexei Podtelezhnikov 7f7bf6f0f0 * include/freetype/internal/compiler-macros.h [FT_COMPARE_DEF]: Tighten.
This works around Watcom C library using __watcall.
2022-01-14 20:33:28 -05:00
Werner Lemberg d0cfb4e1b2 Update all copyright notices. 2022-01-11 10:54:10 +01:00
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
Werner Lemberg d93a011933 Minor editing of last commit; formatting. 2021-02-13 07:50:04 +01:00
Alexei Podtelezhnikov 70fd20e67e Decorate qsort callbacks with cdecl.
* include/freetype/internal/compiler-macros.h (FT_COMPARE_DEF):
Add new macro.
* src/base/ftrfork.c, src/bdf/bdflib.c, src/gxvalid/gxvcommn.c,
src/psaux/afmparse.c, src/psnames/psmodule.c, src/type1/t1afm.c,
src/sfnt/sfwoff.c, src/sfnt/sfwoff2.c: Update qsort callbacks.

Fixes #1026 when compiling FreeType with an unusual calling convention
while the C library qsort still expects cdecl.
2021-02-12 19:28:05 -05:00
Werner Lemberg b6e8a71266 Update all copyright notices. 2021-01-17 07:18:48 +01:00
Alexei Podtelezhnikov 986a340dd5 Unbreak compilation. 2020-07-28 23:20:59 -04:00
Alexei Podtelezhnikov f76f7fdecd Hide internal functions with SunPro.
* include/freetype/internal/compiler-macros.h
(FT_INTERNAL_FUNCTION_ATTRIBUTE) <__SUNPRO_C>: Define as __hidden.
2020-07-28 23:13:51 -04:00
Anuj Verma 3273521f40 Fix static compilation with Visual C.
* include/freetype/internal/compiler-macros.h
(FT_INTERNAL_FUNCTION_ATTRIBUTE) <_WIN32>: Define as empty.
2020-07-28 18:34:37 +02:00
Werner Lemberg fffc303a7f Formatting, improving comments. 2020-07-28 18:33:15 +02:00
David Turner 0f35b042e0 [build] Really fix multi and C++ builds.
The following builds were still failing due to previous changes:

  make multi
  make multi CC="c++"
  make CC="c++"

This patch fixes the issues, which were missing includes to get the
right macro definitions in multi-build mode.

Also, `FT_UNUSED' is actually used by third-party code, so move it
back to `public-macros.h' to avoid breaking it.

* include/freetype/config/public-macros.h (FT_EXPORT): Remove
special definition for C++.
(FT_UNUSED): Define here instead of...
* include/freetype/config/compiler-macros.h: ... here.
(FT_FUNCTION_DECLARATION): Remove special definition for C++.
(FT_LOCAL_ARRAY_DEF): Fix definition.

* src/cache/ftccback.h, src/lzw/ftzopen.h, src/gxvalid/gxvmort.h,
src/gxvalid/gxvmorx.h: Add `FT_BEGIN_HEADER' and `FT_END_HEADER'.
2020-07-07 06:51:09 +02:00
David Turner b0667d2d36 [build] Improve visibility support of library function names.
* include/freetype/config/public-macros.h
(FT_PUBLIC_FUNCTION_ATTRIBUTE): New macro to tag functions as
public (and thus exportable).
(FT_EXPORT): Use it.

* include/freetype/config/compiler-macros.h
(FT_INTERNAL_FUNCTION_ATTRIBUTE): New macro to tag functions as
internal to the library (and thus hidden).  Note that on ELF
systems, all internal functions have hidden visibility, which avoids
the need to enforce this when invoking the compiler (e.g., with an
option like `-fvisibility=hidden').

(FT_FUNCTION_DECLARATION, FT_FUNCTION_DEFINITION): New base macros
to deal with C and C++ linkage issues at the same time.

(FT_LOCAL, FT_LOCAL_DEF, FT_LOCAL_ARRAY, FT_LOCAL_ARRAY_DEF,
FT_BASE, FT_BASE_DEF, FT_EXPORT_VAR, FT_BASE_CALLBACK,
FT_BASE_CALLBACK_DEF): Redefined using new macros.
2020-07-05 11:03:23 +02:00
David Turner bb66c8d8cf [build] Split off more stuff from `ftconfig.h'.
* builds/unix/ftconfig.h.in, builds/vms/ftconfig.h,
include/freetype/config/ftconfig.h: Split off macro definitions
required by the FreeType API headers to...
* include/freetype/config/public-macros.h: ...this new file.

* builds/unix/ftconfig.h.in, builds/vms/ftconfig.h,
include/freetype/config/ftconfig.h: Split off macro definitions used
by the library but not to be exposed to clients to...
* include/freetype/config/compiler-macros.h: ...this new file.

* include/freetype/internal/*.h, src/raster/ftraster.h: Include
`compiler-macros.h' where needed.
2020-07-05 10:42:23 +02:00