[flac-dev] Bug: incompatibility with MSVS 2005

Erik de Castro Lopo mle+la at mega-nerd.com
Sun May 11 03:12:06 PDT 2014

lvqcl wrote:

> Erik de Castro Lopo wrote:
> >> because MSVS2005 doesn't provide stdint.h. According to MSDN,
> >> uintptr_t is defined in "STDDEF.H and other include files".
> >
> > Does the rest of FLAC actually support those compilers?
> Yes. I removed this #include and all projects were successfully
> built with MSVS 2005 Express.

Ok, that helps.

> --------------
> Why MSVS can compile memory.c when "#include <stdint.h>" was removed:
> memory.c includes "private/memory.h", it indirectly includes <crtdefs.h>
> where uintptr_t is defined. But it's implementation details...
> --------------
> memory.c also includes "share/alloc.h" which contains the following code:
> #include <stdint.h> /* for SIZE_MAX in case limits.h didn't get it */
> #endif
> but memory.c includes <stdint.h> unconditionally. What was the reason for
> this #ifdef/#endif? Compatibility with non-C99 compilers?


Since the file compiles with VS2008 without that include I have just just
wrapped wrapped it in an #ifdef HAVE_STDINT_H.

Erik de Castro Lopo

More information about the flac-dev mailing list