[PATCH] Fix standard integer definitions for MSVC in DataTypes.h
Aaron Ballman
aaron at aaronballman.com
Tue May 27 11:33:50 PDT 2014
On Tue, May 27, 2014 at 2:30 PM, Reid Kleckner <rnk at google.com> wrote:
> +Nakamura, he knows more about the various supported Windows configs.
>
> Thanks! At one point I thought I could delete DataTypes.h completely in
> favor of stdint.h, but I gave up because inttypes.h makes things
> complicated.
>
> +#if defined(_WIN64)
> +typedef signed __int64 ssize_t;
> +#else
> +typedef signed int ssize_t;
> +#endif /* _WIN64 */
> +
> +/* Ideally, we would like to assume that stdint.h always exists on
> + every supported Visual Studio version. Indeed, the header does get
> + installed on a vanilla VS 2012 installation. But a search online
> + shows that some people seem to have a version of VS2012 that does
> + not have this header, so without a better understanding of why this
> + is it's better to leave this check in. */
> +#ifndef HAVE_STDINT_H
>
> Really? I thought it was available since VS 2010. Do you have a link to
> these results? I'd like to nuke this, replace it with '#error "MSVC must
> provide stdint.h"', commit it, and see if it sticks.
stdint.h is included with MSVC 2010 and later. I concur with the
#error approach.
~Aaron
More information about the llvm-commits
mailing list