Re: [xml] Windows build



Actually, for Borland compatability, the main change is just a minor one
to
xmlversion.h (or, rather, xmlversion.h.in), where the Borland compiler
should be included in those conditionally defining LIBXML_DLL_IMPORT. In
my
version, I have changed:

#ifndef LIBXML_DLL_IMPORT
#if (defined(_MSC_VER) || defined(__CYGWIN__)) && !defined(IN_LIBXML) &&
!defined(LIBXML_STATIC)
#define LIBXML_DLL_IMPORT __declspec(dllimport)
#else
#define LIBXML_DLL_IMPORT
#endif
#endif

to:

#ifndef LIBXML_DLL_IMPORT
#if (defined(_MSC_VER) || defined(__CYGWIN__) || defined(__BORLANDC__)) &&
!defined(IN_LIBXML) && !defined(LIBXML_STATIC)
#define LIBXML_DLL_IMPORT __declspec(dllimport)
#elif defined(__BORLANDC__) && defined(__DLL__)
#define LIBXML_DLL_IMPORT __declspec(dllexport)
#else
#define LIBXML_DLL_IMPORT
#endif
#endif

That is okay. I'll apply that.

Since my compiler does not define anything specific to the runtime, we
can
agree on what mingw defines (namely __MSVCRT__) and check for that
whereever
the runtime is an issue. That would then be cleaner and compiler
independent. I would then define that in my makefile, mingw defines it
per
default anyway, and all other compilers who use MS runtime (or a
compatible
one) would then define it in their makefiles or IDE project files. A
check
for _MSC_VER would then be limited to threads.c.

Is that an option?

Probably, so long as we can regard __MSVCRT__ as implying "uses a runtime
compatible with the Microsoft runtime" rather than the more strict "uses
the
Microsoft runtime".

That's what I said, read above.

Ciao
Igor




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]