[RFC] dirstate walk speedup

Christian Ebert blacktrash at gmx.net
Sat Oct 6 00:09:44 UTC 2007


* Bryan O'Sullivan on Thursday, September 27, 2007 at 23:44:13 -0700
> +    while ((ent = readdir64(dir))) {
> +        PyObject *name = NULL;
> +        PyObject *py_kind = NULL;
> +        PyObject *val = NULL;
> +        unsigned char d_type;
> +        int kind = -1;
> +
> +        if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0)
> +            continue;
> +
> +#ifdef DT_REG
> +	if (do_stat)
> +	    d_type = 0;
> +	else
> +	    d_type = ent->d_type;
> +#else
> +        d_type = 0;
> +#endif

On MacOS 10.4.10 build fails like so:

building 'mercurial.osutil' extension
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/usr/local/include/python2.5 -c mercurial/osutil.c -o build/temp.macosx-10.4-ppc-2.5/mercurial/osutil.o
mercurial/osutil.c: In function ‘listdir’:
mercurial/osutil.c:150: warning: implicit declaration of function ‘readdir64’
mercurial/osutil.c:150: warning: assignment makes pointer from integer without a cast
mercurial/osutil.c:157: error: dereferencing pointer to incomplete type
mercurial/osutil.c:157: error: dereferencing pointer to incomplete type
mercurial/osutil.c:164: error: dereferencing pointer to incomplete type
mercurial/osutil.c:185: error: dereferencing pointer to incomplete type
error: command 'gcc' failed with exit status 1


c
-- 
__   _    _         _  __  _               _    
\ \ | |__| |__ _ __| |_\ \| |_ _ _ __ _ __| |_  
 \ \| '_ \ / _` / _| / /\ \  _| '_/ _` (_-< ' \ 
  \_\_.__/_\__,_\__|_\_\ \_\__|_| \__,_/__/_||_|   http://www.blacktrash.org/



More information about the Mercurial-devel mailing list