<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/compat/win32, branch v2.3.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.3.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.3.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-07-15T18:19:09Z</updated>
<entry>
<title>Win32: Unicode file name support (dirent)</title>
<updated>2014-07-15T18:19:09Z</updated>
<author>
<name>Karsten Blees</name>
<email>blees@dcon.de</email>
</author>
<published>2012-01-14T21:01:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0217569bb2db23b8686f67b0f4dda7e517dec6fd'/>
<id>urn:sha1:0217569bb2db23b8686f67b0f4dda7e517dec6fd</id>
<content type='text'>
Changes opendir/readdir to use Windows Unicode APIs and convert between
UTF-8/UTF-16.

Removes parameter checks that are already covered by xutftowcs_path. This
changes detection of ENAMETOOLONG from MAX_PATH - 2 to MAX_PATH (matching
is_dir_empty in mingw.c). If name + "/*" or the resulting absolute path is
too long, FindFirstFile fails and errno is set through err_win_to_posix.

Increases the size of dirent.d_name to accommodate the full
WIN32_FIND_DATA.cFileName converted to UTF-8 (UTF-16 to UTF-8 conversion
may grow by factor three in the worst case).

Signed-off-by: Karsten Blees &lt;blees@dcon.de&gt;
Signed-off-by: Stepan Kasal &lt;kasal@ucw.cz&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sk/mingw-dirent'</title>
<updated>2014-07-09T18:34:27Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-07-09T18:34:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b0bae7f0e42f0f020414eb49ea26e82f73ce0db8'/>
<id>urn:sha1:b0bae7f0e42f0f020414eb49ea26e82f73ce0db8</id>
<content type='text'>
* sk/mingw-dirent:
  Win32 dirent: improve dirent implementation
  Win32 dirent: clarify #include directives
  Win32 dirent: change FILENAME_MAX to MAX_PATH
  Win32 dirent: remove unused dirent.d_reclen member
  Win32 dirent: remove unused dirent.d_ino member
</content>
</entry>
<entry>
<title>Win32 dirent: improve dirent implementation</title>
<updated>2014-06-09T22:10:53Z</updated>
<author>
<name>Karsten Blees</name>
<email>blees@dcon.de</email>
</author>
<published>2011-01-07T16:57:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d8890ce72609b3f7a002ed38b4ed832b6a97fc5c'/>
<id>urn:sha1:d8890ce72609b3f7a002ed38b4ed832b6a97fc5c</id>
<content type='text'>
Improve the dirent implementation by removing the relics that were once
necessary to plug into the now unused MinGW runtime, in preparation for
Unicode file name support.

Move FindFirstFile to opendir, and FindClose to closedir, with the
following implications:
- DIR.dd_name is no longer needed
- chdir(one); opendir(relative); chdir(two); readdir() works as expected
  (i.e. lists one/relative instead of two/relative)
- DIR.dd_handle is a valid handle for the entire lifetime of the DIR struct
- thus, all checks for dd_handle == INVALID_HANDLE_VALUE and dd_handle == 0
  have been removed
- the special case that the directory has been fully read (which was
  previously explicitly tracked with dd_handle == INVALID_HANDLE_VALUE &amp;&amp;
  dd_stat != 0) is now handled implicitly by the FindNextFile error
  handling code (if a client continues to call readdir after receiving
  NULL, FindNextFile will continue to fail with ERROR_NO_MORE_FILES, to
  the same effect)
- extracting dirent data from WIN32_FIND_DATA is needed in two places, so
  moved to its own method
- GetFileAttributes is no longer needed. The same information can be
  obtained from the FindFirstFile error code, which is ERROR_DIRECTORY if
  the name is NOT a directory (-&gt; ENOTDIR), otherwise we can use
  err_win_to_posix (e.g. ERROR_PATH_NOT_FOUND -&gt; ENOENT). The
  ERROR_DIRECTORY case could be fixed in err_win_to_posix, but this
  probably breaks other functionality.

Removes the ERROR_NO_MORE_FILES check after FindFirstFile (this was
fortunately a NOOP (searching for '*' always finds '.' and '..'),
otherwise the subsequent code would have copied data from an uninitialized
buffer).

Changes malloc to git support function xmalloc, so opendir will die() if
out of memory, rather than failing with ENOMEM and letting git work on
incomplete directory listings (error handling in dir.c is quite sparse).

Signed-off-by: Karsten Blees &lt;blees@dcon.de&gt;
Signed-off-by: Erik Faye-Lund &lt;kusmabite@gmail.com&gt;
Signed-off-by: Stepan Kasal &lt;kasal@ucw.cz&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Win32 dirent: clarify #include directives</title>
<updated>2014-06-09T22:10:53Z</updated>
<author>
<name>Karsten Blees</name>
<email>blees@dcon.de</email>
</author>
<published>2011-01-07T16:47:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a8248f4a8dfc43177bbbcd9b874fc4e0cbf6b322'/>
<id>urn:sha1:a8248f4a8dfc43177bbbcd9b874fc4e0cbf6b322</id>
<content type='text'>
Git-compat-util.h is two dirs up, and already includes &lt;dirent.h&gt; (which
is the same as "dirent.h" due to -Icompat/win32 in the Makefile).

