[tlbuild] Building on the Macintosh

Mojca Miklavec mojca.miklavec.lists at gmail.com
Wed Jan 17 18:26:02 CET 2018


On 17 January 2018 at 17:05, Apostolos Syropoulos wrote:
> 2018-01-17 17:32 GMT+02:00 Richard Koch <koch at uoregon.edu>:
>>
>> Notice that in modern C++, char16_t is a BUILT-IN type. So it seems to me
>> that efforts to tell compilers to equate it to something else are likely not
>> to work. (Maybe a naive opinion!)
>>
>
> This is absolutely true. However, in mu case, compilation stops as follows:
>
> gcc64 -std=gnu99

OK, I'm sorry, I forgot about the fact the the same file could also be
loaded in C.

In that case this requires a different treatment of course.

I would probably go for something like this:

#ifndef __cplusplus
    #include <stdint.h>
    typedef uint16_t char16_t;
#endif
    typedef char16_t UChar;

or

#if (C++ and not C++11) // pseudocode
    #include <cstdint>
    typedef uint16_t char16_t;
#elsif not C++
    #include <stdint.h>
    typedef uint16_t char16_t;
#endif
    typedef char16_t UChar;

Not sure why they need UChar, they could simply always use char16_t.

Mojca


More information about the tlbuild mailing list