summaryrefslogtreecommitdiff
path: root/src/unix
Commit message (Collapse)AuthorAgeFilesLines
...
* | Update diff to use iteratorsRussell Belfer2012-03-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Fix readdir usage across platformsRussell Belfer2012-02-231-0/+1
| | | | | | | | | | | | 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-132-2/+2
| | | | | | | | Signed-off-by: schu <schu-github@schulog.org>
* | Create cross-platform setenvPaul Betts2011-09-191-0/+1
| |
* | Cleanup legal dataVicent Marti2011-09-192-0/+12
| | | | | | | | | | | | | | | | | | | | 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
| |
* | unix/posix.h: remove redundant includeschu2011-08-171-1/+0
| | | | | | | | Signed-off-by: schu <schu-github@schulog.org>
* | posix: Portable `vsnprintf`Vicent Marti2011-07-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Use native on Unix, emulate on Win32Vicent Marti2011-07-061-0/+2
| |
* | fileops: Drop `git_fileops_prettify_path`Vicent Marti2011-07-051-1/+1
| | | | | | | | | | | | | | | | | | | | 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-052-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-031-0/+64
| |
* | build: Simplify build structureVicent Marti2011-07-011-61/+0
|/ | | | This will make libgit2 more suitable for embedding.
* unix/map.c: Move to new error handling mechanismJakob Pfender2011-05-231-5/+5
|
* Revised platform types to use 'best supported' size.Alex Budovski2011-01-111-1/+1
| | | | | This will allow graceful migration to 64 bit file sizes and timestamps should git's binary interface be extended to allow this.
* Remove git_errnoVicent Marti2010-12-231-1/+1
| | | | | | | | | It was not being used by any methods (only by malloc and calloc), and since it needs to be TLS, it cannot be exported on DLLs on Windows. Burn it with fire. The API always returns error codes! Signed-off-by: Vicent Marti <tanoku@gmail.com>
* win32: Add routines to abstract memory-mapped file functionsRamsay Jones2009-03-201-0/+61
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>