src/win32


Log

Author Commit Date CI Message
Carlos Martín Nieto 0731a5b4 2014-05-14T19:12:48 indexer: mmap fixes for Windows Windows has its own ftruncate() called _chsize_s(). p_mkstemp() is changed to use p_open() so we can make sure we open for writing; the addition of exclusive create is a good thing to do regardless, as we want a temporary path for ourselves. Lastly, MSVC doesn't quite know how to add two numbers if one of them is a void pointer, so let's alias it to unsigned char.C
Carlos Martín Nieto f7310540 2014-05-13T02:41:48 indexer: use mmap for writing Some OSs cannot keep their ideas about file content straight when mixing standard IO with file mapping. As we use mmap for reading from the packfile, let's make writing to the pack file use mmap.
Philip Kelley f0b820dd 2014-05-16T12:38:56 Win32: Supply _O_NOINHERIT when calling _wopen
Philip Kelley 7110000d 2014-04-22T10:21:19 React to feedback for UTF-8 <-> WCHAR and reparse work
Edward Thomson 65477db1 2014-04-21T23:32:31 Handle win32 reparse points properly
Philip Kelley c2c81615 2014-04-19T18:05:31 Win32: UTF-8 <-> WCHAR conversion overhaul
Jan Melcher 2873a862 2014-03-27T12:42:44 Retry renaming files on Access Denied errors When a file is open for reading (without shared-delete permission), and then a different thread/process called p_rename, that would fail, even if the file was only open for reading for a few milliseconds. This change lets p_rename wait up to 50ms for the file to be closed by the reader. Applies only to win32. This is especially important for git_filebuf_commit, because writes should not fail if the file is read simultaneously. Fixes #2207
Edward Thomson 55d257e7 2014-02-05T15:03:00 Remove unused utf8 -> utf16 conversion code
Russell Belfer 7697e541 2013-12-11T15:02:20 Test cancel from indexer progress callback This adds tests that try canceling an indexer operation from within the progress callback. After writing the tests, I wanted to run this under valgrind and had a number of errors in that situation because mmap wasn't working. I added a CMake option to force emulation of mmap and consolidated the Amiga-specific code into that new place (so we don't actually need separate Amiga code now, just have to turn on -DNO_MMAP). Additionally, I made the indexer code propagate error codes more reliably than it used to.
Edward Thomson 5588f073 2013-12-09T10:25:36 Clean up warnings
Alessandro Ghedini 758f2f10 2013-11-27T14:17:40 posix: Solaris doesn't have strnlen either
Russell Belfer 14997dc5 2013-10-08T12:45:43 More filemode cleanups for FAT on MacOS This cleans up some additional issues. The main change is that on a filesystem that doesn't support mode bits, libgit2 will now create new blobs with GIT_FILEMODE_BLOB always instead of being at the mercy to the filesystem driver to report executable or not. This means that if "core.filemode" lies and claims that filemode is not supported, then we will ignore the executable bit from the filesystem. Previously we would have allowed it. This adds an option to the new git_repository_reset_filesystem to recurse through submodules if desired. There may be other types of APIs that would like a "recurse submodules" option, but this one is particularly useful. This also has a number of cleanups, etc., for related things including trying to give better error messages when problems come up from the filesystem. For example, the FAT filesystem driver on MacOS appears to return errno EINVAL if you attempt to write a filename with invalid UTF-8 in it. We try to capture that with a better error message now.
Vicent Martí 3d4f1698 2013-09-17T10:21:22 Merge pull request #1858 from linquize/win32-template-dir Configurable template dir for Win32
Russell Belfer eefc32d5 2013-09-16T12:54:40 Bug fixes and cleanups This contains a few bug fixes and some header and API cleanups. The main API change is that filters should now use GIT_PASSTHROUGH to indicate that they wish to skip processing a file instead of GIT_ENOTFOUND. The bug fixes include a possible out-of-range buffer access in the ident filter, a filter ordering problem I introduced into the custom filter tests on Windows, and a filter buf NUL termination issue that was coming up on Linux.
Russell Belfer a3aa5f4d 2013-09-11T12:45:20 Add simple global shutdown hooks Increasingly there are a number of components that want to do some cleanup at global shutdown time (at least if there are not going to be memory leaks). This creates a very simple system of shutdown hooks that will be invoked by git_threads_shutdown. Right now, the maximum number of hooks is hardcoded, but since adding a hook is not a public API, it should be fine and I thought it was better to start off with really simple code.
Linquize f84bc388 2013-09-17T23:24:44 Refactor git_win32__find_system_dirs() to extract "etc\\" as subpath parameter
Linquize 89095fbd 2013-09-17T22:57:30 Fix failure in win32_find_git_in_registry() when UAC is turned on Demand read only access to registry key instead of full access. This might happen in Windows Vista and later.
Linquize ffbd337a 2013-09-17T22:57:06 Fix failure in win32_find_git_in_registry() The buffer size 0 was definitely not enough so it failed
Linquize 21753d48 2013-09-05T20:42:47 Fix warning in src/win32/version.h
Vicent Martí dbecec37 2013-08-28T09:38:14 Merge pull request #1805 from libgit2/threading-packed-load Thread safety for the refdb_fs
Edward Thomson 1ff3a094 2013-08-27T19:41:44 Improve win32 version check, no ipv6 tests on XP
Russell Belfer f087bc24 2013-08-27T12:08:55 Convert to our own SRWLOCK type on Win32
Russell Belfer 2f368a66 2013-08-26T15:17:35 Fix MINGW SRWLock typedefs
Russell Belfer 43095341 2013-08-26T14:56:31 Load SRWLock APIs at runtime This loads SRWLock APIs at runtime and in their absence (i.e. on Windows before Vista) falls back on a regular CRITICAL_SECTION that will not permit concurrent readers.
Russell Belfer b6ac07b5 2013-08-22T14:45:10 Trying to fix Win32 warnings
Russell Belfer 972bb689 2013-08-22T14:10:56 Add SRWLock implementation of rwlocks for Win32
Edward Thomson 8255b497 2013-08-19T17:49:12 Quiet down some warnings
Edward Thomson 238b7614 2013-08-16T13:31:24 Fix p_inet_pton on windows p_inet_pton on Windows should set errno properly for callers. Rewrite p_inet_pton to handle error cases correctly and add test cases to exercise this function.
Edward Thomson 86967cc5 2013-08-19T16:44:17 Use time(2) to get the time We didn't use the added precision in gettimeofday, so remove it. This prevents us from having an unnecessary reimplementation on win32.
Martin Woodward c9340df0 2013-08-16T19:40:58 Give credit to PHP for the p_readlink function in posix_w32.c
Ben Straub 2af9bcb2 2013-08-13T11:37:31 Merge pull request #1779 from ben/win32-precompiled-header-speedup Speed up build under MSVC
Vicent Martí 40948998 2013-08-13T11:36:24 Merge pull request #1767 from libgit2/win32-bigger-utf8-buffer Bigger buffer for utf-8 parsing in win32
Russell Belfer 0228a514 2013-08-13T10:20:25 Missed one path for path_as_utf8 type
Russell Belfer ee065601 2013-08-13T09:53:56 Minor win32 fixes and improvements This is just a bunch of small fixes that I noticed while looking at the UTF8 and UTF16 path stuff. It fixes a slowdown in looking for an empty directory (not exiting loop asap), makes the dir name in the git__DIR structure be a GIT_FLEX_ARRAY to save an allocation, and fixes some slightly odd assumptions in the cl_getenv helper.
Russell Belfer 841034a3 2013-08-13T09:45:56 Reintroduce type for UTF8 win32 path conversions
Russell Belfer d4cff0cb 2013-08-13T09:40:32 Rename git__win32_path fns to git_win32_path
Ben Straub e12618b1 2013-08-13T09:22:53 Add some things to precompiled header
Ben Straub 3869a171 2013-08-08T10:10:23 Fix mingw cross-compile build
Vicent Marti 3948e862 2013-08-13T09:38:37 windows: Fuck me
Vicent Marti 345b6307 2013-08-13T09:35:07 windows: Require order
Vicent Marti 53d712dc 2013-08-13T09:31:03 windows: Missing renames.
Vicent Marti abf37327 2013-08-13T09:15:39 windows: Path conversion with better semantics
Ben Straub 0e26fca1 2013-08-10T15:11:19 Make utf-8 source strings unlimited
Ben Straub aa0af729 2013-08-10T14:56:58 Fix 64-bit MSVC warnings
Edward Thomson 57f31f05 2013-08-08T11:05:00 Fixes to safely reading the index Avoid wrapping around extension size when reading, avoid walking off the end of the buffer when reading names.
Ben Straub aaefbdee 2013-08-08T08:48:57 Discriminate path-specific and general UTF-X conversions
Ben Straub 2c0128ee 2013-08-07T19:29:33 Rename git_win_str_utf* to git_win32_path_utf*
Ben Straub 9c38f7a6 2013-08-07T13:22:41 Add typedefs for win32 utf-8 and utf-16 buffers ...and normalize the signatures of the two conversion functions.
Ben Straub d8563619 2013-08-05T11:41:39 Split UTF-16 and UTF-8 buffer sizes for win32 Also fixed up call-sites to use the correct buffer sizes, especially when converting to utf-8.
nulltoken c4ac556e 2013-06-29T12:48:58 Fix compilation warnings
Sven Strickroth 47537112 2013-06-25T16:46:06 Correctly handle junctions A junction has S_IFDIR | S_IFLNK set, however, only one makes sense. Signed-off-by: Sven Strickroth <email@cs-ware.de>
Sven Strickroth a7ea4095 2013-06-23T01:25:34 Do not redefine WC_ERR_INVALID_CHARS WC_ERR_INVALID_CHARS might be already defined by the Windows SDK. Signed-off-by: Sven Strickroth <email@cs-ware.de>
nulltoken c1cf1af4 2013-06-12T21:15:58 cmake: Add option to specify the name of the binary
Russell Belfer 37f66e82 2013-06-12T15:21:21 Fix Windows warnings This fixes problems with missing function prototypes and 64-bit data issues on Windows.
Vicent Marti 5a6e45cc 2013-06-12T21:14:04 Revert "cmake: Update Windows resources to reflect the optional vendor string" This reverts commit 095bfd748766966f5515bdfe64867d6a09287123.
yorah d17db2fd 2013-05-30T11:30:34 thread: fix segfault on Windows 64 bits `lpExitCode` is a pointer to a long. A long is 32 bits wide on Windows. It means that on Windows 64bits, `GetExitCodeThread()` doesn't set/clear the high-order bytes of the 64 bits memory space pointed at by `value_ptr`.
nulltoken 095bfd74 2013-05-21T11:38:24 cmake: Update Windows resources to reflect the optional vendor string Make InternalName and OriginalFilename resources reflect the name of the compiled binary.
Linquize 7026ad89 2013-05-16T21:08:55 calloc() to initialize memory
nulltoken 1fed6b07 2013-05-13T21:57:37 Fix trailing whitespaces
Linquize 0cb16fe9 2013-05-15T20:26:55 Unify whitespaces to tabs
Vicent Martí 3405f787 2013-05-06T06:51:21 Merge pull request #1547 from ethomson/win32_stat p_stat() should follow symlinks on windows
Edward Thomson 00a4c479 2013-05-04T12:04:39 p_stat() should follow symlinks on windows
Edward Thomson e09d18ee 2013-05-03T18:39:44 allow checkout to proceed when a dir to be removed is in use (win32)
Russell Belfer 38eef611 2013-04-16T14:19:27 Make indexer use shared packfile open code The indexer was creating a packfile object separately from the code in pack.c which was a problem since I put a call to git_mutex_init into just pack.c. This commit updates the pack function for creating a new pack object (i.e. git_packfile_check()) so that it can be used in both places and then makes indexer.c use the shared initialization routine. There are also a few minor formatting and warning message fixes.
Russell Belfer c6289186 2013-04-15T16:31:04 Fixes for Windows cas/threading stuff
Philip Kelley b39f9697 2013-03-31T23:04:14 Fix whitespace in src/win32/version.h
Philip Kelley 5c5eeba6 2013-03-31T22:22:33 Add git_has_win32_version helper
Philip Kelley 8cc2f2d8 2013-03-31T12:10:27 Win32 error reporting: Support WinHTTP errors
Russell Belfer 32460251 2013-03-18T15:54:35 Fixes and cleanups Get rid of some dead code, tighten things up a bit, and fix a bug with core::env test.
Russell Belfer 41954a49 2013-03-18T14:19:35 Switch search paths to classic delimited strings This switches the APIs for setting and getting the global/system search paths from using git_strarray to using a simple string with GIT_PATH_LIST_SEPARATOR delimited paths, just as the environment PATH variable would contain. This makes it simpler to get and set the value. I also added code to expand "$PATH" when setting a new value to embed the old value of the path. This means that I no longer require separate actions to PREPEND to the value.
Russell Belfer 5540d947 2013-03-15T16:39:00 Implement global/system file search paths The goal of this work is to expose the search logic for "global", "system", and "xdg" files through the git_libgit2_opts() interface. Behind the scenes, I changed the logic for finding files to have a notion of a git_strarray that represents a search path and to store a separate search path for each of the three tiers of config file. For each tier, I implemented a function to initialize it to default values (generally based on environment variables), and then general interfaces to get it, set it, reset it, and prepend new directories to it. Next, I exposed these interfaces through the git_libgit2_opts interface, reusing the GIT_CONFIG_LEVEL_SYSTEM, etc., constants for the user to control which search path they were modifying. There are alternative designs for the opts interface / argument ordering, so I'm putting this phase out for discussion. Additionally, I ended up doing a little bit of clean up regarding attr.h and attr_file.h, adding a new attrcache.h so the other two files wouldn't have to be included in so many places.
Vicent Martí cc427158 2013-02-28T15:09:32 Merge pull request #1373 from arrbee/why-cdecl-why Why cdecl why?
Russell Belfer f443a72d 2013-02-28T14:41:26 Fix some deprecation warnings on Windows This fixes some snprintf and vsnprintf related deprecation warnings we've been having on Windows with recent compilers.
Russell Belfer 97b71374 2013-02-28T14:14:45 Add GIT_STDLIB_CALL This removes the one-off GIT_CDECL and adds a new standard way of doing this named GIT_STDLIB_CALL with a src/win32 specific def when on the Windows platform.
Vicent Marti 5fa8abb8 2013-02-28T17:36:20 w32-posix: Wrap the `timezone` declaration with a clause Allows compilation in newer versions of MinGW that already defined it.
Sven Strickroth 82ac1f76 2013-02-27T19:48:02 Win32: Use constants in version resource definitions where possible Signed-off-by: Sven Strickroth <email@cs-ware.de>
Philip Kelley 5f633e91 2013-02-13T18:12:51 Change git2.rc to identify git.dll as VOS_NT_WINDOWS32
Jameson Miller ff9df883 2013-02-08T14:27:21 Fix Windows symlinks
Patrick Pokatilo 7672c8c7 2013-02-08T11:29:23 Moved braces to conform to code style
Patrick Pokatilo 64012fdb 2013-02-08T03:24:45 Replace LoadLibrary with GetModuleHandle, since kernel32 is loaded by default As requested
Patrick Pokatilo a49e5bed 2013-02-08T01:26:04 Replace call to strnlen with call to strlen
Patrick Pokatilo f88885e3 2013-02-08T01:10:03 Include <string.h>
Patrick Pokatilo 3b5e44ae 2013-02-08T00:50:20 Fix call to readlink
Patrick Pokatilo 94ed23f8 2013-02-07T01:41:20 Call p_readlink to determine symlink size
Vicent Martí e9631660 2013-02-01T15:57:31 Merge pull request #1303 from csware/win32_consistent_error_encoding Win32: Make sure error messages are consistently UTF-8 encoded
Sven Strickroth c70455c7 2013-02-01T22:53:51 Deduplicate FormatMessage UTF-16 to UTF-8 conversion code Signed-off-by: Sven Strickroth <email@cs-ware.de>
Sven Strickroth 45792c92 2013-02-01T10:32:05 Stick to coding style: Move up braces Signed-off-by: Sven Strickroth <email@cs-ware.de>
Sven Strickroth c55378fc 2013-01-31T17:43:59 Detect msysgit installation of users without admin rights Signed-off-by: Sven Strickroth <email@cs-ware.de>
Sven Strickroth ec56af08 2013-01-31T17:37:20 Refactored: Move msysgit registry detection to it's own function Signed-off-by: Sven Strickroth <email@cs-ware.de>
Edward Thomson 359fc2d2 2013-01-08T17:07:25 update copyrights
nulltoken bdb94c21 2012-12-17T12:20:52 Fix MSVC compilation warnings
Russell Belfer a8122b5d 2012-11-21T15:39:03 Fix warnings on Win64 build
Ben Straub 54b2a37a 2012-11-20T16:02:25 Clean up config.h
Eduardo Bart cf0dadcf 2012-11-20T01:19:31 Minor optimization in win32 do_lstat
Eduardo Bart 2d96fce2 2012-11-19T23:12:20 update win32 lstat comment
Eduardo Bart 52ead787 2012-11-19T22:30:20 Fix win32 lstat
Russell Belfer cccacac5 2012-11-14T22:41:51 Add POSIX compat lstat() variant for win32 The existing p_lstat implementation on win32 is not quite POSIX compliant when setting errno to ENOTDIR. This adds an option to make is be compliant so that code (such as checkout) that cares to have separate behavior for ENOTDIR can use it portably. This also contains a couple of other minor cleanups in the posix_w32.c implementations to avoid unnecessary work.
Eduardo Bart 345eef23 2012-11-07T16:10:57 Move inet_pton to posix platform-compatibility layer
Philip Kelley b4491b99 2012-10-16T16:18:21 Incremental improvements to pack-objects logic Incorporate feedback for incr. improvements to pack-objects
Philip Kelley 5e4f2b5f 2012-10-16T13:18:45 Support pthread_cond_* on Win32