git-commit-vandalism/compat
Johannes Sixt 632f701787 compat/mingw.c: Teach mingw_rename() to replace read-only files
On POSIX, rename() can replace files that are not writable. On Windows,
however, read-only files cannot be replaced without additional efforts:
We have to make the destination writable first.

Since the situations where the destination is read-only are rare, we do not
make the destination writable on every invocation, but only if the first
try to rename a file failed with an "access denied" error.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-11-23 19:26:42 -08:00
..
fnmatch Use compatibility regex library for OSX/Darwin 2008-09-10 13:36:40 -07:00
regex Use compatibility regex library for OSX/Darwin 2008-09-10 13:36:40 -07:00
fopen.c compat/fopen.c: avoid clobbering the system defined fopen macro 2008-05-08 17:43:01 -07:00
hstrerror.c Add a local implementation of hstrerror for the system which do not have it 2007-06-15 22:48:34 -07:00
inet_ntop.c Remove a couple of duplicated include 2007-11-05 20:50:38 -08:00
inet_pton.c Remove a couple of duplicated include 2007-11-05 20:50:38 -08:00
memmem.c add memmem() 2007-09-06 22:46:00 -07:00
mingw.c compat/mingw.c: Teach mingw_rename() to replace read-only files 2008-11-23 19:26:42 -08:00
mingw.h Modify mingw_main() workaround to avoid link errors 2008-08-03 14:18:23 -07:00
mkdtemp.c Define compat version of mkdtemp for systems lacking it 2007-10-20 22:52:21 -04:00
mmap.c
pread.c
qsort.c compat: Add simplified merge sort implementation from glibc 2008-02-06 22:35:28 -08:00
setenv.c
snprintf.c compat/snprintf.c: handle snprintf's that always return the # chars transmitted 2008-08-21 01:53:44 -07:00
strcasestr.c
strlcpy.c
strtoumax.c
unsetenv.c
winansi.c Add ANSI control code emulation for the Windows console 2008-07-19 11:17:43 -07:00