Paul Smith wrote:
> > Gnulib code can assume that standard internal types like size_t are no
> > wider than long.
> 
> Is that right?  On a 64bit system compiling with Microsoft Visual C,
> long is only a 32bit integer.  Is it saying that gnulib is specifically
> not intended to work with MS Visual C?

You are right, on 64-bit native Windows (both mingw and MSVC), 'long' is
only 32-bit and thus smaller than 'intptr_t'.

Parts of gnulib do work on MSVC and mingw; for full coverage, there's still
a lot of work to be done [1].

I would vote for removing this sentence "Gnulib code can assume that standard
internal types like size_t are no wider than long." The fix is easy nowadays
(since MSVC now has <stdint.h>): Use intptr_t or ptrdiff_t or size_t as
appropriate.

Bruno

[1] http://lists.gnu.org/archive/html/bug-gnulib/2016-12/msg00112.html


Reply via email to