Conversation
`gd_webp.c` needs `ssize_t` which is defined in `gd_intern.h` for MSVC.
cmb69
left a comment
There was a problem hiding this comment.
Thank you! This looks good to me, although I'm not convinced that it is a good idea to provide these fallback definitions in gh_intern.h in the first place.
I'm not sure, though, if this shouldn't better target GD-2.3 @vapier, thoughts?
|
|
I'd prefer to have such fallback definitions in a generated config.h or such, but I agree that having them in gd_intern.h is better than to spread them all over the codebase. |
|
the MSVC logic isn't really generated in this case ... it's hand-written stuff. it also requires including other headers in order to make the types work correctly (which we def don't want in config.h). even though the exact line is a define ( GNU projects in general rely on the gnulib project to hide this stuff, and it can go as far as generating local headers to overlay/replace system headers (e.g. sys/types.h). the downside is that gnulib is (L)GPL leaning while gd is BSD-like, and having us depend on gnulib will make the combined work subject to the (L)GPL (which personally i don't care about, but it seems an unreasonable change for the gd project). plus, gnulib really really wants to be linked by itself into a shared library or executable and not expose its symbols, which means putting it into a static libgd.a will easily cause problems for users. i'm not aware of any other portability shims out there which means we're left open-coding our own ad-hoc ones like |
gd_webp.cneedsssize_twhich is defined ingd_intern.hfor MSVC.(Other C files which use this type include this header, too.)
Fixes this error: