summaryrefslogtreecommitdiff
path: root/src/win32
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix MSVC amd64 compilation warningsnulltoken2012-09-201-1/+1
|
* Add bounds checking to UTF-8 conversionutf8-winVicent Marti2012-08-285-60/+35
|
* windows: Keep UTF-8 on the stack yoVicent Marti2012-08-285-215/+64
|
* UTF-8 changes yoVicent Martí2012-08-281-0/+92
|
* Merge pull request #778 from ben/cloneVicent Martí2012-08-192-0/+10
|\ | | | | Clone
| * Checkout: obey core.symlinks.Ben Straub2012-07-171-2/+5
| |
| * Merge branch 'development' into cloneBen Straub2012-07-171-1/+1
| |\
| * | Checkout: handle symlinks.Ben Straub2012-07-162-0/+7
| | | | | | | | | Includes unfinished win32 implementation.
* | | win32: set errno to ENOENT or ENOTDIR when appropriate in do_lstatCarlos Martín Nieto2012-08-021-0/+7
| |/ |/|
* | fix below issues on mingw:liyuray2012-06-211-1/+1
|/ | | | | | | | | | | | | 1. compile warning: D:\libgit2.git\src\win32\posix_w32.c: In function 'p_open': D:\libgit2.git\src\win32\posix_w32.c:235:10: warning: 'mode_t' is promoted to 'int' when passed through '...' [enabled by default] D:\libgit2.git\src\win32\posix_w32.c:235:10: note: (so you should pass 'int' not 'mode_t' to 'va_arg') D:\libgit2.git\src\win32\posix_w32.c:235:10: note: if this code is reached, the program will abort 2. test crash. 3. the above two issues are same root cause. please see http://www.eskimo.com/~scs/cclass/int/sx11c.html
* Precompile headers for MSVC.Ben Straub2012-06-132-0/+20
|
* misc: Fix warnings from PVS Studio trialVicent Martí2012-06-071-1/+1
|
* Merge pull request #684 from benstraub/rev-parseVicent Martí2012-06-071-0/+76
|\ | | | | Rev parse
| * Rename posix wrappers with 'p_' prefix.Ben Straub2012-06-062-7/+3
| |
| * Merge branch 'development' into rev-parseBen Straub2012-06-054-221/+11
| |\ | | | | | | | | | | | | | | | Conflicts: src/util.h tests-clar/refs/branches/listall.c
| * | Fix date.c build in msvc.Ben Straub2012-05-152-0/+80
| | | | | | | | | | | | | | | | | | Ported the win32 implementations of gmtime_r, localtime_r, and gettimeofday to be part of the posix compatibility layer, and fixed git_signature_now to use them.
* | | repository: make git_repository_init() value the core.filemode config entrynulltoken2012-06-051-0/+1
| |/ |/|
* | Fix bugs in UTF-8 <-> UTF-16 conversionRussell Belfer2012-05-241-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | The function to convert UTF-16 to UTF-8 was only allocating a buffer of wcslen(utf16str) bytes for the UTF-8 string, but that is not sufficient if you have multibyte characters, and so when those occured, the conversion was failing. This updates the conversion functions to use the Win APIs to calculate the correct buffer lengths. Also fixes a comparison in the unit tests that would fail if you did not have a particular environment variable set.
* | Hook up Windows compat fnmatch() for SolarisScott J. Goldman2012-05-103-208/+1
|/ | | | | | | | Since Solaris does not support some of the same flags as glibc fnmatch(), we just use the implementation we have for Windows. Now that it's no longer a windows-specific thing, I moved it into compat/ instead of win32/
* compat: make p_realpath Windows implementation be a bit more POSIX compliant ↵nulltoken2012-05-081-4/+17
| | | | and fail if the provided path does not lead to an existing entry
* compat: make p_open able to accept optional mode when passing the O_CREAT flagnulltoken2012-05-072-4/+18
| | | | This has the nice side effect of making test_attr_repo__staging_properly_normalizes_line_endings_according_to_gitattributes_directives() test pass again on Windows. This test started to fail after commit 674a198 was applied.
* Merge remote-tracking branch 'scottjg/fix-mingw32' into developmentVicent Martí2012-05-051-0/+1
|\ | | | | | | | | | | | | | | Conflicts: src/netops.c src/netops.h src/transports/http.c tests-clar/clar
| * Fix missing prototype warning in utf-conv.cScott J. Goldman2012-05-051-0/+1
| |
* | Fix warnings on 64-bit windows buildsRussell Belfer2012-04-173-25/+40
| | | | | | | | | | This fixes all the warnings on win64 except those in deps, which come from the regex code.
* | Continue error conversionRussell Belfer2012-03-144-130/+180
| | | | | | | | | | | | | | This converts blob.c, fileops.c, and all of the win32 files. Also, various minor cleanups throughout the code. Plus, in testing the win32 build, I cleaned up a bunch (although not all) of the warnings with the 64-bit build.
* | Resolve comments from pull requestRussell Belfer2012-03-131-2/+1
| | | | | | | | | | | | | | This converts the map validation function into a macro, tweaks the GITERR_OS system error automatic appending, and adds a tentative new error access API and some quick unit tests for both the old and new error APIs.
* | Migrate ODB files to new error handlingRussell Belfer2012-03-122-36/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This migrates odb.c, odb_loose.c, odb_pack.c and pack.c to the new style of error handling. Also got the unix and win32 versions of map.c. There are some minor changes to other files but no others were completely converted. This also contains an update to filebuf so that a zeroed out filebuf will not think that the fd (== 0) is actually open (and inadvertently call close() on fd 0 if cleaned up). Lastly, this was built and tested on win32 and contains a bunch of fixes for the win32 build which was pretty broken.
* | error-handling: RepositoryVicent Martí2012-03-071-10/+5
| | | | | | | | | | | | | | | | This also includes droping `git_buf_lasterror` because it makes no sense in the new system. Note that in most of the places were it has been dropped, the code needs cleanup. I.e. GIT_ENOMEM is going away, so instead it should return a generic `-1` and obviously not throw anything.
* | error-handling: Add new routinesVicent Martí2012-03-031-2/+6
|/ | | | | Obviously all the old throw routines are still in place, so we can gradually port over.
* Clean up GIT_UNUSED macros on all platformsRussell Belfer2012-03-022-9/+9
| | | | | | | | | | | | | | | | | | | It turns out that commit 31e9cfc4cbcaf1b38cdd3dbe3282a8f57e5366a5 did not fix the GIT_USUSED behavior on all platforms. This commit walks through and really cleans things up more thoroughly, getting rid of the unnecessary stuff. To remove the use of some GIT_UNUSED, I ended up adding a couple of new iterators for hashtables that allow you to iterator just over keys or just over values. In making this change, I found a bug in the clar tests (where we were doing *count++ but meant to do (*count)++ to increment the value). I fixed that but then found the test failing because it was not really using an empty repo. So, I took some of the code that I wrote for iterator testing and moved it to clar_helpers.c, then made use of that to make it easier to open fixtures on a per test basis even within a single test file.
* Update diff to use iteratorsRussell Belfer2012-03-022-6/+12
| | | | | | | | | | | | | This is a major reorganization of the diff code. This changes the diff functions to use the iterators for traversing the content. This allowed a lot of code to be simplified. Also, this moved the functions relating to outputting a diff into a new file (diff_output.c). This includes a number of other changes - adding utility functions, extending iterators, etc. plus more tests for the diff code. This also takes the example diff.c program much further in terms of emulating git-diff command line options.
* Simplify GIT_UNUSED macrosRussell Belfer2012-03-021-3/+3
| | | | | | | Since casting to void works to eliminate errors with unused parameters on all platforms, avoid the various special cases. Over time, it will make sense to eliminate the GIT_UNUSED macro completely and just have GIT_UNUSED_ARG.
* Fix readdir usage across platformsRussell Belfer2012-02-232-11/+26
| | | | | | This fixes the missing readdir_r from win32 and fixes other platforms to always use the reentrant readdir_r form for reading directory contents.
* Update Copyright headerschu2012-02-1314-14/+14
| | | | Signed-off-by: schu <schu-github@schulog.org>
* msvc: Move `ssize_t` typedef to MSVC-onlyVicent Martí2012-01-261-0/+3
| | | | This is a MSVC-only issue. All other compilers we support work properly.
* Move path related functions from fileops to pathRussell Belfer2012-01-171-0/+39
| | | | | | | | | | | This takes all of the functions that look up simple data about paths (such as `git_futils_isdir`) and moves them over to path.h (becoming `git_path_isdir`). This leaves fileops.h just with functions that actually manipulate the filesystem or look at the file contents in some way. As part of this, the dir.h header which is really just for win32 support was moved into win32 (with some minor changes).
* Fix MSVC compilation warningnulltoken2012-01-171-1/+1
|
* Windows: store all 64 bits of the size in the stat structureCarlos Martín Nieto2012-01-161-1/+1
| | | | | We force stat to be a stat64 structure, so we can and should put all 64 bits of the size in st_size.
* Add missing semicolonVincent Lee2012-01-031-1/+1
|
* Add support for macros and cache flush API.Russell Belfer2011-12-292-0/+6
| | | | | | | | | | | | | | Add support for git attribute macro definitions. Also, add support for cache flush API to clear the attribute file content cache when needed. Additionally, improved the handling of global and system files, making common utility functions in fileops and converting config and attr to both use the common functions. Adds a bunch more tests and fixed some memory leaks. Note that adding macros required me to use refcounted attribute assignment definitions, which complicated, but probably improved memory usage.
* posix_w32: prevent segfaulting on Windows when building a temporary filenamenulltoken2011-12-141-1/+1
|
* Use git_buf for path storage instead of stack-based buffersRussell Belfer2011-12-071-15/+20
| | | | | | | | | | | | | | | | | | | | This converts virtually all of the places that allocate GIT_PATH_MAX buffers on the stack for manipulating paths to use git_buf objects instead. The patch is pretty careful not to touch the public API for libgit2, so there are a few places that still use GIT_PATH_MAX. This extends and changes some details of the git_buf implementation to add a couple of extra functions and to make error handling easier. This includes serious alterations to all the path.c functions, and several of the fileops.c ones, too. Also, there are a number of new functions that parallel existing ones except that use a git_buf instead of a stack-based buffer (such as git_config_find_global_r that exists alongsize git_config_find_global). This also modifies the win32 version of p_realpath to allocate whatever buffer size is needed to accommodate the realpath instead of hardcoding a GIT_PATH_MAX limit, but that change needs to be tested still.
* Implement p_renameCarlos Martín Nieto2011-11-072-0/+15
| | | | | | Move the callers of git_futils_mv_atomic to use p_rename. Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Merge pull request #456 from brodie/perm-fixesVicent Martí2011-10-282-8/+8
|\ | | | | Create objects, indexes, and directories with the right file permissions
| * fileops/posix: replace usage of "int mode" with "mode_t mode"Brodie Rao2011-10-142-8/+8
| | | | | | | | | | Note: Functions exported from fileops take const mode_t, while the underlying POSIX wrappers take mode_t.
* | global: Properly use `git__` memory wrappersVicent Marti2011-10-284-32/+32
| | | | | | | | | | Ensure that all memory related functions (malloc, calloc, strdup, free, etc) are using their respective `git__` wrappers.
* | windows: Add support for non-UTF codepagesVicent Marti2011-10-265-27/+48
|/ | | | | | | | | | | | | | | | Our previous assumption that all paths in Windows are encoded in UTF-8 is rather weak, specially when considering that Git is encoding-agnostic. These set of functions allow the user to change the library's active codepage globally, so it is possible to access paths and files on all international versions of Windows. Note that the default encoding here is UTF-8 because we assume that 99% of all Git repositories will be in UTF-8. Also, if you use non-ascii characters in paths, anywhere, please burn on a fire.
* include version information in git2.dll on WindowsSven Strickroth2011-10-091-0/+42
| | | | Signed-off-by: Sven Strickroth <email@cs-ware.de>
* msvc: Properly handle inttypes.h/stdint.hVicent Marti2011-10-052-38/+15
|
* mingw: Fix compilation warningsVicent Marti2011-09-291-0/+7
|