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



Under MSYS (for my machine, of course)

$ gcc -dM -E -x c /dev/null
#define _stdcall __attribute__((__stdcall__))
#define __WINNT 1
#define __i386__ 1
#define _X86_ 1
#define __i386 1
#define ___stdcall__ __attribute__((__stdcall__))
#define WIN32 1
#define __WINNT__ 1
#define __GNUC_MINOR__ 95
#define __declspec(x) __attribute__((x))
#define WINNT 1
#define __MSVCRT__ 1
#define __MINGW32__ 0.2
#define i386 1
#define _WIN32 1
#define __stdcall __attribute__((__stdcall__))
#define __WIN32__ 1
#define __GNUC__ 2
#define __cdecl __attribute__((__cdecl__))
#define __STDC__ 1
#define ___stdcall __attribute__((__stdcall__))
#define __WIN32 1

So it looks like mingw supports most reasonable
variations of the _*WIN32_* macro, and further
specialization should be based on the __MINGW32__ macro.

That is identical to what I have, without MSYS:

  C:\Home\Igor>gcc -dM -E -x c NUL:
  #define _stdcall __attribute__((__stdcall__))
  #define __WINNT 1
  #define __i386__ 1
  #define _X86_ 1
  #define __i386 1
  #define ___stdcall__ __attribute__((__stdcall__))
  #define WIN32 1
  #define __WINNT__ 1
  #define __GNUC_MINOR__ 95
  #define __declspec(x) __attribute__((x))
  #define WINNT 1
  #define __MSVCRT__ 1
  #define __MINGW32__ 1.0
  #define i386 1
  #define _WIN32 1
  #define __stdcall __attribute__((__stdcall__))
  #define __WIN32__ 1
  #define __GNUC__ 2
  #define __cdecl __attribute__((__cdecl__))
  #define __STDC__ 1
  #define ___stdcall __attribute__((__stdcall__))
  #define __WIN32 1

and Elizabeth has the same. Now, when compiling the source, how can one know
that you two need config.h and I need win32config.h?

How about using the win32config.h as a source for the config.h hereforth? I
mean, make the source always include config.h. GNU autoconf's ./configure
then generates it from config.h.in, and ./win32/configure.js generates it by
making a copy of win32config.h.

Is that an option?






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