[PATCH v2] compat: provide a declaration of ssize_t, for MS windows

Yuya Nishihara yuya at tcha.org
Wed Jul 13 09:31:28 EDT 2016


On Wed, 13 Jul 2016 10:10:44 +0200, Maciej Fijalkowski wrote:
> # HG changeset patch
> # User Maciej Fijalkowski <fijall at gmail.com>
> # Date 1468238015 -7200
> #      Mon Jul 11 13:53:35 2016 +0200
> # Node ID 1a1612ddd9721f196690e1fa0831764b43fc6c6e
> # Parent  e932d21fdf2c8efe34807f3aa5081e98b71b523d
> compat: provide a declaration of ssize_t, for MS windows
> 
> diff -r e932d21fdf2c -r 1a1612ddd972 mercurial/compat.h
> --- a/mercurial/compat.h	Mon Jul 11 11:05:08 2016 +0200
> +++ b/mercurial/compat.h	Mon Jul 11 13:53:35 2016 +0200
> @@ -5,6 +5,11 @@
>  #ifdef _MSC_VER
>  /* msvc 6.0 has problems */
>  #define inline __inline
> +#if defined(_WIN64)
> +typedef __int64 ssize_t;
> +#else
> +typedef long ssize_t;
> +#endif

LGTM per the comment in the previous thread. Queued, thanks.


More information about the Mercurial-devel mailing list