git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] Windows: Skip fstat/lstat optimization in write_entry()

From
Dmitry Potapov <dpotapov@gmail.com>
Date
Apr 20, 2009, 11:03 UTC
Message-ID
<20090420110302.GB25059@dpotapov.dyndns.org>
In-Reply-To
<49EC2F7C.8070209@viscovery.net>

The cygwin version has the same problem. (In fact, it is even worse, because we have an optimized version for lstat/stat but not for fstat, and they return different values for some fields like i_no). But even if we used the only Cygwin functions, we would still face the problem, because Windows returns the wrong values for timestamps (and maybe even size on FAT?). So I think the following patch should be squashed on top.

-- >8 --
From 1f957680d9b0e0bfeda9bf0e20397b0323b45334 Mon Sep 17 00:00:00 2001
From: Dmitry Potapov <dpotapov@gmail.com>
Date: Mon, 20 Apr 2009 14:54:16 +0400
Subject: [PATCH] cygwin: Skip fstat/lstat optimization in write_entry()
---
 Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index 2af0dfb..177dc15 100644
--- a/Makefile
+++ b/Makefile
@@ -809,6 +809,7 @@ ifeq ($(uname_S),HP-UX)
 endif
 ifneq (,$(findstring CYGWIN,$(uname_S)))
 	COMPAT_OBJS += compat/cygwin.o
+	UNRELIABLE_FSTAT = UnfortunatelyYes
 endif
 ifneq (,$(findstring MINGW,$(uname_S)))
 	NO_PREAD = YesPlease
-- 
1.6.1.20.gee856
-- >8 --
Previous: Johannes SchindelinNext: Hannu Koivisto
Message 3 of 12 in “Windows: Skip fstat/lstat optimization in write_entry()”
  1. 2/2 Windows: Skip fstat/lstat optimization in write_entry()Johannes Sixt, Apr 20, 2009
  2. Johannes SchindelinApr 20, 2009
  3. Dmitry PotapovApr 20, 2009
  4. Hannu KoivistoApr 20, 2009
  5. Alex RiesenApr 20, 2009
  6. Dmitry PotapovApr 20, 2009
  7. Alex RiesenApr 20, 2009
  8. Johannes SixtApr 20, 2009
  9. Alex RiesenApr 20, 2009
  10. Alex RiesenApr 20, 2009
  11. Junio C HamanoApr 20, 2009
  12. Alex RiesenApr 20, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.