summaryrefslogtreecommitdiff
path: root/src/win32/w32_util.h
Commit message (Collapse)AuthorAgeFilesLines
* internal: use off64_t instead of git_off_tethomson/off_tEdward Thomson2019-11-251-1/+1
| | | | Prefer `off64_t` internally.
* win32: stop inlining file_attribute_to_statEdward Thomson2019-06-241-31/+5
| | | | | | Move `git_win32__file_attribute_to_stat` to a regular function instead of an inlined function. This helps avoid header ordering issues and declarations.
* git_error: use new names in internal APIs and usageEdward Thomson2019-01-221-1/+1
| | | | | Move to the `git_error` name in the internal API for error-related functions.
* win32: rename `git_win32__canonicalize_path`Edward Thomson2018-10-191-18/+0
| | | | | | | | | | | The internal API `git_win32__canonicalize_path` is far, far too easily confused with the internal API `git_win32_path_canonicalize`. The former removes the namespace prefix from a path (eg, given `\\?\C:\Temp\foo`, it returns `C:\Temp\foo`, and given `\\?\UNC\server\share`, it returns `\\server\share`). As such, rename it to `git_win32_path_remove_namespace`. `git_win32_path_canonicalize` remains unchanged.
* consistent header guardsethomson/header_guardsEdward Thomson2018-02-011-2/+2
| | | | use consistent names for the #include / #define header guard pattern.
* Make sure to always include "common.h" firstPatrick Steinhardt2017-07-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | Next to including several files, our "common.h" header also declares various macros which are then used throughout the project. As such, we have to make sure to always include this file first in all implementation files. Otherwise, we might encounter problems or even silent behavioural differences due to macros or defines not being defined as they should be. So in fact, our header and implementation files should make sure to always include "common.h" first. This commit does so by establishing a common include pattern. Header files inside of "src" will now always include "common.h" as its first other file, separated by a newline from all the other includes to make it stand out as special. There are two cases for the implementation files. If they do have a matching header file, they will always include this one first, leading to "common.h" being transitively included as first file. If they do not have a matching header file, they instead include "common.h" as first file themselves. This fixes the outlined problems and will become our standard practice for header and source files inside of the "src/" from now on.
* giterr_set: consistent error messagesEdward Thomson2016-12-291-1/+1
| | | | | | | | Error messages should be sentence fragments, and therefore: 1. Should not begin with a capital letter, 2. Should not conclude with punctuation, and 3. Should not end a sentence and begin a new one
* Properly pass `wchar *` type to giterr_setBoris Barbulovski2016-12-061-1/+1
|
* Properly pass `wchar *` type to giterr_setBoris Barbulovski2016-11-201-1/+1
|
* fstat: use our custom `stat`Edward Thomson2016-02-161-10/+43
|
* win32: introduce p_timeval that isn't stupidEdward Thomson2016-02-121-1/+1
| | | | | Windows defines `timeval` with `long`, which we cannot sanely cope with. Instead, use a custom timeval struct.
* win32: define our own POSIX struct stat, and support USE_NSECAxel Rasmussen2015-09-181-8/+14
|
* win32: ensure hidden files can be stagedEdward Thomson2015-08-031-3/+13
|
* Introduce p_utimes and p_futimesEdward Thomson2015-06-161-0/+10
| | | | | | 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-0/+72
|
* 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:\)
* React to feedback for UTF-8 <-> WCHAR and reparse workPhilip Kelley2014-04-231-1/+1
|
* Handle win32 reparse points properlyEdward Thomson2014-04-221-0/+23
|
* Win32: UTF-8 <-> WCHAR conversion overhaulPhilip Kelley2014-04-191-0/+31