summaryrefslogtreecommitdiff
path: root/src/win32
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit 'refs/pull/2366/head' of github.com:libgit2/libgit2Carlos Martín Nieto2014-10-271-2/+3
|\
| * Fix compiler warning (git_off_t cast to size_t).Albert Meltzer2014-05-191-2/+3
| | | | | | | | | | | | Use size_t for page size, instead of long. Check result of sysconf. Use size_t for page offset so no cast to size_t (second arg to p_mmap). Use mod instead div/mult pair, so no cast to size_t is necessary.
* | p_lstat win32: don't canonicalize volume mountsEdward Thomson2014-10-131-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | A reparse point that is an IO_REPARSE_TAG_MOUNT_POINT could be a junction or an actual filesystem mount point. (Who knew?) If it's the latter, its reparse point will report the actual volume information \??\Volume{GUID}\ and we should not attempt to dereference that further, instead readlink should report EINVAL since it's not a symlink / junction and its original path was canonical. Yes, really.
* | Introduce some consistency in definition/declaration orderingJacques Germishuys2014-08-051-13/+14
| |
* | Consistently use p_snprintfJacques Germishuys2014-08-052-10/+11
| |
* | Cleanup portability/compatibility layerJacques Germishuys2014-08-054-61/+37
| | | | | | | | | | | | | | * Removes mingw-compat.h * Cleans up separation of compiler/platform idiosyncrasies * Unifies mingw/msvc stat structures and functions * (Tries to) hide more compiler specific implementation details (even in our internal API)
* | Define IO_REPARSE_TAG_SYMLINK if its not defined by WinNT.hJacques Germishuys2014-07-061-0/+4
| |
* | Secure CRT is only available from Visual Studio 2005+Jacques Germishuys2014-07-062-3/+3
| |
* | Variadic macros is only available from Visual Studio 2005+Jacques Germishuys2014-07-061-1/+1
| |
* | _stat64 is a function, __stat64 is the structureJacques Germishuys2014-07-061-1/+1
| |
* | Merge remote-tracking branch 'upstream/cmn/filebuf-atomic-unlock'Carlos Martín Nieto2014-06-231-2/+28
|\ \
| * | filebuf: make unlocking atomiccmn/filebuf-atomic-unlockCarlos Martín Nieto2014-06-041-2/+28
| |/ | | | | | | | | | | | | | | | | | | | | | | When renaming a lock file to its final location, we need to make sure that it is replaced atomically. We currently have a workaround for Windows by removing the target file. This means that the target file, which may be a ref or a packfile, may cease to exist for a short wile, which shold be avoided. Implement the workaround only in Windows, by making sure that the file we want to replace is writable.
* | React to review feedbackPhilip Kelley2014-06-072-5/+18
| |
* | Win32: Fix object::cache::threadmania test on x64Philip Kelley2014-06-072-55/+74
|/
* Merge pull request #2303 from jacquesg/mingw-lseekVicent Marti2014-05-191-0/+1
|\ | | | | WIP: Windows fixes
| * Undef lseek firstJacques Germishuys2014-05-011-0/+1
| |
* | indexer: mmap fixes for Windowscmn/indexer-mmapCarlos Martín Nieto2014-05-172-1/+7
| | | | | | | | | | | | | | | | | | | | | | 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
* | indexer: use mmap for writingCarlos Martín Nieto2014-05-171-0/+5
| | | | | | | | | | | | 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.
* | Win32: Supply _O_NOINHERIT when calling _wopenPhilip Kelley2014-05-161-2/+11
|/
* React to feedback for UTF-8 <-> WCHAR and reparse workPhilip Kelley2014-04-236-37/+24
|
* Handle win32 reparse points properlyEdward Thomson2014-04-225-132/+353
|
* Win32: UTF-8 <-> WCHAR conversion overhaulPhilip Kelley2014-04-1912-296/+552
|
* Retry renaming files on Access Denied errorsJan Melcher2014-03-271-1/+22
| | | | | | | | | | | | | 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
* Remove unused utf8 -> utf16 conversion codeEdward Thomson2014-02-051-62/+0
|
* Test cancel from indexer progress callbackRussell Belfer2013-12-111-1/+2
| | | | | | | | | | | | | | | 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.
* Clean up warningsEdward Thomson2013-12-091-3/+4
|
* posix: Solaris doesn't have strnlen eitherAlessandro Ghedini2013-11-271-5/+0
|
* More filemode cleanups for FAT on MacOSRussell Belfer2013-10-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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.
* Merge pull request #1858 from linquize/win32-template-dirVicent Martí2013-09-172-11/+11
|\ | | | | Configurable template dir for Win32
| * Refactor git_win32__find_system_dirs() to extract "etc\\" as subpath parameterLinquize2013-09-172-11/+11
| |
* | Bug fixes and cleanupsRussell Belfer2013-09-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Add simple global shutdown hooksRussell Belfer2013-09-172-10/+9
|/ | | | | | | | | | 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.
* Fix failure in win32_find_git_in_registry() when UAC is turned onLinquize2013-09-171-1/+1
| | | | | Demand read only access to registry key instead of full access. This might happen in Windows Vista and later.
* Fix failure in win32_find_git_in_registry()Linquize2013-09-171-1/+1
| | | | The buffer size 0 was definitely not enough so it failed
* Fix warning in src/win32/version.hLinquize2013-09-051-1/+1
|
* Merge pull request #1805 from libgit2/threading-packed-loadVicent Martí2013-08-282-8/+141
|\ | | | | Thread safety for the refdb_fs
| * Convert to our own SRWLOCK type on Win32Russell Belfer2013-08-273-4/+4
| |
| * Fix MINGW SRWLock typedefsRussell Belfer2013-08-262-2/+2
| |
| * Load SRWLock APIs at runtimeRussell Belfer2013-08-262-11/+92
| | | | | | | | | | | | 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.
| * Trying to fix Win32 warningsRussell Belfer2013-08-221-5/+7
| |
| * Add SRWLock implementation of rwlocks for Win32Russell Belfer2013-08-222-1/+51
| |
* | Improve win32 version check, no ipv6 tests on XPEdward Thomson2013-08-272-5/+22
|/
* Quiet down some warningsEdward Thomson2013-08-191-1/+1
|
* Fix p_inet_pton on windowsEdward Thomson2013-08-192-32/+35
| | | | | | 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.
* Use time(2) to get the timeEdward Thomson2013-08-191-50/+0
| | | | | | We didn't use the added precision in gettimeofday, so remove it. This prevents us from having an unnecessary reimplementation on win32.
* Give credit to PHP for the p_readlink function in posix_w32.cMartin Woodward2013-08-161-0/+9
|
* Merge pull request #1779 from ben/win32-precompiled-header-speedupBen Straub2013-08-131-0/+3
|\ | | | | Speed up build under MSVC
| * Add some things to precompiled headerBen Straub2013-08-131-0/+3
| |
* | Merge pull request #1767 from libgit2/win32-bigger-utf8-bufferVicent Martí2013-08-137-78/+94
|\ \ | |/ |/| Bigger buffer for utf-8 parsing in win32
| * Missed one path for path_as_utf8 typeRussell Belfer2013-08-131-1/+1
| |