[XML-SIG] pyxml 0.7 and cygwin

Mark McEahern marklists@mceahern.com
Tue, 8 Jan 2002 14:39:45 -0800


This is a multi-part message in MIME format.

------=_NextPart_000_0000_01C19852.5127D630
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Attached is a patch that allows you to run setup.py for PyXml 0.7 on Cygwin
(Python 2.2).  I don't know whether I should submit this to sourceforge?

I don't know enough about C++ or gcc to comment whether the need for this
patch indicates a bug in gcc.

If you find it useful, cheers.

Thanks,

// mark

------=_NextPart_000_0000_01C19852.5127D630
Content-Type: application/octet-stream;
	name="gcc_cygwin_dllimport.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="gcc_cygwin_dllimport.patch"

Index: extensions/pyexpat.c
===================================================================
RCS file: /cvsroot/pyxml/xml/extensions/pyexpat.c,v
retrieving revision 1.45
diff -c -r1.45 pyexpat.c
*** extensions/pyexpat.c        2001/12/28 16:08:14     1.45
--- extensions/pyexpat.c        2002/01/08 00:37:15
***************
*** 14,19 ****
--- 14,20 ----
  #include "compile.h"
  #include "frameobject.h"
  #ifdef HAVE_EXPAT_H
+ #define PYEXPAT
  #include "expat.h"
  #ifdef XML_MAJOR_VERSION
  #define EXPAT_VERSION (0x10000 * XML_MAJOR_VERSION \
Index: extensions/expat/lib/expat.h
===================================================================
RCS file: /cvsroot/pyxml/xml/extensions/expat/lib/expat.h,v
retrieving revision 1.1
diff -c -r1.1 expat.h
*** extensions/expat/lib/expat.h        2001/08/11 07:19:41     1.1
--- extensions/expat/lib/expat.h        2002/01/08 00:37:17
***************
*** 9,15 ****
  #include <stdlib.h>

  #ifndef XMLPARSEAPI
! #  if defined(__declspec) && !defined(__BEOS__)
  #    define XMLPARSEAPI(type) __declspec(dllimport) type __cdecl
  #  else
  #    define XMLPARSEAPI(type) type
--- 9,15 ----
  #include <stdlib.h>

  #ifndef XMLPARSEAPI
! #  if defined(__declspec) && !defined(__BEOS__) && !defined(PYEXPAT)
  #    define XMLPARSEAPI(type) __declspec(dllimport) type __cdecl
  #  else
  #    define XMLPARSEAPI(type) type

------=_NextPart_000_0000_01C19852.5127D630--