{"thread":{"id":"18193","subject":"[PATCH] Brown paper bag fix for MinGW 64-bit stat","startedAt":"2009-03-07T14:37:18Z","lastAt":"2009-03-07T21:02:35Z","messageCount":4,"participants":["Johannes Schindelin","Johannes Sixt","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"107301","messageId":"03fcab37c921f5728deded11c07bdf32a263b79b.1236436185u.git.johannes.schindelin@gmx.de","threadId":"18193","inReplyTo":"cover.1236436185u.git.johannes.schindelin@gmx.de","subject":"[PATCH] Brown paper bag fix for MinGW 64-bit stat","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-03-07T14:37:18Z","receivedAt":"2009-03-07T14:37:18Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"When overriding the identifier \"stat\" so that \"struct stat\" will be\nsubstituted with \"struct _stati64\" everywhere, I tried to fix the calls\nto the _function_ stat(), too, but I forgot to change the earlier\nattempt \"stat64\" to \"_stati64\" there.\n\nSo, the stat() calls were overridden by calls to _stati64() instead.\n\nUnfortunately, there is a function _stati64() so that I missed that\ncalls to stat() were not actually overridden by calls to mingw_lstat(),\nbut t4200-rerere.sh showed the error.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n\n\tAaargh.\n\n\tI am very, very sorry.\n\n\tActually, it was quite funny that t4200 displayed the bug; I \n\t_guess_ it was due to a time zone issue, as the times were exactly \n\tone hour off (and the machine I tested on is at UTC+0100 right now).\n\n\tAnd due to that bug, \"rerere gc\" would not collect the garbage.\n\n\tSo even if the C runtime provides a _stati64() function that \n\tpretends to work, it does not, and this patch is absolutely necessary.\n\n\tNow, if only the tests would not take ages to run on Windows...  \n\tthen I would not be tempted to skip them when sending the next patches.\n\n compat/mingw.h |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/compat/mingw.h b/compat/mingw.h\nindex 92fb310..a0b74fb 100644\n--- a/compat/mingw.h\n+++ b/compat/mingw.h\n@@ -169,7 +169,7 @@ int mingw_lstat(const char *file_name, struct stat *buf);\n int mingw_fstat(int fd, struct stat *buf);\n #define fstat mingw_fstat\n #define lstat mingw_lstat\n-#define stat64(x,y) mingw_lstat(x,y)\n+#define _stati64(x,y) mingw_lstat(x,y)\n \n int mingw_utime(const char *file_name, const struct utimbuf *times);\n #define utime mingw_utime\n-- \n1.6.2.327.g0fa6c\n"},{"id":"107327","messageId":"200903072046.23965.j6t@kdbg.org","threadId":"18193","inReplyTo":"03fcab37c921f5728deded11c07bdf32a263b79b.1236436185u.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH] Brown paper bag fix for MinGW 64-bit stat","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2009-03-07T19:46:23Z","receivedAt":"2009-03-07T19:46:23Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"On Samstag, 7. März 2009, Johannes Schindelin wrote:\n> \tActually, it was quite funny that t4200 displayed the bug; I\n> \t_guess_ it was due to a time zone issue, as the times were exactly\n> \tone hour off (and the machine I tested on is at UTC+0100 right now).\n>\n> \tAnd due to that bug, \"rerere gc\" would not collect the garbage.\n\nU-oh, you are right! I was 100% sure that I ran the test-suite suite with your \nearlier patch and it was all OK before I gave my ACK. But appearently I did \nsomething wrong because today I see the failure in t4200, too, and this fixes \nit, and it is the right thing to do.\n\n> -#define stat64(x,y) mingw_lstat(x,y)\n> +#define _stati64(x,y) mingw_lstat(x,y)\n\nAcked-by: Johannes Sixt <j6t@kdbg.org>\n\n-- Hannes\n"},{"id":"107332","messageId":"7vzlfxnlx2.fsf@gitster.siamese.dyndns.org","threadId":"18193","inReplyTo":"03fcab37c921f5728deded11c07bdf32a263b79b.1236436185u.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH] Brown paper bag fix for MinGW 64-bit stat","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-03-07T20:00:09Z","receivedAt":"2009-03-07T20:00:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n\n> When overriding the identifier \"stat\" so that \"struct stat\" will be\n> substituted with \"struct _stati64\" everywhere, I tried to fix the calls\n> to the _function_ stat(), too, but I forgot to change the earlier\n> attempt \"stat64\" to \"_stati64\" there.\n>\n> So, the stat() calls were overridden by calls to _stati64() instead.\n>\n> Unfortunately, there is a function _stati64() so that I missed that\n> calls to stat() were not actually overridden by calls to mingw_lstat(),\n> but t4200-rerere.sh showed the error.\n>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nSince this is a fix-up to a new on 'master', I've applied the patch\nmyself, but how would we want to handle MinGW related patches in general?\n\nMy preference is to have somebody I can rely on receiving Acked forwards\nfrom (or pulling from).\n"},{"id":"107343","messageId":"alpine.DEB.1.00.0903072159500.10279@pacific.mpi-cbg.de","threadId":"18193","inReplyTo":"7vzlfxnlx2.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH] Brown paper bag fix for MinGW 64-bit stat","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-03-07T21:02:35Z","receivedAt":"2009-03-07T21:02:35Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 7 Mar 2009, Junio C Hamano wrote:\n\n> Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n> \n> > When overriding the identifier \"stat\" so that \"struct stat\" will be\n> > substituted with \"struct _stati64\" everywhere, I tried to fix the calls\n> > to the _function_ stat(), too, but I forgot to change the earlier\n> > attempt \"stat64\" to \"_stati64\" there.\n> >\n> > So, the stat() calls were overridden by calls to _stati64() instead.\n> >\n> > Unfortunately, there is a function _stati64() so that I missed that\n> > calls to stat() were not actually overridden by calls to mingw_lstat(),\n> > but t4200-rerere.sh showed the error.\n> >\n> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> \n> Since this is a fix-up to a new on 'master', I've applied the patch\n> myself, but how would we want to handle MinGW related patches in general?\n> \n> My preference is to have somebody I can rely on receiving Acked forwards\n> from (or pulling from).\n\nMy preference is to keep the tried and tested mingw.git maintainer... ;-)\n\nNote: IMHO Windows support is really at most beta quality; I would prefer \nonly those using it who can fix bugs themselves, or have the means to make \nothers fix the bugs.\n\nSo technically, we do not need such a strict and rigid process as for \ngit.git itself, which is blessed with hundreds of contributors, due to \nwhich is really is ready for the end-user.\n\nCiao,\nDscho\n"}]}