Signed-off-by: Karsten Blees &lt;blees@dcon.de&gt;
Signed-off-by: Erik Faye-Lund &lt;kusmabite@gmail.com&gt;
Signed-off-by: Stepan Kasal &lt;kasal@ucw.cz&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Win32 dirent: change FILENAME_MAX to MAX_PATH</title>
<updated>2014-06-09T22:10:53Z</updated>
<author>
<name>Karsten Blees</name>
<email>blees@dcon.de</email>
</author>
<published>2011-01-07T16:43:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fa9abe95bec0e12322baae3511678ccfeb97eebc'/>
<id>urn:sha1:fa9abe95bec0e12322baae3511678ccfeb97eebc</id>
<content type='text'>
FILENAME_MAX and MAX_PATH are both 260 on Windows, however, MAX_PATH is
used throughout the other Win32 code in Git, and also defines the length
of file name buffers in the Win32 API (e.g. WIN32_FIND_DATA.cFileName,
from which we're copying the dirent data).

Signed-off-by: Karsten Blees &lt;blees@dcon.de&gt;
Signed-off-by: Erik Faye-Lund &lt;kusmabite@gmail.com&gt;
Signed-off-by: Stepan Kasal &lt;kasal@ucw.cz&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Win32 dirent: remove unused dirent.d_reclen member</title>
<updated>2014-06-09T22:10:53Z</updated>
<author>
<name>Karsten Blees</name>
<email>blees@dcon.de</email>
</author>
<published>2011-01-07T16:38:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b0601e6564061aa21699ee0a523e969c228cb1b4'/>
<id>urn:sha1:b0601e6564061aa21699ee0a523e969c228cb1b4</id>
<content type='text'>
Remove the union around dirent.d_type and the unused dirent.d_reclen member
(which was necessary for compatibility with the MinGW dirent runtime, which
is no longer used).

Signed-off-by: Karsten Blees &lt;blees@dcon.de&gt;
Signed-off-by: Erik Faye-Lund &lt;kusmabite@gmail.com&gt;
Signed-off-by: Stepan Kasal &lt;kasal@ucw.cz&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Win32 dirent: remove unused dirent.d_ino member</title>
<updated>2014-06-09T22:10:52Z</updated>
<author>
<name>Karsten Blees</name>
<email>blees@dcon.de</email>
</author>
<published>2011-01-07T16:34:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1d94c403fd52eddd2c4d6c0123f64c56a79bfca7'/>
<id>urn:sha1:1d94c403fd52eddd2c4d6c0123f64c56a79bfca7</id>
<content type='text'>
There are no proper inodes on Windows, so remove dirent.d_ino and #define
NO_D_INO_IN_DIRENT in the Makefile (this skips e.g. an ineffective qsort in
fsck.c).

Signed-off-by: Karsten Blees &lt;blees@dcon.de&gt;
Signed-off-by: Erik Faye-Lund &lt;kusmabite@gmail.com&gt;
Signed-off-by: Stepan Kasal &lt;kasal@ucw.cz&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>mingw: activate alloca</title>
<updated>2014-04-09T17:08:35Z</updated>
<author>
<name>Kirill Smelkov</name>
<email>kirr@mns.spb.ru</email>
</author>
<published>2014-04-09T12:48:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=22f4c27e68f448d5fce316a73ea3f7bab6aa1268'/>
<id>urn:sha1:22f4c27e68f448d5fce316a73ea3f7bab6aa1268</id>
<content type='text'>
Both MSVC and MINGW have alloca(3) definitions in malloc.h, so by moving
win32-compat alloca.h from compat/vcbuild/include/ to compat/win32/ ,
which is included by both MSVC and MINGW CFLAGS, we can make alloca()
work on both those Windows environments.

In MINGW, malloc.h has explicit check for GNUC and if it is so, defines
alloca to __builtin_alloca, so it looks like we don't need to add any
code to here-shipped alloca.h to get optimum performance.

Compile-tested on Windows in MSysGit.

Signed-off-by: Kirill Smelkov &lt;kirr@mns.spb.ru&gt;
Acked-by: Erik Faye-Lund &lt;kusmabite@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>compat/win32/pthread.c: Fix a sparse warning</title>
<updated>2013-04-28T19:26:45Z</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsay1.demon.co.uk</email>
</author>
<published>2013-04-27T19:16:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9c3b051f931af9e3bcc765a4c83426e3be7de7f1'/>
<id>urn:sha1:9c3b051f931af9e3bcc765a4c83426e3be7de7f1</id>
<content type='text'>
Sparse issues a 'Using plain integer as NULL pointer' warning when
initializing an pthread_t structure with an '{ 0 }' initializer.
The first field of the pthread_t structure has type HANDLE (void *),
so in order to suppress the warning, we replace the initializer
expression with '{ NULL }'.

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>make poll available for other platforms lacking it</title>
<updated>2012-09-17T22:42:57Z</updated>
<author>
<name>Joachim Schmitz</name>
<email>jojo@schmitz-digital.de</email>
</author>
<published>2012-09-17T21:16:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6d45eb1720294a93e571e843efb851fee70ac5e1'/>
<id>urn:sha1:6d45eb1720294a93e571e843efb851fee70ac5e1</id>
<content type='text'>
move poll.[ch] out of compat/win32/ into compat/poll/ and adjust
Makefile with the changed paths. Adding comments to Makefile about
how/when to enable it and add logic for this

Signed-off-by: Joachim Schmitz &lt;jojo@schmitz-digital.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
