Skip to content

Commit a50dec2

Browse files
ebblakegitster
authored andcommitted
Makefile: update defaults for modern Cygwin
Now that Cygwin 1.7.x has enabled lots of new features, and Cygwin 1.5 is no longer actively supported by the Cygwin mailing lists, we might as well update the defaults to cater to those new features. NO_TRUSTABLE_FILEMODE is only necessary on FAT drives; the Cygwin community recommends NTFS drives, but there is still too much use for FAT to switch the default. Likewise, UNRELIABLE_FSTAT is probably file-system specific, but worth keeping unchanged. This commit does not change the default for NO_MMAP, although definitive proof of whether this option is necessary is lacking. Signed-off-by: Eric Blake <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 890a13a commit a50dec2

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

Makefile

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ all::
3434
# Define NO_D_INO_IN_DIRENT if you don't have d_ino in your struct dirent.
3535
#
3636
# Define NO_D_TYPE_IN_DIRENT if your platform defines DT_UNKNOWN but lacks
37-
# d_type in struct dirent (latest Cygwin -- will be fixed soonish).
37+
# d_type in struct dirent (Cygwin 1.5, fixed in Cygwin 1.7).
3838
#
3939
# Define NO_C99_FORMAT if your formatted IO functions (printf/scanf et.al.)
4040
# do not support the 'size specifiers' introduced by C99, namely ll, hh,
@@ -109,7 +109,7 @@ all::
109109
# Define NO_PTHREADS if you do not have or do not want to use Pthreads.
110110
#
111111
# Define NO_PREAD if you have a problem with pread() system call (e.g.
112-
# cygwin.dll before v1.5.22).
112+
# cygwin1.dll before v1.5.22).
113113
#
114114
# Define NO_FAST_WORKING_DIRECTORY if accessing objects in pack files is
115115
# generally faster on your platform than accessing the working directory.
@@ -831,22 +831,24 @@ ifeq ($(uname_S),SunOS)
831831
BASIC_CFLAGS += -D__EXTENSIONS__ -D__sun__ -DHAVE_ALLOCA_H
832832
endif
833833
ifeq ($(uname_O),Cygwin)
834-
NO_D_TYPE_IN_DIRENT = YesPlease
835-
NO_D_INO_IN_DIRENT = YesPlease
836-
NO_STRCASESTR = YesPlease
837-
NO_MEMMEM = YesPlease
838-
NO_MKSTEMPS = YesPlease
839-
NO_SYMLINK_HEAD = YesPlease
834+
ifneq ($(wordlist 1, 2, $(subst ., ,$(uname_R))),1 7)
835+
NO_D_TYPE_IN_DIRENT = YesPlease
836+
NO_D_INO_IN_DIRENT = YesPlease
837+
NO_STRCASESTR = YesPlease
838+
NO_MEMMEM = YesPlease
839+
NO_MKSTEMPS = YesPlease
840+
NO_SYMLINK_HEAD = YesPlease
841+
NO_IPV6 = YesPlease
842+
OLD_ICONV = UnfortunatelyYes
843+
endif
840844
NEEDS_LIBICONV = YesPlease
841845
NO_FAST_WORKING_DIRECTORY = UnfortunatelyYes
842846
NO_TRUSTABLE_FILEMODE = UnfortunatelyYes
843-
OLD_ICONV = UnfortunatelyYes
844847
NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
845848
# There are conflicting reports about this.
846849
# On some boxes NO_MMAP is needed, and not so elsewhere.
847850
# Try commenting this out if you suspect MMAP is more efficient
848851
NO_MMAP = YesPlease
849-
NO_IPV6 = YesPlease
850852
X = .exe
851853
COMPAT_OBJS += compat/cygwin.o
852854
UNRELIABLE_FSTAT = UnfortunatelyYes

0 commit comments

Comments
 (0)