diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-11-29 17:52:34 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-11-29 17:52:34 -0800 |
commit | ec3f7d5d0f3676aa9634ee30f8c9e55893a8c505 (patch) | |
tree | b51c8a2a902b671d0336a61276c0ae8f9b423836 | |
parent | 1aa6583cc257f3b0570cbc25c89a54f0e4417ef6 (diff) | |
parent | 25fe66f84cea9c2e0a7f6b53180542784b94485a (diff) | |
download | git-ec3f7d5d0f3676aa9634ee30f8c9e55893a8c505.tar.gz git-ec3f7d5d0f3676aa9634ee30f8c9e55893a8c505.tar.xz |
Merge branch 'md/interix'
* md/interix:
Interix: add configure checks
add support for the SUA layer (interix; windows)
Conflicts:
git-compat-util.h
-rw-r--r-- | Makefile | 28 | ||||
-rw-r--r-- | configure.ac | 18 | ||||
-rw-r--r-- | daemon.c | 4 | ||||
-rw-r--r-- | git-compat-util.h | 8 |
4 files changed, 58 insertions, 0 deletions
@@ -1099,6 +1099,25 @@ else endif X = .exe endif +ifeq ($(uname_S),Interix) + NO_SYS_POLL_H = YesPlease + NO_INTTYPES_H = YesPlease + NO_INITGROUPS = YesPlease + NO_IPV6 = YesPlease + NO_MEMMEM = YesPlease + NO_MKDTEMP = YesPlease + NO_STRTOUMAX = YesPlease + NO_NSEC = YesPlease + NO_MKSTEMPS = YesPlease + ifeq ($(uname_R),3.5) + NO_INET_NTOP = YesPlease + NO_INET_PTON = YesPlease + endif + ifeq ($(uname_R),5.2) + NO_INET_NTOP = YesPlease + NO_INET_PTON = YesPlease + endif +endif ifneq (,$(findstring MINGW,$(uname_S))) pathsep = ; NO_PREAD = YesPlease @@ -1363,6 +1382,15 @@ endif ifdef NO_SYS_SELECT_H BASIC_CFLAGS += -DNO_SYS_SELECT_H endif +ifdef NO_SYS_POLL_H + BASIC_CFLAGS += -DNO_SYS_POLL_H +endif +ifdef NO_INTTYPES_H + BASIC_CFLAGS += -DNO_INTTYPES_H +endif +ifdef NO_INITGROUPS + BASIC_CFLAGS += -DNO_INITGROUPS +endif ifdef NO_MMAP COMPAT_CFLAGS += -DNO_MMAP COMPAT_OBJS += compat/mmap.o diff --git a/configure.ac b/configure.ac index cc55b6d4f..c5bc9a05f 100644 --- a/configure.ac +++ b/configure.ac @@ -617,6 +617,18 @@ AC_CHECK_HEADER([sys/select.h], [NO_SYS_SELECT_H=UnfortunatelyYes]) AC_SUBST(NO_SYS_SELECT_H) # +# Define NO_SYS_POLL_H if you don't have sys/poll.h +AC_CHECK_HEADER([sys/poll.h], +[NO_SYS_POLL_H=], +[NO_SYS_POLL_H=UnfortunatelyYes]) +AC_SUBST(NO_SYS_POLL_H) +# +# Define NO_INTTYPES_H if you don't have inttypes.h +AC_CHECK_HEADER([inttypes.h], +[NO_INTTYPES_H=], +[NO_INTTYPES_H=UnfortunatelyYes]) +AC_SUBST(NO_INTTYPES_H) +# # Define OLD_ICONV if your library has an old iconv(), where the second # (input buffer pointer) parameter is declared with type (const char **). AC_DEFUN([OLDICONVTEST_SRC], [[ @@ -868,6 +880,12 @@ GIT_CHECK_FUNC(mkstemps, [NO_MKSTEMPS=YesPlease]) AC_SUBST(NO_MKSTEMPS) # +# Define NO_INITGROUPS if you don't have initgroups in the C library. +GIT_CHECK_FUNC(initgroups, +[NO_INITGROUPS=], +[NO_INITGROUPS=YesPlease]) +AC_SUBST(NO_INITGROUPS) +# # # Define NO_MMAP if you want to avoid mmap. # @@ -13,6 +13,10 @@ #define NI_MAXSERV 32 #endif +#ifdef NO_INITGROUPS +#define initgroups(x, y) (0) /* nothing */ +#endif + static int log_syslog; static int verbose; static int reuseaddr; diff --git a/git-compat-util.h b/git-compat-util.h index d0a1e480b..490f96974 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -105,7 +105,11 @@ #include <regex.h> #include <utime.h> #include <syslog.h> +#ifndef NO_SYS_POLL_H #include <sys/poll.h> +#else +#include <poll.h> +#endif #ifndef __MINGW32__ #include <sys/wait.h> #include <sys/socket.h> @@ -119,7 +123,11 @@ #include <arpa/inet.h> #include <netdb.h> #include <pwd.h> +#ifndef NO_INTTYPES_H #include <inttypes.h> +#else +#include <stdint.h> +#endif #if defined(__CYGWIN__) #undef _XOPEN_SOURCE #include <grp.h> |