recp / cglm

📽 Highly Optimized 2D / 3D Graphics Math (glm) for C
MIT License
2.34k stars 231 forks source link

Check for builtin before using it #279

Closed NeRdTheNed closed 1 year ago

NeRdTheNed commented 1 year ago

This fixes building cglm with compilers that define GNUC and don't implement __builtin_assume_aligned.

Note that the check for has_builtin being defined and using the __has_builtin() macro need to be on different lines, as when has_builtin is not defined, using the __has_builtin() macro is an invalid preprocessor directive.

recp commented 1 year ago

Hi @NeRdTheNed, the PR is merged, many thanks for your contributions 🚀