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

Re: [PATCH] Define a version of lstat(2) with posix semantics

From
Alex Riesen <raa.lkml@gmail.com>
Date
Mar 19, 2009, 21:40 UTC
Message-ID
<20090319214001.GA6253@blimp.localdomain>
In-Reply-To
<alpine.DEB.1.00.0903191155300.10279@pacific.mpi-cbg.de>

So that Cygwin port can continue work around its supporting library and get access to its faked file attributes.

Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
Johannes Schindelin, Thu, Mar 19, 2009 11:57:01 +0100:
Show 6 quoted lines
> On Thu, 19 Mar 2009, Alex Riesen wrote:
> > So that Cygwin port can continue work around its supporting
> > library and get access to its faked file attributes.
> > 
> 
> [patch not inlined: therefore you'll have to guess what I am referring to]
I resend.
> It seems quite wrong to define something for other platforms when only 
> Cygwin is affected.

I know. Didn't I already said I'm sorry? I even said that it is fine if the patches wont be applied. Just wanted to share the pain.

> I'd rather just disable WIN32_STAT for Cygwin, because otherwise, we will 
> keep running into issues.

I'd rather not. The thing is just so unbelievably slow and being stuck on it I'm just trying my damnedest to squeeze every last bit of performance out of it.

 git-compat-util.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/git-compat-util.h b/git-compat-util.h
index f09f244..c99549d 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -85,11 +85,16 @@
 #undef _XOPEN_SOURCE
 #include <grp.h>
 #define _XOPEN_SOURCE 600
+static inline int posix_lstat(const char *file_name, struct stat *buf)
+{
+	return lstat(file_name, buf);
+}
 #include "compat/cygwin.h"
 #else
 #undef _ALL_SOURCE /* AIX 5.3L defines a struct list with _ALL_SOURCE. */
 #include <grp.h>
 #define _ALL_SOURCE 1
+#define posix_lstat lstat
 #endif
 #else 	/* __MINGW32__ */
 /* pull in Windows compatibility stuff */
-- 
1.6.2.1.237.g7206c6
Previous: Johannes SchindelinNext: Alex Riesen
Message 3 of 13 in “Define a version of lstat(2) with posix semantics”
  1. Define a version of lstat(2) with posix semanticsAlex Riesen, Mar 19, 2009
  2. Johannes SchindelinMar 19, 2009
  3. Alex RiesenMar 19, 2009
  4. git clone needs to know executability of template filesAlex Riesen, Mar 19, 2009
  5. Johannes SchindelinMar 19, 2009
  6. Alex RiesenMar 20, 2009
  7. Johannes SchindelinMar 20, 2009
  8. Alex RiesenMar 20, 2009
  9. Rogan DawesMar 20, 2009
  10. Alex RiesenMar 20, 2009
  11. Johannes SchindelinMar 20, 2009
  12. Alex RiesenMar 20, 2009
  13. Junio C HamanoMar 19, 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.