summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 35a730f)
raw | patch | inline | side by side (parent: 35a730f)
author | Junio C Hamano <junkio@cox.net> | |
Fri, 20 Jan 2006 01:13:57 +0000 (17:13 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 22 Jan 2006 03:33:22 +0000 (19:33 -0800) |
The recent Cygwin defines DT_UNKNOWN although it does not have d_type
in struct dirent. Give an option to tell us not to use d_type on such
platforms. Hopefully this problem will be transient.
Signed-off-by: Junio C Hamano <junkio@cox.net>
in struct dirent. Give an option to tell us not to use d_type on such
platforms. Hopefully this problem will be transient.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Makefile | patch | blob | history | |
cache.h | patch | blob | history |
diff --git a/Makefile b/Makefile
index 334fe4ec414d42b644f486da0253545f2e44c91b..30460560247f9e210b41207434793ce6b29b83b2 100644 (file)
--- a/Makefile
+++ b/Makefile
#
# Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent.
#
+# Define NO_D_TYPE_IN_DIRENT if your platform defines DT_UNKNOWN but lacks
+# d_type in struct dirent (latest Cygwin -- will be fixed soonish).
+#
# Define NO_STRCASESTR if you don't have strcasestr.
#
# Define NO_SETENV if you don't have setenv in the C library.
ALL_CFLAGS += -D__EXTENSIONS__
endif
ifeq ($(uname_O),Cygwin)
+ NO_D_TYPE_IN_DIRENT = YesPlease
NO_D_INO_IN_DIRENT = YesPlease
NO_STRCASESTR = YesPlease
NEEDS_LIBICONV = YesPlease
LIBS += -lnsl
SIMPLE_LIB += -lnsl
endif
+ifdef NO_D_TYPE_IN_DIRENT
+ ALL_CFLAGS += -DNO_D_TYPE_IN_DIRENT
+endif
ifdef NO_D_INO_IN_DIRENT
ALL_CFLAGS += -DNO_D_INO_IN_DIRENT
endif
index 29c9e819d61ccb93167d5f22c8280f75014872f9..3d79c55a297ab8f9854cb29c89a6fac4117403af 100644 (file)
--- a/cache.h
+++ b/cache.h
#define deflateBound(c,s) ((s) + (((s) + 7) >> 3) + (((s) + 63) >> 6) + 11)
#endif
-#ifdef DT_UNKNOWN
+#if defined(DT_UNKNOWN) && !NO_D_TYPE_IN_DIRENT
#define DTYPE(de) ((de)->d_type)
#else
#define DT_UNKNOWN 0