From 683c26b0dd1db0cef39f380730c119d40435d720 Mon Sep 17 00:00:00 2001 From: pouillot Date: Thu, 23 Feb 2012 14:08:44 +0000 Subject: [PATCH] Fixes windows / MSVC side of r4521 for #604 (export TXML symbols with DLL interface) git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@4526 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 5b3c4fa23dff76e0d23439c440293dcc1904d0fd Former-commit-id: bfc1d689c202a41a8e907dd7a8b8c3c681bb3f9f --- src/libs/txml/copying.txt | 3 +++ src/libs/txml/xmlparse.h | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/libs/txml/copying.txt b/src/libs/txml/copying.txt index bcf74436b..19fe910cd 100644 --- a/src/libs/txml/copying.txt +++ b/src/libs/txml/copying.txt @@ -32,6 +32,9 @@ xmlrole.h xmltok_impl.h -- +'xmlparse.h' was slightly modified in order its exported symbols have a DLL interface +under Windows / MSVC (limited to the XMLPARSEAPI define). + 'nametab.h' was sourced from: http://expat.cvs.sourceforge.net/viewvc/expat/expat/lib/nametab.h?view=log&hideattic=0&pathrev=MAIN diff --git a/src/libs/txml/xmlparse.h b/src/libs/txml/xmlparse.h index 6dffe7410..c80dea16e 100644 --- a/src/libs/txml/xmlparse.h +++ b/src/libs/txml/xmlparse.h @@ -10,8 +10,15 @@ See the file copying.txt for copying permission. extern "C" { #endif -#ifndef XMLPARSEAPI -#define XMLPARSEAPI /* as nothing */ +// DLL exported symbols declarator for Windows. +#ifdef WIN32 +# ifdef TXML_DLL +# define XMLPARSEAPI __declspec(dllexport) +# else +# define XMLPARSEAPI __declspec(dllimport) +# endif +#else +# define XMLPARSEAPI #endif typedef void *XML_Parser;