On 2015-01-23 Gabi Davar wrote:
> I've created vs2013 based solution for lzma DLL, lzma static and most
> utils. It based on the works of Garen & Mārtiņš Možeiko.
> It can be found at https://github.com/mindw/xz vs2013_520 branch.
> 
> The cmake branch has the build system ported to cmake (only for VS).
> It enabled me to build xz for Python 2.7 use. (Intel C++ Compiler
> targeted at VS2008).
> 
> Any interest?

Yes, I'm interested. This will need some work though. The changes need
some explanation. Right now there is a single big commit with no
information why something has been done.

A few thoughts:

  - The .gitignore has wrong dir name (2012 vs. 2013).

  - Adding __declspec(noreturn) breaks other compilers. How important
    this change even is? Whatever optimizations it allows aren't
    important in the places those functions get called. If it is to
    silence a compiler warning, it can be considered but it's still not
    that important.

  - Are the casts added in tuklib_integer.h there to silence warnings?
    If so, I'll add the casts.

  - I don't want "restrict" keywords in the API headers. The headers
    need to be C89 and C++98 compatible. There is nothing wrong having
    the restricts only in the .c files. Maybe they were added to
    silence warnings? The restricts aren't that important so maybe they
    could even be removed, but I think the best is to leave those as is
    unless MSVC cannot compile it at all now (maybe add a flag to MSVC
    to omit that warning).

  - Including <windows.h> in mytime.c shouldn't be needed because
    private.h already does that.

  - _snprintf isn't a safe replacement for C99 snprintf. Maybe it is
    acceptable here since the buffers used in xz should be big enough,
    but I have still liked using snprintf. (It's good to note that
    snprintf is only needed for the command line tools, not liblzma.)

  - I don't want to commit a second copy of getopt.h. Perhaps just make
    windows/msvc2013/getopt.h #include "../../lib/getopt.in.h"?

  - I don't have an opinion if it is useful to use CMake for this.
    Note that there already are resource files so creating one with
    CMake seems redundant. I don't know if the included resource files
    can be used as is with MSVC though.

Thanks for your help.

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

Reply via email to