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:

include/libxml/entities.h
include/libxml/parser.h
  - 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.

include/libxml/tree.h
  - Same as above
  - Replaced
#if defined(WIN32) && (defined(_MSC_VER) || defined
(__BORLANDC__))
    with
#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

include/libxml/xmlversion.h
  - disabled libiconv

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

include/win32config.h
  - changed an 
#ifdef _MSC_VER
    to
#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

configure
  - 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 configure.in so it's the
wrong place,

trio.h
  - modified this block
#if defined(WIN32) && !defined(isascii)
# define isascii ((unsigned)(x) < 0x80)
#endif
    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

Makefile.in
  - Added '@ADDITIONAL_DLL_COMMANDS@' for insertion of
    additional calls.

  is generated from Makefile.am

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
-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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