I'm sorry that it takes so long for me to reply. :-(

On 2015-06-30 Adam Walling wrote:
> On Fri, Jun 19, 2015 at 1:42 PM, Lasse Collin
> <lasse.col...@tukaani.org> wrote:
> > ...
> > My understanding is that the symbols exported from a DLL should be
> > marked with __declspec(dllexport) when building the DLL. When built
> > with MinGW-w64, this is done in src/liblzma/common/common.h by
> > checking if DLL_EXPORT has been defined by Libtool. Does this work
> > with MSVC as is or does this need to be fixed?
> 
> My apologies, DLL_EXPORT must indeed be set for the dll to generate
> the lib.
> 
> I attached a git diff that does this.

Thanks. Was the "xzWinTest" thing in the patch included intentionally?

Do you have an idea how to avoid #defining NDEBUG when building a debug
version? It's not essential to have it done now, but I think it's
important to do it at some point.

> > The API header src/liblzma/api/lzma.h detects MSVC by checking if
> > _MSC_VER has been defined and avoids using <inttypes.h> because
> > before MSVC 2013 it didn't exist (I think). Is it OK to replace the
> > line 90
> >
> >     #if defined(_WIN32) && defined(_MSC_VER)
> >
> > with this?
> >
> >     #if defined(_WIN32) && defined(_MSC_VER) && _MSC_VER < 1800
> >
> > It doesn't matter when building liblzma itself, but it can matter
> > when compiling something that uses the liblzma API.
> >
> 
> I believe this is safe; it still builds and runs fine for me with
> this change, even with consumers of the DLL built before the DLL was
> rebuilt, and vice versa. In the end it is simply a bunch of typedefs
> to the same POD type, so I believe this is a safe change

Thanks. Committed.

-- 
Lasse Collin  |  IRC: Larhzu @ IRCnet & Freenode

Reply via email to