freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two build fixes for watcom compiler:


From: Ozkan Sezer
Subject: Re: Two build fixes for watcom compiler:
Date: Thu, 13 Jan 2022 20:52:33 +0300

On 1/13/22, Alexei Podtelezhnikov <apodtele@gmail.com> wrote:
> On Thu, Jan 13, 2022 at 11:24 AM Ozkan Sezer <sezeroz@gmail.com> wrote:
>>
>> 1. include/freetype/internal/compiler-macros.h (FT_CALLBACK_DEF):
>> don't define as __cdecl for Watcom builds.
>
> Does this mean tha Watcam C supports only one calling convention and

It can support multiple calling conventions, but

> does not use Windows C run-time?

... it comes with its own clib.

>  __cdecl comes from Windows. See
> https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/qsort

You don't have to target windows with watcom: you can target
os/2 or dos too (maybe some others too.)

> If you do use CRT qsort, how does it work if watcall is different from
> cdecl.

You can use qsort, it will come from Watcom's libc, just don't
forcefully mark your compare function as cdecl.

>> 2. src/sdf/ftbsdf.c: undefine 'near' for Watcom builds
>>
>> Watcom defines near to its __near keyword and build fails otherwise:
>>
> Is there a compiler option to undefine this?

Not that I know of (I _might_ be wrong, though.)

> We can rename "near" to
> "dist" as well just to keep the sources clean.

Renaming near would be cleaner yes, although struct  ED_
already has a member named 'dist'.

Regards
--
O.S.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]