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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---

Johannes Schindelin, Thu, Mar 19, 2009 11:57:01 +0100:
> 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux