<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/compat, branch v1.6.5.2</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.6.5.2</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.6.5.2'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2009-10-09T07:02:23Z</updated>
<entry>
<title>Merge branch 'ms/msvc'</title>
<updated>2009-10-09T07:02:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-10-09T07:02:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=8ba5effa26707fdc5b8a3b10f0fdd3007f657b64'/>
<id>urn:sha1:8ba5effa26707fdc5b8a3b10f0fdd3007f657b64</id>
<content type='text'>
* ms/msvc:
  Fix the exit code of MSVC build scripts on cygwin
  Fix MSVC build on cygwin
</content>
</entry>
<entry>
<title>Fix the exit code of MSVC build scripts on cygwin</title>
<updated>2009-10-09T05:53:12Z</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsay1.demon.co.uk</email>
</author>
<published>2009-10-08T15:33:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=b5d18b8e6f68746a85edfea08e9aff3351d7e891'/>
<id>urn:sha1:b5d18b8e6f68746a85edfea08e9aff3351d7e891</id>
<content type='text'>
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 &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Fix some printf format warnings</title>
<updated>2009-10-02T07:32:51Z</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsay1.demon.co.uk</email>
</author>
<published>2009-09-30T18:49:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=5322ef2006cc93ad76140ff742cd96e74c1ec09b'/>
<id>urn:sha1:5322ef2006cc93ad76140ff742cd96e74c1ec09b</id>
<content type='text'>
commit 51ea551 ("make sure byte swapping is optimal for git"
2009-08-18) introduced a "sane definition for ntohl()/htonl()"
for use on some GNU C platforms. Unfortunately, for some of
these platforms, this results in the introduction of a problem
which is essentially the reverse of a problem that commit 6e1c234
("Fix some warnings (on cygwin) to allow -Werror" 2008-07-3) was
intended to fix.

In particular, on platforms where the uint32_t type is defined
to be unsigned long, the return type of the new ntohl()/htonl()
is causing gcc to issue printf format warnings, such as:

    warning: long unsigned int format, unsigned int arg (arg 3)

(nine such warnings, covering six different files). The earlier
commit (6e1c234) needed to suppress these same warnings, except
that the types were in the opposite direction; namely the format
specifier ("%u") was 'unsigned int' and the argument type (ie the
return type of ntohl()) was 'long unsigned int' (aka uint32_t).

In order to suppress these warnings, the earlier commit used the
(C99) PRIu32 format specifier, since the definition of this macro
is suitable for use with the uint32_t type on that platform.
This worked because the return type of the (original) platform
ntohl()/htonl() functions was uint32_t.

In order to suppress these warnings, we change the return type of
the new byte swapping functions in the compat/bswap.h header file
from 'unsigned int' to uint32_t.

Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Acked-by: Nicolas Pitre &lt;nico@fluxnic.net&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
</content>
</entry>
<entry>
<title>Add scripts to generate projects for other buildsystems (MSVC vcproj, QMake)</title>
<updated>2009-09-19T03:00:42Z</updated>
<author>
<name>Marius Storm-Olsen</name>
<email>mstormo@gmail.com</email>
</author>
<published>2009-09-16T08:20:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=259d87c354954e8ee3b241dce1393c27186e8ee7'/>
<id>urn:sha1:259d87c354954e8ee3b241dce1393c27186e8ee7</id>
<content type='text'>
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 &lt;mstormo@gmail.com&gt;
Acked-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Add README for MSVC build</title>
<updated>2009-09-19T03:00:42Z</updated>
<author>
<name>Marius Storm-Olsen</name>
<email>mstormo@gmail.com</email>
</author>
<published>2009-09-16T08:20:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=a2c6bf0e7661a4e6eafe7810cca1cd08187d311f'/>
<id>urn:sha1:a2c6bf0e7661a4e6eafe7810cca1cd08187d311f</id>
<content type='text'>
Based on original README patch from Frank Li, describe the steps
to build git with VS2008 (aka MSVC).

Signed-off-by: Marius Storm-Olsen &lt;mstormo@gmail.com&gt;
Acked-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Add MSVC to Makefile</title>
<updated>2009-09-19T03:00:42Z</updated>
<author>
<name>Marius Storm-Olsen</name>
<email>mstormo@gmail.com</email>
</author>
<published>2009-09-16T08:20:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=164a5e3faab931a6c6459b56acae7f91dde6337d'/>
<id>urn:sha1:164a5e3faab931a6c6459b56acae7f91dde6337d</id>
<content type='text'>
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 &lt;mstormo@gmail.com&gt;
Acked-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Define strncasecmp and ftruncate for MSVC</title>
<updated>2009-09-19T03:00:42Z</updated>
<author>
<name>Marius Storm-Olsen</name>
<email>mstormo@gmail.com</email>
</author>
<published>2009-09-16T08:20:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=386ac45102df71e186d4de62b63a41ae35e71089'/>
<id>urn:sha1:386ac45102df71e186d4de62b63a41ae35e71089</id>
<content type='text'>
Signed-off-by: Marius Storm-Olsen &lt;mstormo@gmail.com&gt;
Acked-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Make usage of windows.h lean and mean</title>
<updated>2009-09-19T03:00:42Z</updated>
<author>
<name>Marius Storm-Olsen</name>
<email>mstormo@gmail.com</email>
</author>
<published>2009-09-16T08:20:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=435bdf8c7ffa493f8f6f2e8f329f8cc22db16ce6'/>
<id>urn:sha1:435bdf8c7ffa493f8f6f2e8f329f8cc22db16ce6</id>
<content type='text'>
Centralize the include of windows.h in git-compat-util.h, turn on
WIN32_LEAN_AND_MEAN to avoid including plenty of other header files
which is not needed in Git. Also ensure we load winsock2.h first,
so we don't load the older winsock definitions at a later stage,
since they contain duplicate definitions.

When moving windows.h into git-compat-util.h, we need to protect
the definition of struct pollfd in mingw.h, since this file is used
by both MinGW and MSVC, and the latter defines this struct in
winsock2.h.

We need to keep the windows.h include in compat/win32.h, since its
shared by both MinGW and Cygwin, and we're not touching Cygwin in
this commit. The include in git-compat-util.h is protected with an
ifdef WIN32, which is not the case when compiling for Cygwin.

Signed-off-by: Marius Storm-Olsen &lt;mstormo@gmail.com&gt;
Acked-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Add platform files for porting to MSVC</title>
<updated>2009-09-19T03:00:42Z</updated>
<author>
<name>Frank Li</name>
<email>lznuaa@gmail.com</email>
</author>
<published>2009-09-16T08:20:25Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=d75f8e61315cc502c34aec6600db00a7c7192ffd'/>
<id>urn:sha1:d75f8e61315cc502c34aec6600db00a7c7192ffd</id>
<content type='text'>
Add msvc.c and msvc.h to build git under MSVC.

Signed-off-by: Frank Li &lt;lznuaa@gmail.com&gt;
Signed-off-by: Marius Storm-Olsen &lt;mstormo@gmail.com&gt;
Acked-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Add MinGW header files to build git with MSVC</title>
<updated>2009-09-19T03:00:42Z</updated>
<author>
<name>Frank Li</name>
<email>lznuaa@gmail.com</email>
</author>
<published>2009-09-16T08:20:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=16fe1e03694e75a3923c3a757ec946aa6098aec7'/>
<id>urn:sha1:16fe1e03694e75a3923c3a757ec946aa6098aec7</id>
<content type='text'>
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 &lt;lznuaa@gmail.com&gt;
Signed-off-by: Marius Storm-Olsen &lt;mstormo@gmail.com&gt;
Acked-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
