summaryrefslogtreecommitdiff
path: root/src/win32
Commit message (Collapse)AuthorAgeFilesLines
* Fix opendir/readdir and friends on Win32 to use Unicodeutf8-paths-win32Paul Betts2011-09-191-5/+14
|
* Rewrite p_* functions to use Unicode and marshal to UTF8 internallyPaul Betts2011-09-195-31/+245
|
* Create cross-platform setenvPaul Betts2011-09-192-0/+9
|
* Tabify everythingVicent Marti2011-09-198-203/+203
| | | | | | There were quite a few places were spaces were being used instead of tabs. Try to catch them all. This should hopefully not break anything. Except for `git blame`. Oh well.
* Cleanup legal dataVicent Marti2011-09-1910-98/+48
| | | | | | | | | | 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.
* Fix compilation in MinGWVicent Marti2011-08-311-7/+4
|
* posix: Fix undeclared prototypeVicent Marti2011-08-301-0/+2
|
* compat: Move `mkstemp` to the POSIX compat layerVicent Marti2011-08-302-0/+18
|
* posix: Properly handle `snprintf` in all platformsVicent Marti2011-08-182-0/+13
|
* win32: replace usage of _MSV_VER with _MSC_VERnulltoken2011-07-091-1/+1
|
* posix: Portable `vsnprintf`Vicent Marti2011-07-092-0/+10
| | | | | | | | | | | | | | | Our good, lovely folks at Microsoft decided that there was no good reason to make `vsnprintf` compilant with the C standard, so that function in Windows returns -1 on overflow, instead of returning the actual byte count needed to write the full string. We now handle this situation more gracefully with the POSIX compatibility layer, by returning the needed byte size using an auxiliary method instead of blindly resizing the target buffer until it fits. This means we can now support `printf`s of any size by allocating a temporary buffer. That's good.
* fnmatch: Fix compilation under WindowsVicent Marti2011-07-061-2/+2
|
* fnmatch: Use native on Unix, emulate on Win32Vicent Marti2011-07-063-0/+254
|
* fileops: Fix stat() on directories for W32Vicent Marti2011-07-052-6/+15
| | | | | | | | The `stat` methods were having issues when called with a trailing slash in Windows platforms. We now use GetFileAttributes() where possible, which doesn't have this restriction.
* fileops: Drop `git_fileops_prettify_path`Vicent Marti2011-07-052-0/+12
| | | | | | | | | | The old `git_fileops_prettify_path` has been replaced with `git_path_prettify`. This is a much simpler method that uses the OS's `realpath` call to obtain the full path for directories and resolve symlinks. The `realpath` syscall is the original POSIX call in Unix system and an emulated version under Windows using the Windows API.
* fileops: CleanupVicent Marti2011-07-054-43/+218
| | | | | | | | | | | | | | | | Cleaned up the structure of the whole OS-abstraction layer. fileops.c now contains a set of utility methods for file management used by the library. These are abstractions on top of the original POSIX calls. There's a new file called `posix.c` that contains emulations/reimplementations of all the POSIX calls the library uses. These are prefixed with `p_`. There's a specific posix file for each platform (win32 and unix). All the path-related methods have been moved from `utils.c` to `path.c` and have their own prefix.
* build: Move OS-specific compat to their own foldersVicent Marti2011-07-032-0/+70
|
* win32/pthread.c: Move to new error handling mechanismJakob Pfender2011-05-231-1/+1
|
* win32/map.c: Move to new error handling mechanismJakob Pfender2011-05-231-10/+10
|
* Fix bug in the way pthead_mutex_t was being destroyed in win32.kelly.leahy2011-05-081-4/+3
| | | | | | | Win32 critical section objects (CRITICAL_SECTION) are not kernel objects. Only kernel objects are destroyed by using CloseHandle. Critical sections are supposed to be deleted with the DeleteCriticalSection API (http://msdn.microsoft.com/en-us/library/ms682552(VS.85).aspx).
* Thread safe cacheVicent Marti2011-03-202-50/+9
|
* Add proper threading support to libgit2Vicent Marti2011-03-152-0/+187
| | | | | | | We now depend on libpthread on all Unix platforms (should be installed by default) and use a simple wrapper for Windows threads under Win32. Signed-off-by: Vicent Marti <tanoku@gmail.com>
* Revised platform types to use 'best supported' size.Alex Budovski2011-01-111-4/+4
| | | | | This will allow graceful migration to 64 bit file sizes and timestamps should git's binary interface be extended to allow this.
* win32: Add a 'git__' prefix to the directory reading routinesRamsay Jones2010-01-201-5/+6
| | | | | | | | This reduces the global namespace pollution and allows for a win32 compiler (eg. Open Watcom) to provide these routines in a header other than <dirent.h> (eg in <io.h>). Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* win32: Use an 64-bit file offset typeRamsay Jones2010-01-201-2/+2
| | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* win32: Add an fsync() implementation for windowsRamsay Jones2009-06-151-0/+24
| | | | | | | | | | | | | | | | | | For information on FlushFileBuffers(), see the msdn document at msdn.microsoft.com/en-us/library/aa364439(VS.85).aspx Note that Windows 2000 is shown as the minimum windows version to support FlushFileBuffers(), so if we wish to support Win9X and NT4, we will need to add code to dynamically check if kernel32.dll contains the function. The only error return mentioned in the msdn document is ERROR_INVALID_HANDLE, which is returned if the file/device (eg console) is not buffered. The fsync(2) manpage says that EINVAL is returned in errno, if "fd is bound to a special file which does not support synchronization". Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
* Fix some "signed/unsigned mismatch" (msvc) compiler warningsRamsay Jones2009-06-051-1/+1
| | | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Andreas Ericsson <ae@op5.se>
* win32: Add some file operation stubs and wrapper functionsRamsay Jones2009-06-051-0/+17
| | | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Andreas Ericsson <ae@op5.se>
* win32: Add <dirent.h> directory reading routinesRamsay Jones2009-03-201-0/+97
| | | | | Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* win32: Add routines to abstract memory-mapped file functionsRamsay Jones2009-03-201-0/+125
In particular, the git__mmap() and git__munmap() routines provide the interface to platform specific memory-mapped file facilities. We provide implementations for unix and win32, which can be found in their own sub-directories. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>