зеркало из https://github.com/microsoft/git.git
add support for the SUA layer (interix; windows)
* 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>
This commit is contained in:
Родитель
7ebee44167
Коммит
2844923d62
28
Makefile
28
Makefile
|
@ -1096,6 +1096,25 @@ else
|
||||||
endif
|
endif
|
||||||
X = .exe
|
X = .exe
|
||||||
endif
|
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)))
|
ifneq (,$(findstring MINGW,$(uname_S)))
|
||||||
pathsep = ;
|
pathsep = ;
|
||||||
NO_PREAD = YesPlease
|
NO_PREAD = YesPlease
|
||||||
|
@ -1360,6 +1379,15 @@ endif
|
||||||
ifdef NO_SYS_SELECT_H
|
ifdef NO_SYS_SELECT_H
|
||||||
BASIC_CFLAGS += -DNO_SYS_SELECT_H
|
BASIC_CFLAGS += -DNO_SYS_SELECT_H
|
||||||
endif
|
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
|
ifdef NO_MMAP
|
||||||
COMPAT_CFLAGS += -DNO_MMAP
|
COMPAT_CFLAGS += -DNO_MMAP
|
||||||
COMPAT_OBJS += compat/mmap.o
|
COMPAT_OBJS += compat/mmap.o
|
||||||
|
|
4
daemon.c
4
daemon.c
|
@ -15,6 +15,10 @@
|
||||||
#define NI_MAXSERV 32
|
#define NI_MAXSERV 32
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef NO_INITGROUPS
|
||||||
|
#define initgroups(x, y) (0) /* nothing */
|
||||||
|
#endif
|
||||||
|
|
||||||
static int log_syslog;
|
static int log_syslog;
|
||||||
static int verbose;
|
static int verbose;
|
||||||
static int reuseaddr;
|
static int reuseaddr;
|
||||||
|
|
|
@ -106,7 +106,11 @@
|
||||||
#include <utime.h>
|
#include <utime.h>
|
||||||
#ifndef __MINGW32__
|
#ifndef __MINGW32__
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
#ifndef NO_SYS_POLL_H
|
||||||
#include <sys/poll.h>
|
#include <sys/poll.h>
|
||||||
|
#else
|
||||||
|
#include <poll.h>
|
||||||
|
#endif
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
|
@ -118,7 +122,11 @@
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
|
#ifndef NO_INTTYPES_H
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
#else
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
#if defined(__CYGWIN__)
|
#if defined(__CYGWIN__)
|
||||||
#undef _XOPEN_SOURCE
|
#undef _XOPEN_SOURCE
|
||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче