Skip to content

Commit

Permalink
Merge branch 'md/interix'
Browse files Browse the repository at this point in the history
* md/interix:
  Interix: add configure checks
  add support for the SUA layer (interix; windows)

Conflicts:
	git-compat-util.h
  • Loading branch information
Junio C Hamano committed Nov 30, 2010
2 parents 1aa6583 + 25fe66f commit ec3f7d5
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 0 deletions.
28 changes: 28 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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], [[
Expand Down Expand Up @@ -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.
#
Expand Down
4 changes: 4 additions & 0 deletions daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 8 additions & 0 deletions git-compat-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down

0 comments on commit ec3f7d5

Please sign in to comment.