зеркало из https://github.com/microsoft/git.git
b6f714f89a
In particular, the following warning is issued while compiling compat/msvc.c: ...mingw.c(223) : warning C4133: 'function' : incompatible \ types - from '_stati64 *' to '_stat64 *' which relates to a call of _fstati64() in the mingw_fstat() function definition. This is caused by various layers of macro magic and attempts to avoid macro redefinition compiler warnings. For example, the call to _fstati64() mentioned above is actually a call to _fstat64(), and expects a pointer to a struct _stat64 rather than the struct _stati64 which is passed to mingw_fstat(). The definition of struct _stati64 given in compat/msvc.h had the same "shape" as the definition of struct _stat64, so the call to _fstat64() does not actually cause any runtime errors, but the structure types are indeed incompatible. In order to avoid the compiler warning, we add declarations for the mingw_lstat() and mingw_fstat() functions and supporting macros to msvc.h, suppressing the corresponding declarations in mingw.h, so that we can use the appropriate structure type (and function) names from the msvc headers. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com> |
||
---|---|---|
.. | ||
fnmatch | ||
nedmalloc | ||
regex | ||
vcbuild | ||
basename.c | ||
bswap.h | ||
cygwin.c | ||
cygwin.h | ||
fopen.c | ||
hstrerror.c | ||
inet_ntop.c | ||
inet_pton.c | ||
memmem.c | ||
mingw.c | ||
mingw.h | ||
mkdtemp.c | ||
mkstemps.c | ||
mmap.c | ||
msvc.c | ||
msvc.h | ||
pread.c | ||
qsort.c | ||
setenv.c | ||
snprintf.c | ||
strcasestr.c | ||
strlcpy.c | ||
strtoumax.c | ||
unsetenv.c | ||
win32.h | ||
win32mmap.c | ||
winansi.c |