Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport freetype patch to fix TYPEOF macro #22571

Closed
jeroen opened this issue Sep 15, 2024 · 0 comments · Fixed by #22585 · May be fixed by #22572
Closed

Backport freetype patch to fix TYPEOF macro #22571

jeroen opened this issue Sep 15, 2024 · 0 comments · Fixed by #22585 · May be fixed by #22572

Comments

@jeroen
Copy link

jeroen commented Sep 15, 2024

Old versions of freetype export a macro TYPEOF() which conflicts with a macro of the same name in client libraries.

The problem was fixed in freetype 9 years ago by renaming TYPEOF to FT_TYPEOF and was ported to the master branch of emscripten-ports/FreeType@5931268eec, but sadly the git tag emscripten-ports/freetype@version_1 that the build script is pulling from, does not not include this commit.

Would it be possible to backport 5931268.patch or just remove this macro from our headers below? I think this macro is used internally in freetype, or perhaps it is not used at all, it should not break other libs.

/* typeof condition taken from gnulib's `intprops.h' header file */
#if ( __GNUC__ >= 2 || \
defined( __IBM__TYPEOF__ ) || \
( __SUNPRO_C >= 0x5110 && !__STDC__ ) )
#define TYPEOF( type ) (__typeof__ (type))
#else
#define TYPEOF( type ) /* empty */
#endif

jeroen added a commit to jeroen/emscripten that referenced this issue Sep 15, 2024
Do not publicly export TYPEOF macro which conflicts with other libraries. Backport of freetype/freetype@5931268
Fixes emscripten-core#22571
sbc100 added a commit to sbc100/emscripten that referenced this issue Sep 19, 2024
Also, switch from a fork to using the upstream github repo.  We had a
single patch in our fork:

emscripten-ports/FreeType@40a760c

However, this was upstreamed in:

freetype/freetype@2f4b740

This change is based on emscripten-core#18088.

Fixes: emscripten-core#22571
sbc100 added a commit to sbc100/emscripten that referenced this issue Sep 19, 2024
Also, switch from a fork to using the upstream github repo.  We had a
single patch in our fork:

emscripten-ports/FreeType@40a760c

However, this was upstreamed in:

freetype/freetype@2f4b740

This change is based on emscripten-core#18088.

Fixes: emscripten-core#22571
sbc100 added a commit to sbc100/emscripten that referenced this issue Sep 19, 2024
Also, switch from a fork to using the upstream github repo.  We had a
single patch in our fork:

emscripten-ports/FreeType@40a760c

However, this was upstreamed in:

freetype/freetype@2f4b740

This change is based on emscripten-core#18088.

Fixes: emscripten-core#22571
sbc100 added a commit to sbc100/emscripten that referenced this issue Sep 20, 2024
Also, switch from a fork to using the upstream github repo.  We had a
single patch in our fork:

emscripten-ports/FreeType@40a760c

However, this was upstreamed in:

freetype/freetype@2f4b740

This change is based on emscripten-core#18088.

Fixes: emscripten-core#22571
@sbc100 sbc100 closed this as completed in 83a8e5d Sep 20, 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
1 participant