Merge branch 'rj/msvc-fix'

* rj/msvc-fix:
  msvc: Fix macro redefinition warnings
  msvc: Fix build by adding missing INTMAX_MAX define
  msvc: git-daemon.exe: Fix linker "unresolved externals" error
  msvc: Fix compilation errors in compat/win32/sys/poll.c
This commit is contained in:
Junio C Hamano 2010-12-16 12:55:36 -08:00
commit b5c6aac01b
4 changed files with 8 additions and 7 deletions

View File

@ -1102,7 +1102,7 @@ ifeq ($(uname_S),Windows)
compat/win32/sys/poll.o compat/win32/dirent.o
COMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DNOGDI -DHAVE_STRING_H -DHAVE_ALLOCA_H -Icompat -Icompat/regex -Icompat/win32 -DSTRIP_EXTENSION=\".exe\"
BASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE -NODEFAULTLIB:MSVCRT.lib
EXTLIBS = advapi32.lib shell32.lib wininet.lib ws2_32.lib
EXTLIBS = user32.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib
PTHREAD_LIBS =
lib =
ifndef DEBUG

View File

@ -14,12 +14,6 @@ typedef int socklen_t;
#define S_ISLNK(x) (((x) & S_IFMT) == S_IFLNK)
#define S_ISSOCK(x) 0
#ifndef _STAT_H_
#define S_IRUSR 0
#define S_IWUSR 0
#define S_IXUSR 0
#define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
#endif
#define S_IRGRP 0
#define S_IWGRP 0
#define S_IXGRP 0

View File

@ -45,6 +45,10 @@ typedef unsigned long long uintmax_t;
typedef int64_t off64_t;
#define INTMAX_MIN _I64_MIN
#define INTMAX_MAX _I64_MAX
#define UINTMAX_MAX _UI64_MAX
#define STDOUT_FILENO 1
#define STDERR_FILENO 2

View File

@ -34,6 +34,9 @@
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
# define WIN32_NATIVE
# if defined (_MSC_VER)
# define _WIN32_WINNT 0x0502
# endif
# include <winsock2.h>
# include <windows.h>
# include <io.h>