[PATCH v2] store: rewrite fncache path mangling code in C

Adrian Buehlmann adrian at cadifra.com
Thu Aug 30 12:20:07 UTC 2012


On 2012-08-28 19:43, Bryan O'Sullivan wrote:
> diff --git a/mercurial/pathencode.c b/mercurial/pathencode.c
> new file mode 100644
> --- /dev/null
> +++ b/mercurial/pathencode.c
> @@ -0,0 +1,669 @@
> +/*
> + pathencode.c - efficient path name encoding
> +
> + Copyright 2012 Facebook
> +
> + This software may be used and distributed according to the terms of
> + the GNU General Public License, incorporated herein by reference.
> +*/
> +
> +/*
> + * An implementation of the name encoding scheme used by the fncache
> + * store.  The common case is of a path < 120 bytes long, which is
> + * handled either in a single pass with no allocations or two passes
> + * with a single allocation.  For longer paths, multiple passes are
> + * required.
> + */
> +
> +#include <Python.h>
> +#include <assert.h>
> +#include <ctype.h>
> +#include <stdint.h>
> +#include <stdlib.h>
> +#include <string.h>
> +

I get

mercurial/pathencode.c(21) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
error: command '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe"' failed with exit status 2

stdint.h apparently isn't available with the MS C compiler

http://stackoverflow.com/questions/126279/c99-stdint-h-header-and-ms-visual-studio






More information about the Mercurial-devel mailing list