* [PATCH] Brown paper bag fix for MinGW 64-bit stat [not found] <cover.1236436185u.git.johannes.schindelin@gmx.de> @ 2009-03-07 14:37 ` Johannes Schindelin 2009-03-07 19:46 ` Johannes Sixt 2009-03-07 20:00 ` Junio C Hamano 0 siblings, 2 replies; 4+ messages in thread From: Johannes Schindelin @ 2009-03-07 14:37 UTC (permalink / raw) To: git, gitster; +Cc: Johannes Sixt 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> --- Aaargh. I am very, very sorry. Actually, it was quite funny that t4200 displayed the bug; I _guess_ it was due to a time zone issue, as the times were exactly one hour off (and the machine I tested on is at UTC+0100 right now). And due to that bug, "rerere gc" would not collect the garbage. So even if the C runtime provides a _stati64() function that pretends to work, it does not, and this patch is absolutely necessary. Now, if only the tests would not take ages to run on Windows... then I would not be tempted to skip them when sending the next patches. compat/mingw.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/compat/mingw.h b/compat/mingw.h index 92fb310..a0b74fb 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -169,7 +169,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 -- 1.6.2.327.g0fa6c ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Brown paper bag fix for MinGW 64-bit stat 2009-03-07 14:37 ` [PATCH] Brown paper bag fix for MinGW 64-bit stat Johannes Schindelin @ 2009-03-07 19:46 ` Johannes Sixt 2009-03-07 20:00 ` Junio C Hamano 1 sibling, 0 replies; 4+ messages in thread From: Johannes Sixt @ 2009-03-07 19:46 UTC (permalink / raw) To: Johannes Schindelin; +Cc: git, gitster On Samstag, 7. März 2009, Johannes Schindelin wrote: > Actually, it was quite funny that t4200 displayed the bug; I > _guess_ it was due to a time zone issue, as the times were exactly > one hour off (and the machine I tested on is at UTC+0100 right now). > > And due to that bug, "rerere gc" would not collect the garbage. U-oh, you are right! I was 100% sure that I ran the test-suite suite with your earlier patch and it was all OK before I gave my ACK. But appearently I did something wrong because today I see the failure in t4200, too, and this fixes it, and it is the right thing to do. > -#define stat64(x,y) mingw_lstat(x,y) > +#define _stati64(x,y) mingw_lstat(x,y) Acked-by: Johannes Sixt <j6t@kdbg.org> -- Hannes ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Brown paper bag fix for MinGW 64-bit stat 2009-03-07 14:37 ` [PATCH] Brown paper bag fix for MinGW 64-bit stat Johannes Schindelin 2009-03-07 19:46 ` Johannes Sixt @ 2009-03-07 20:00 ` Junio C Hamano 2009-03-07 21:02 ` Johannes Schindelin 1 sibling, 1 reply; 4+ messages in thread From: Junio C Hamano @ 2009-03-07 20:00 UTC (permalink / raw) To: Johannes Sixt; +Cc: git, gitster, Johannes Schindelin Johannes Schindelin <johannes.schindelin@gmx.de> writes: > 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> Since this is a fix-up to a new on 'master', I've applied the patch myself, but how would we want to handle MinGW related patches in general? My preference is to have somebody I can rely on receiving Acked forwards from (or pulling from). ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Brown paper bag fix for MinGW 64-bit stat 2009-03-07 20:00 ` Junio C Hamano @ 2009-03-07 21:02 ` Johannes Schindelin 0 siblings, 0 replies; 4+ messages in thread From: Johannes Schindelin @ 2009-03-07 21:02 UTC (permalink / raw) To: Junio C Hamano; +Cc: Johannes Sixt, git Hi, On Sat, 7 Mar 2009, Junio C Hamano wrote: > Johannes Schindelin <johannes.schindelin@gmx.de> writes: > > > 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> > > Since this is a fix-up to a new on 'master', I've applied the patch > myself, but how would we want to handle MinGW related patches in general? > > My preference is to have somebody I can rely on receiving Acked forwards > from (or pulling from). My preference is to keep the tried and tested mingw.git maintainer... ;-) Note: IMHO Windows support is really at most beta quality; I would prefer only those using it who can fix bugs themselves, or have the means to make others fix the bugs. So technically, we do not need such a strict and rigid process as for git.git itself, which is blessed with hundreds of contributors, due to which is really is ready for the end-user. Ciao, Dscho ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-03-07 21:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1236436185u.git.johannes.schindelin@gmx.de>
2009-03-07 14:37 ` [PATCH] Brown paper bag fix for MinGW 64-bit stat Johannes Schindelin
2009-03-07 19:46 ` Johannes Sixt
2009-03-07 20:00 ` Junio C Hamano
2009-03-07 21:02 ` Johannes Schindelin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox