Skip to content

Conversation

@jeroen
Copy link

@jeroen jeroen commented Sep 15, 2024

Basically backport of freetype/freetype@5931268 / emscripten-ports/FreeType@5931268eec

We want to avoid publicly exporting the TYPEOF macro which conflicts with other libraries. . IIUC the header here is the one that gets included in the compiler with -s USE_FREETYPE=1 ? This should fix #22571

Do not publicly export TYPEOF macro which conflicts with other libraries. Backport of freetype/freetype@5931268
Fixes #22571
@jeroen jeroen changed the title Freetype: rename conflicting macro Fix macro conflict for USE_FREETYPE=1 Sep 15, 2024
#define FT_TYPEOF( type ) (__typeof__ (type))
#else
#define TYPEOF( type ) /* empty */
#define FT_TYPEOF( type ) /* empty */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes the definition - do the uses not need to be updated too? I'm just confused how this works.

Copy link
Author

@jeroen jeroen Sep 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes maybe you are right. I assumed this file was just the shipped header, but it is also used during the build.

Given that you own the repo, an easier solution is to cherry-pick emscripten-ports/FreeType@5931268eec into the git tag version_1 that we pull in here. Not sure why you archived that repo, but including that one commit would be a big improvement for us (and harmless for others).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I'm not sure why that was archived. @sbc100 did we plan to use upstream perhaps?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should look into upgrading our version of freetype. I'll take a look.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be done in #22585

@jeroen jeroen closed this by deleting the head repository Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backport freetype patch to fix TYPEOF macro

3 participants