[PATCH] compat: define ssize_t as int on 32bit Windows, silences C4142 warning

Augie Fackler raf at durin42.com
Fri Jul 15 13:27:33 EDT 2016


On Sat, Jul 16, 2016 at 12:17:19AM +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1468594496 -32400
> #      Fri Jul 15 23:54:56 2016 +0900
> # Node ID 8268c3bd8718213a46ae5ff1d3d674fe77a815a7
> # Parent  2a692364f43bf27862ab001b905c5c8d61e59e6d
> compat: define ssize_t as int on 32bit Windows, silences C4142 warning
>

queued, thanks

>
> It appears Python.h provides ssize_t, which is aliased to int.
>
> https://hg.python.org/cpython/file/v2.7.11/PC/pyconfig.h#l205
>
> diff --git a/mercurial/compat.h b/mercurial/compat.h
> --- a/mercurial/compat.h
> +++ b/mercurial/compat.h
> @@ -8,7 +8,7 @@
>  #if defined(_WIN64)
>  typedef __int64 ssize_t;
>  #else
> -typedef long ssize_t;
> +typedef int ssize_t;
>  #endif
>  typedef signed char int8_t;
>  typedef short int16_t;
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list