Skip to content

Commit

Permalink
Merge branch 'ml/cygwin-mingw-headers'
Browse files Browse the repository at this point in the history
Make git compile on cygwin with newer header files.

* ml/cygwin-mingw-headers:
  USE CGYWIN_V15_WIN32API as macro to select api for cygwin
  Update cygwin.c for new mingw-64 win32 api headers
  • Loading branch information
Junio C Hamano committed Nov 20, 2012
2 parents 9cfe5f4 + 9fca6cf commit 2f2c7e1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,7 @@ ifeq ($(uname_O),Cygwin)
NO_SYMLINK_HEAD = YesPlease
NO_IPV6 = YesPlease
OLD_ICONV = UnfortunatelyYes
CYGWIN_V15_WIN32API = YesPlease
endif
NO_THREAD_SAFE_PREAD = YesPlease
NEEDS_LIBICONV = YesPlease
Expand Down Expand Up @@ -1897,6 +1898,9 @@ ifdef NO_REGEX
COMPAT_CFLAGS += -Icompat/regex
COMPAT_OBJS += compat/regex/regex.o
endif
ifdef CYGWIN_V15_WIN32API
COMPAT_CFLAGS += -DCYGWIN_V15_WIN32API
endif

ifdef USE_NED_ALLOCATOR
COMPAT_CFLAGS += -Icompat/nedmalloc
Expand Down
7 changes: 7 additions & 0 deletions compat/cygwin.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#define WIN32_LEAN_AND_MEAN
#ifdef CYGWIN_V15_WIN32API
#include "../git-compat-util.h"
#include "win32.h"
#else
#include <sys/stat.h>
#include <sys/errno.h>
#include "win32.h"
#include "../git-compat-util.h"
#endif
#include "../cache.h" /* to read configuration */

static inline void filetime_to_timespec(const FILETIME *ft, struct timespec *ts)
Expand Down

0 comments on commit 2f2c7e1

Please sign in to comment.