add explanatory comment for USE_WIN32_FILEIO

This commit is contained in:
nulano 2021-03-26 02:54:11 +01:00
parent 1105c5d5c9
commit 7c48f12207

View File

@ -728,6 +728,10 @@ class pil_build_ext(build_ext):
libs.append(feature.tiff)
defs.append(("HAVE_LIBTIFF", None))
if sys.platform == "win32":
# This define needs to be defined if-and-only-if it was defined
# when compiling LibTIFF. LibTIFF doesn't expose it in `tiffconf.h`,
# so we have to guess; by default it is defined in all Windows builds.
# See #4237, #5243, #5359 for more information.
defs.append(("USE_WIN32_FILEIO", None))
if feature.xcb:
libs.append(feature.xcb)