jkuhlmann / cgltf

:diamond_shape_with_a_dot_inside: Single-file glTF 2.0 loader and writer written in C99
MIT License
1.42k stars 135 forks source link

replace "#ifdef _WIN32" with "#ifdef _MSC_VER" #221

Closed Schrottfresser closed 1 year ago

Schrottfresser commented 1 year ago

this shall resolve issue 220. https://stackoverflow.com/questions/15127522/how-to-ifdef-by-compilertype-gcc-or-vc

Fixes #220

zeux commented 1 year ago

One downside here is that mingw declares long as 32-bit so this will mean files over 2GB can’t be loaded. My recollection is that on mingw ftello64 must be used instead but this could be done separately, since compiling on mingw seems better than not :)

Schrottfresser commented 1 year ago

According to https://stackoverflow.com/questions/30867831/portable-support-for-large-files ftello64 will not work with Cygwin. Therefor it would need another ifdef like here.

Repaired my broken liks btw.