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

Re: [xml] Re: [xslt] Windows build



Hi,

Igor Zlatkovic <igor stud fh-frankfurt de> writes:

> Okay... the files Makefile.am, include/makefile.am, config.h.in and
> configure.in I cannot comment on, these are far beyond my realm so
> far :-)

Makefile.am simply add more flags in the linking stage.

include/Makefile.am adds your new WinSock conversion header to it so
it is automatically bundled with the distribution.

Of configure.in and config.h, the new defines are:

HAVE_WIN32_THREADS
HAVE_WINSOCK2_H
_WINSOCKAPI_

and these

/* Win32 Std C name mangling work-around */
#undef snprintf

/* Win32 Std C name mangling work-around */
#undef vsnprintf

Which are defined to their _XX equivalent if compiling for a mingw*
host.

> * libxml.h:
> Okay with me. This will be changed if the proposal to use autogenerated
> config.h on all Windowsish platforms receives no denial within the next
> days, but that is my job and won't affect anyone else.

#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)

This is pretty important so that programs that use the library have
the __declspec(dllimport) set at various global variables.

> * nanohttp.c and nanoftp.c:
> Okay with me.

I think this works out better, personally.

> * testThreads.c:
> Gulp! Well... that makes testThreadsWin32.c obsolete. Better that way. Okay
> with me.

The Makefile.am didn't have the testThreadWin32.c in its build program
list and apparently that parameter (or "primary") cannot be set
conditionally. They are very much similar so I just combined the two.

It may be worthy to note that RedHat is working on a pthreads for
Windows:

<http://sources.redhat.com/pthreads-win32/>

Also, I did not test the threads too much *and* they are enabled via
the --with-threads configure switch.

> * xmllint.c:
> That means I should better #define __WIN32__ in my makefile now :-). Okay
> with me.

-#if defined (_WIN32) && !defined(__CYGWIN__)
-#ifdef _MSC_VER
+#if defined (__WIN32__) && !defined(__CYGWIN__)
 #include <winsock2.h>
+#ifdef _MSC_VER
 #pragma comment(lib, "ws2_32.lib")
 #define gettimeofday(p1,p2)
 #include <time.h>

The pragma seems specific for MSVC but all Win32 platforms are going
to need winsock2.h I didn't check the time info out to much, though.

> * include/libxml/xmlversion.h.in:
> Oh Gods... #if (defined(_MSC_VER) || defined(__CYGWIN__) ||
> defined(__MINGW32__))... who is the next? :-) Lets exchange that for a
> simple #if defined(__WIN32__), okay, everyone?

Sounds good to me.

> * include/libxml/xmlwin32version.h:
> This file is autogenerated and meanwhile obsolete. Please, please, please
> direct your attention to xmlversion.h.in instead. Other than that, what was
> the
>   #define LIBXML_DOTTED_VERSION "2.4.25-special"
> for?

Thats just so the automatically generated tar ball will be called
libxml2-2.4.25-special.tar.gz and not be confused with the official
distribution.

Thank you,

Elizabeth



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