Re: [xslt] win32 build (mingw-cross compilation)
- From: Daniel Veillard <veillard redhat com>
- To: The Gnome XSLT library mailing-list <xslt gnome org>
- Subject: Re: [xslt] win32 build (mingw-cross compilation)
- Date: Fri, 24 Aug 2007 05:48:16 -0400
On Fri, Aug 24, 2007 at 12:57:19AM +0300, Roumen Petrov wrote:
> Hello list members,
>
> Before more than one month I post a patch (bug#454392 libxslt bug track
> system).
> Daniel is not convinced that patch is correct and think that patch will
> affect other builds.
yes definitely. I looks to me that the patch was done with mingw-cross
compilation in mind without taking care to not affects other builds. Since
there is a huge majority of people using and building natively on Windows
and so far you're the only one I have heard asking for cross-compilation
support, you will understand that I ask you to be extremely careful in your
patch. I don't want to break thousands of people build just to fix your
problem. This is so obvious I should have to say this but somehow it seems
I need to !
> I attach patch "libxslt-1.1.20.patch-0" as is.
> Notes:
>
> - Without changes in makefiles mingw build don't create shared
> libraries(dlls):
> WIN32_EXTRA_LDFLAGS += -no-undefined : for details see libtool
> documentation.
> configure set this flag but don't use in makefiles.
> - Changes in ./configure.in:
> remove unused winsock. AC_DEFINE([_WINSOCKAPI_]... seems to me as cut and
> paste from libxml.
> WIN32_EXTRA_LDFLAGS += -avoid-version (new - only for mingw): create dll
> with name libXXX.dll instead of
> libXXX[versufix].dll, where [versufix] is in format "-N" where N is a
> number computed from version info.
> As result created by cross compilation libraries match names from native
> builds.
> - Modification in extensions.c is to suppress warning.
> - Now I'm sure that AC_LIBTOOL_WIN32_DLL is not necessary.
>
>
> I attach a new more general patch ("libxslt-1.1.20.patch").
> This patch remove completely winsock from libxslt and affect now native
> builds.
> Note about changes in xsltutils.c:
> - In mingw HAVE_GETTIMEOFDAY should be defined.
> After patch mingw compile fine in case if XSLT_WIN32_PERFORMANCE_COUNTER
> is defined too.
> - for winsock2.h library is ws2_32 but for wsock32 - winsock.h (included be
> default from windows.h if winsock2.h is not included before I think
> ).
> Please comment on it (I don't have native build environment).
[...]
>
> -/* gettimeofday on Windows ??? */
> -#if defined(WIN32) && !defined(__CYGWIN__)
> +#ifndef HAVE_GETTIMEOFDAY
> #ifdef _MSC_VER
> -#include <winsock2.h>
> -#pragma comment(lib, "ws2_32.lib")
> -#define gettimeofday(p1,p2)
> -#define HAVE_GETTIMEOFDAY
> +#include <windows.h>
> #define XSLT_WIN32_PERFORMANCE_COUNTER
> #endif /* _MS_VER */
> -#endif /* WIN32 */
> +#endif /* HAVE_GETTIMEOFDAY*/
[...]
> #if defined(WIN32) && !defined (__CYGWIN__)
> -#if defined(_MSC_VER) || defined(__MINGW32__)
> -#include <winsock2.h>
> +#if defined(_MSC_VER)
> #define gettimeofday(p1,p2)
> #define snprintf _snprintf
> #endif /* _MS_VER */
So you change the code if WIN32 and _MSC_VER is defined, removing winsock2.h.
or the gettimeofday support for such environment. Why ?
I don't understand how you can suggest making change to non-MINGW build
and related code when you seems to not be able to test those !
Please make your patches so that they affect *only* the environment
you can test, that would be a first good point to increase the value of
your patch.
Daniel
--
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
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]