summaryrefslogtreecommitdiff
path: root/src/win32/posix.h
Commit message (Collapse)AuthorAgeFilesLines
* Make sure we use the `C` locale for `regcomp` on macOS.Arthur Schreiber2016-10-061-0/+3
|
* fstat: use our custom `stat`Edward Thomson2016-02-161-2/+3
|
* win32: introduce p_timeval that isn't stupidEdward Thomson2016-02-121-2/+3
| | | | | Windows defines `timeval` with `long`, which we cannot sanely cope with. Instead, use a custom timeval struct.
* Introduce p_utimes and p_futimesEdward Thomson2015-06-161-0/+3
| | | | | | Provide functionality to set the time on a filesystem entry, using utimes or futimes on POSIX type systems or SetFileTime on Win32.
* win32: abstract file attributes -> struct stat fnEdward Thomson2015-04-281-8/+0
|
* Improvements to status performance on Windows.J Wyman2015-04-281-2/+10
| | | | Changed win32/path_w32.c to utilize NTFS' FindFirst..FindNext data instead of doing an lstat per file. Avoiding unnecessary directory opens and file scans reduces IO, improving overall performance. Effect is magnified due to NTFS being a kernel mode file system (as opposed to user mode).
* Move definitions of strcasecmp and strncasecmp to msvc-compat.hTony Kelman2015-03-061-2/+0
| | | | should cut down on compiler warnings with mingw
* Fix p_ftruncate to handle big files for git_cloneJeff Hostetler2015-03-031-1/+1
|
* win32: use NT-prefixed "\\?\" pathsEdward Thomson2014-12-161-0/+1
| | | | | | | | | | | | When turning UTF-8 paths into UCS-2 paths for Windows, always use the \\?\-prefixed paths. Because this bypasses the system's path canonicalization, handle the canonicalization functions ourselves. We must: 1. always use a backslash as a directory separator 2. only use a single backslash between directories 3. not rely on the system to translate "." and ".." in paths 4. remove trailing backslashes, except at the drive root (C:\)
* Introduce some consistency in definition/declaration orderingJacques Germishuys2014-08-051-13/+14
|
* Cleanup portability/compatibility layerJacques Germishuys2014-08-051-24/+12
| | | | | | | * 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)
* Secure CRT is only available from Visual Studio 2005+Jacques Germishuys2014-07-061-1/+1
|
* indexer: mmap fixes for Windowscmn/indexer-mmapCarlos Martín Nieto2014-05-171-0/+6
| | | | | | | | | | | 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
* Handle win32 reparse points properlyEdward Thomson2014-04-221-1/+1
|
* Win32: UTF-8 <-> WCHAR conversion overhaulPhilip Kelley2014-04-191-10/+1
|
* Fix p_inet_pton on windowsEdward Thomson2013-08-191-0/+7
| | | | | | 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.
* Rename git__win32_path fns to git_win32_pathRussell Belfer2013-08-131-1/+1
|
* windows: Fuck meVicent Marti2013-08-131-0/+1
|
* windows: Require orderVicent Marti2013-08-131-0/+1
|
* windows: Missing renames.Vicent Marti2013-08-131-2/+2
|
* Discriminate path-specific and general UTF-X conversionsBen Straub2013-08-081-1/+1
|
* Rename git_win_str_utf* to git_win32_path_utf*Ben Straub2013-08-071-1/+1
|
* Add typedefs for win32 utf-8 and utf-16 buffersBen Straub2013-08-071-2/+2
| | | | ...and normalize the signatures of the two conversion functions.
* Split UTF-16 and UTF-8 buffer sizes for win32Ben Straub2013-08-051-2/+2
| | | | | Also fixed up call-sites to use the correct buffer sizes, especially when converting to utf-8.
* update copyrightsEdward Thomson2013-01-081-1/+1
|
* Add POSIX compat lstat() variant for win32Russell Belfer2012-11-141-0/+8
| | | | | | | | | | 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.
* Move inet_pton to posix platform-compatibility layerEduardo Bart2012-11-071-0/+1
|
* Always use internal fnmatch, not systemRussell Belfer2012-10-151-1/+0
|
* Add bounds checking to UTF-8 conversionutf8-winVicent Marti2012-08-281-1/+1
|
* windows: Keep UTF-8 on the stack yoVicent Marti2012-08-281-6/+3
|
* Checkout: handle symlinks.Ben Straub2012-07-161-0/+1
| | | Includes unfinished win32 implementation.
* Hook up Windows compat fnmatch() for SolarisScott J. Goldman2012-05-101-1/+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_open able to accept optional mode when passing the O_CREAT flagnulltoken2012-05-071-1/+1
| | | | 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.
* Fix warnings on 64-bit windows buildsRussell Belfer2012-04-171-0/+2
| | | | | This fixes all the warnings on win64 except those in deps, which come from the regex code.
* Clean up GIT_UNUSED macros on all platformsRussell Belfer2012-03-021-5/+5
| | | | | | | | | | | | | | | | | | | 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.
* 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.
* Update Copyright headerschu2012-02-131-1/+1
| | | | Signed-off-by: schu <schu-github@schulog.org>
* Implement p_renameCarlos Martín Nieto2011-11-071-0/+1
| | | | | | 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-281-4/+4
|\ | | | | Create objects, indexes, and directories with the right file permissions
| * fileops/posix: replace usage of "int mode" with "mode_t mode"Brodie Rao2011-10-141-4/+4
| | | | | | | | | | 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-281-1/+1
| | | | | | | | | | 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-261-2/+2
|/ | | | | | | | | | | | | | | | 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.
* msvc: Properly handle inttypes.h/stdint.hVicent Marti2011-10-051-3/+0
|
* mingw: Fix compilation warningsVicent Marti2011-09-291-0/+7
|
* Implment p_access and use it in git_fileutils_existsCarlos Martín Nieto2011-09-231-1/+1
| | | | Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
* Rewrite p_* functions to use Unicode and marshal to UTF8 internallyPaul Betts2011-09-191-1/+12
|
* Create cross-platform setenvPaul Betts2011-09-191-0/+1
|
* Cleanup legal dataVicent Marti2011-09-191-0/+6
| | | | | | | | | | 1. The license header is technically not valid if it doesn't have a copyright signature. 2. The COPYING file has been updated with the different licenses used in the project. 3. The full GPLv2 header in each file annoys me.
* compat: Move `mkstemp` to the POSIX compat layerVicent Marti2011-08-301-0/+1
|
* posix: Properly handle `snprintf` in all platformsVicent Marti2011-08-181-0/+1
|