summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7ebee44)
raw | patch | inline | side by side (parent: 7ebee44)
author | Markus Duft <mduft@gentoo.org> | |
Wed, 27 Oct 2010 08:39:52 +0000 (10:39 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 29 Oct 2010 00:52:22 +0000 (17:52 -0700) |
* add required build options to Makefile.
* introduce new NO_INTTYPES_H for systems lacking inttypes; code
includes stdint.h instead, if this is set.
* introduce new NO_SYS_POLL_H for systems lacking sys/poll.h; code
includes poll.h instead, if this is set.
* introduce NO_INITGROUPS. initgroups() call is simply omitted.
Signed-off-by: Markus Duft <mduft@gentoo.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* introduce new NO_INTTYPES_H for systems lacking inttypes; code
includes stdint.h instead, if this is set.
* introduce new NO_SYS_POLL_H for systems lacking sys/poll.h; code
includes poll.h instead, if this is set.
* introduce NO_INITGROUPS. initgroups() call is simply omitted.
Signed-off-by: Markus Duft <mduft@gentoo.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile | patch | blob | history | |
daemon.c | patch | blob | history | |
git-compat-util.h | patch | blob | history |
diff --git a/Makefile b/Makefile
index 1f1ce04edf0b87f6fdbd579052d5ccaa538e6b93..c9d8c9e1fe07d687f790234694ef84641324e5e1 100644 (file)
--- a/Makefile
+++ b/Makefile
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
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/daemon.c b/daemon.c
index 7ccd097e1d1234d06316e8b7f271e86127750f85..de59f5d13944e7475586fcb5704ea6e7d2d1dd9d 100644 (file)
--- a/daemon.c
+++ b/daemon.c
#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 2af8d3edbe35dce35e940c5cccb91f9e06ebeff8..625b2e4f142fcd756f80c20fd22c03c15f1b9214 100644 (file)
--- a/git-compat-util.h
+++ b/git-compat-util.h
#include <utime.h>
#ifndef __MINGW32__
#include <sys/wait.h>
+#ifndef NO_SYS_POLL_H
#include <sys/poll.h>
+#else
+#include <poll.h>
+#endif
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <termios.h>
#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>