[Python-Dev] xmlparse.c no longer compiles on Windows

Tim Peters tim.one@comcast.net
Sat, 25 Jan 2003 21:38:35 -0500


It starts with this:

/* Handle the case where memmove() doesn't exist. */
#ifndef HAVE_MEMMOVE
#ifdef HAVE_BCOPY
#define memmove(d,s,l) bcopy((s),(d),(l))
#else
#error memmove does not exist on this platform, nor is a substitute
available
#endif /* HAVE_BCOPY */
#endif /* HAVE_MEMMOVE */


memmove() is a std C function, and Python requires std C, so there's no
point to this block.  Neither of the symbols are defined on Windows, and I
don't want to define them -- other parts of Python use memmove() freely
(like listobject.c).


If that's ripped out, there are lots of syntax errors in xmlparse.c (over
100, at which point the compiler gives up on it).  They have the character
of cascading msgs due to some macro confusion; the first one is here:

typedef struct prefix {
  const XML_Char *name;
  BINDING *binding;
} PREFIX;                         The error msg points to this line

and gives the unhepful msg

C:\Code\python\Modules\expat\xmlparse.c(142) : error C2059: syntax
    error : 'string'

I assume this is because PREFIX is a macro used by Modules/getpath.c, and
PC/pyconfig.h defines it like so:

#define PREFIX ""