Re: [xml] Building libxml2 as a DLL under MinGW MSYS

On Wed, Sep 25, 2002 at 02:15:43PM +0000, jhheider attbi com wrote:
On Tue, Sep 24, 2002 at 04:21:13PM +0000, 
Of course. By file:

  - Added 'LIBXML_DLL_IMPORT' to all function definitions
    for replacement with __declspec(dllimport) or 
    __declspec(dllexport) as needed.

  Why isn't that needed by other Windows compilers I don't
understand why your compiler needs a different set.

  - Same as above
  - Replaced
#if defined(WIN32) && (defined(_MSC_VER) || defined
#if defined(__WIN32__)
    since MinGW compiler doesn't define either of these.

  Seems to immediately break Cygwin, not acceptable I'm
afraid, you need to find an identifier specific to your compiler

  - disabled libiconv

  since xmlversion.h is actually generated it's a wrong way
to handle this

  - changed an 
#ifdef _MSC_VER
#if defined(_MSC_VER) || defined(__MINGW32__)
  - expanded 'LIBXML_DLL_IMPORT' logic to set both
    __declspec(dllimport) and __declspec(dllexport)
    as appropriate.

  Igor would have to look at it

  - added a block to set NEED_TRIO, LDFLAGS, and CPPFLAGS
    appropriately for MINGW32. Also added an 
    ADDIITIONAL_DLL_COMMANDS replacement to insert dll
    commands in the makefile.

  configure is generated from so it's the
wrong place,

  - modified this block
#if defined(WIN32) && !defined(isascii)
# define isascii ((unsigned)(x) < 0x80)
    by inserting '0 &&' after '#if'. It looks like 'x'
    should be a macro arguement, and gcc seems to have no
    problem without this.

  this sounds an ugly way to remove that definition unconditionnaly
so this seems simply broken
  - Added '@ADDITIONAL_DLL_COMMANDS@' for insertion of
    additional calls.

  is generated from

I realize that not all of the changes may require
modification so as to not change any already existing
functionality, but as they stand, they comprise a 
sufficient set to allow one to build libxml under MSYS.

  But is not incorporable in the sources, it would just break
Too Many Things if I understand correctly,
  Please send patches based on __MINGW32__ preprocessor token
to conditionalize the changes, and applying to the source files,
not the generated ones.
  I don't understand why you want to use configure on your platform
it's clearly problemematic since even the presence of an Unix like
shell cannot be garanteed. Sounds a sure way to a support hell...

Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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