summaryrefslogtreecommitdiff
path: root/compat/vcbuild
AgeCommit message (Collapse)Author
2010-12-16Merge branch 'rj/msvc-fix'Junio C Hamano
* rj/msvc-fix: msvc: Fix macro redefinition warnings msvc: Fix build by adding missing INTMAX_MAX define msvc: git-daemon.exe: Fix linker "unresolved externals" error msvc: Fix compilation errors in compat/win32/sys/poll.c
2010-12-10msvc: Fix build by adding missing INTMAX_MAX defineRamsay Jones
Commit c03c831 (do not depend on signed integer overflow, 05-10-2010) provokes an msvc build failure. The cause of the failure is a missing definition of the INTMAX_MAX constant, used in the new maximum_signed_value_of_type(a) macro, which would normally be defined in the C99 <stdint.h> header file. In order the fix the compilation error, we add an appropriate definition of the INTMAX_MAX constant, along with INTMAX_MIN and UINTMAX_MAX, to an msvc compat header file. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Acked-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-24win32: use our own dirent.hErik Faye-Lund
The mingw-runtime implemenation of opendir, readdir and closedir sets errno to 0 on success, something that POSIX explicitly forbids. 3ba7a06 ("A loose object is not corrupt if it cannot be read due to EMFILE") introduce a dependency on this behaviour, leading to a broken "git clone" on Windows. compat/mingw.c contains an implementation of readdir, and compat/msvc.c contains implementations of opendir and closedir. Move these to compat/win32/dirent.[ch], and change to our own DIR structure at the same time. This provides a generic Win32-implementation of opendir, readdir and closedir which works on both MinGW and MSVC and does not reset errno, and as a result git clone is working again on Windows. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-19Merge branch 'maint-1.6.6' into maintJunio C Hamano
* maint-1.6.6: MSVC: Fix build by adding missing termios.h dummy
2010-04-19MSVC: Fix build by adding missing termios.h dummyJohannes Sixt
A use of this header file was introduced in eb80042 (Add missing #include to support TIOCGWINSZ on Solaris, 2010-01-11). Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-23msvc: Fix an "unrecognized option" linker warningRamsay Jones
Having recently added support for building git-imap-send on Windows, we now link against OpenSSL libraries, and the linker issues the following warning: warning LNK4044: unrecognized option '/lssl'; ignored In order to suppress the warning, we change the msvc linker script to translate an '-lssl' parameter to the ssleay32.lib library. Note that the linker script was already including ssleay32.lib (along with libeay32.lib) as part of the translation of the '-lcrypto' library parameter. However, libeay32.dll does not depend on ssleay32.dll and can be used stand-alone, so we remove ssleay32.lib from the '-lcrypto' translation. The dependence of ssleay32.dll on libeay32.dll is represented in the Makefile by the NEEDS_CRYPTO_WITH_SSL build variable. Also, add the corresponding change to the buildsystem generator. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Acked-by: Sebastian Schuberth <sschuberth@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-18Merge branch 'ef/msys-imap'Junio C Hamano
* ef/msys-imap: Windows: use BLK_SHA1 again MSVC: Enable OpenSSL, and translate -lcrypto mingw: enable OpenSSL mingw: wrap SSL_set_(w|r)fd to call _get_osfhandle imap-send: build imap-send on Windows imap-send: fix compilation-error on Windows imap-send: use run-command API for tunneling imap-send: use separate read and write fds imap-send: remove useless uid code
2009-10-23MSVC: Enable OpenSSL, and translate -lcryptoMarius Storm-Olsen
We don't use crypto, but rather require libeay32 and ssleay32. handle it in both the Makefile msvc linker script, and the buildsystem generator. Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-10-09Fix the exit code of MSVC build scripts on cygwinRamsay Jones
During an MSVC build on cygwin, the make program did not notice when the compiler or linker exited with an error. This was caused by the scripts exiting with the value returned by system() directly. On POSIX-like systems, such as cygwin, the return value of system() has the exit code of the executed command encoded in the first byte (ie the value is shifted up by 8 bits). This allows the bottom 7 bits to contain the signal number of a terminated process, while the eighth bit indicates whether a core-dump was produced. (A value of -1 indicates that the command failed to execute.) The make program, however, expects the exit code to be encoded in the bottom byte. Futhermore, it apparently masks off and ignores anything in the upper bytes. However, these scripts are (naturally) intended to be used on the windows platform, where we can not assume POSIX-like semantics from a perl implementation (eg ActiveState). So, in general, we can not assume that shifting the return value right by eight will get us the exit code. In order to improve portability, we assume that a zero return from system() indicates success, whereas anything else indicates failure. Since we don't need to know the exact exit code from the compiler or linker, we simply exit with 0 (success) or 1 (failure). Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-19Add scripts to generate projects for other buildsystems (MSVC vcproj, QMake)Marius Storm-Olsen
These scripts generate projects for the MSVC IDE (.vcproj files) or QMake (.pro files), based on the output of a 'make -n MSVC=1 V=1' run. This enables us to simply do the necesarry changes in the Makefile, and you can update the other buildsystems by regenerating the files. Keeping the other buildsystems up-to-date with main development. The generator system is designed to easily drop in pm's for other buildsystems as well, if someone has an itch. However, the focus has been Windows development, so the 'engine' might need patches to support any platform. Also add some .gitignore entries for MSVC files. Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-19Add README for MSVC buildMarius Storm-Olsen
Based on original README patch from Frank Li, describe the steps to build git with VS2008 (aka MSVC). Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-19Add MSVC to MakefileMarius Storm-Olsen
Enable MSVC builds with GNU Make by simply calling make MSVC=1 (Debug build possible by adding DEBUG=1 as well) Two scripts, clink.pl and lib.pl, are used to convert certain GCC specific command line options into something MSVC understands. By building for MSVC with GNU Make, we can ensure that the MSVC port always follows the latest code, and does not lag behind due to unmaintained NMake Makefile or IDE projects. Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-19Add MinGW header files to build git with MSVCFrank Li
Added the header files dirent.h, unistd.h and utime.h Add alloca.h, which simply includes malloc.h, which defines alloca(). Signed-off-by: Frank Li <lznuaa@gmail.com> Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-09-19Add empty header files for MSVC portMarius Storm-Olsen
MSVC lacks many of the header files included by git-compat-util.h; add blank header files for these instead of going ifdef crazy. Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>