Skip to content

Commit

Permalink
Brown paper bag fix for MinGW 64-bit stat
Browse files Browse the repository at this point in the history
When overriding the identifier "stat" so that "struct stat" will be
substituted with "struct _stati64" everywhere, I tried to fix the calls
to the _function_ stat(), too, but I forgot to change the earlier
attempt "stat64" to "_stati64" there.

So, the stat() calls were overridden by calls to _stati64() instead.

Unfortunately, there is a function _stati64() so that I missed that
calls to stat() were not actually overridden by calls to mingw_lstat(),
but t4200-rerere.sh showed the error.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Mar 7, 2009
1 parent d0baf91 commit d5e3123
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compat/mingw.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ int mingw_lstat(const char *file_name, struct stat *buf);
int mingw_fstat(int fd, struct stat *buf);
#define fstat mingw_fstat
#define lstat mingw_lstat
#define stat64(x,y) mingw_lstat(x,y)
#define _stati64(x,y) mingw_lstat(x,y)

int mingw_utime(const char *file_name, const struct utimbuf *times);
#define utime mingw_utime
Expand Down

0 comments on commit d5e3123

Please sign in to comment.