mm2 / Little-CMS

A free, open source, CMM engine. It provides fast transforms between ICC profiles.
https://www.littlecms.com
MIT License
549 stars 174 forks source link

Complete check for WIN32/WIN64 defines for various compilers to detect 64-bit Windows target builds (MSVC / PVS Studio) #400

Closed GerHobbelt closed 1 year ago

GerHobbelt commented 1 year ago

Ran into this one back when I was still using MSVC2019 and building 64-bit static libs; the V comment is to shut up PVS Studio.

Easiest to see what's been changed by looking at the diffs, I suppose.


Extracted these edits from my own fork (based off another git repo, related to mupdf) during a manual source tree review with your master branch. Trivial stuff, really. 😊

mm2 commented 1 year ago

Sorry on that, but cannot get this one. You basically are adding a case for the symbol WIN64, and this symbol is not defined nor documented in windows:

https://pvs-studio.com/en/blog/posts/k0040/ https://msdn.microsoft.com/en-us/library/b0084kay.aspx https://groups.google.com/g/microsoft.public.vc.mfc/c/UstZOsTT14U

I think adding check to a symbol that no one uses makes no sense and may even be dangerous for any project that uses WIN64 internally.