[PATCH] compat: provide a new declaration of hg_ssize_t, in case we don't have it

Yuya Nishihara yuya at tcha.org
Mon Jul 11 09:46:02 EDT 2016


On Mon, 11 Jul 2016 15:26:32 +0200, Maciej Fijalkowski wrote:
> The working workaround (it's a bit hard to test) seems to be:
> 
> #if defined(_MSC_VER)
> #include <BaseTsd.h>
> typedef SSIZE_T hg_ssize_t;
> #else
> typedef ssize_t hg_ssize_t
> #endif

(CC +adrian, I'm not Windows expert.)

It seems to work on Visual Studio 2008, which is the default compiler of
Python 2.7.

I slightly prefer using ssize_t like other int/uint_ typedefs, i.e.

  typedef SSIZE_T ssize_t;


More information about the Mercurial-devel mailing list