mingw: make isatty() recognize MSYS2's pseudo terminals (/dev/pty*)
[gitweb.git] / config.mak.uname
index f34dcaad20d66954c0c13a50bdcbd0f0312cc982..a88f13989ac9c2cbb303e2ae5f9ed43c9a5f778f 100644 (file)
@@ -37,6 +37,7 @@ ifeq ($(uname_S),Linux)
        HAVE_CLOCK_GETTIME = YesPlease
        HAVE_CLOCK_MONOTONIC = YesPlease
        HAVE_GETDELIM = YesPlease
+       SANE_TEXT_GREP=-a
 endif
 ifeq ($(uname_S),GNU/kFreeBSD)
        HAVE_ALLOCA_H = YesPlease
@@ -186,6 +187,7 @@ ifeq ($(uname_O),Cygwin)
        X = .exe
        UNRELIABLE_FSTAT = UnfortunatelyYes
        SPARSE_FLAGS = -isystem /usr/include/w32api -Wno-one-bit-signed-bitfield
+       OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo
 endif
 ifeq ($(uname_S),FreeBSD)
        NEEDS_LIBICONV = YesPlease
@@ -518,13 +520,12 @@ ifneq (,$(findstring MINGW,$(uname_S)))
        NO_INET_NTOP = YesPlease
        NO_POSIX_GOODIES = UnfortunatelyYes
        DEFAULT_HELP_FORMAT = html
-       COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -D_USE_32BIT_TIME_T -DNOGDI -Icompat -Icompat/win32
+       COMPAT_CFLAGS += -DNOGDI -Icompat -Icompat/win32
        COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
        COMPAT_OBJS += compat/mingw.o compat/winansi.o \
                compat/win32/pthread.o compat/win32/syslog.o \
                compat/win32/dirent.o
        BASIC_CFLAGS += -DPROTECT_NTFS_DEFAULT=1
-       BASIC_LDFLAGS += -Wl,--large-address-aware
        EXTLIBS += -lws2_32
        GITLIBS += git.res
        PTHREAD_LIBS =
@@ -541,8 +542,36 @@ ifneq (,$(wildcard ../THIS_IS_MSYSGIT))
        INTERNAL_QSORT = YesPlease
        HAVE_LIBCHARSET_H = YesPlease
        NO_GETTEXT = YesPlease
+       COMPAT_CLFAGS += -D__USE_MINGW_ACCESS
 else
-       NO_CURL = YesPlease
+       ifeq ($(shell expr "$(uname_R)" : '2\.'),2)
+               # MSys2
+               prefix = /usr/
+               ifeq (MINGW32,$(MSYSTEM))
+                       prefix = /mingw32
+               endif
+               ifeq (MINGW64,$(MSYSTEM))
+                       prefix = /mingw64
+               else
+                       COMPAT_CFLAGS += -D_USE_32BIT_TIME_T
+                       BASIC_LDFLAGS += -Wl,--large-address-aware
+               endif
+               CC = gcc
+               COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO=0 -DDETECT_MSYS_TTY
+               EXTLIBS += -lntdll
+               INSTALL = /bin/install
+               NO_R_TO_GCC_LINKER = YesPlease
+               INTERNAL_QSORT = YesPlease
+               HAVE_LIBCHARSET_H = YesPlease
+               NO_GETTEXT =
+               USE_GETTEXT_SCHEME = fallthrough
+               USE_LIBPCRE= YesPlease
+               NO_CURL =
+               USE_NED_ALLOCATOR = YesPlease
+       else
+               COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO
+               NO_CURL = YesPlease
+       endif
 endif
 endif
 ifeq ($(uname_S),QNX)