Browse Source

Merge branch 'rj/msvc-build'

* rj/msvc-build:
  msvc: avoid collisions between "tags" and "TAGS"
  msvc: test-svn-fe: Fix linker "unresolved external" error
  msvc: Fix build by adding missing symbol defines
  msvc: git-daemon: Fix linker "unresolved external" errors
  msvc: Fix compilation errors caused by poll.h emulation
maint
Junio C Hamano 12 years ago
parent
commit
9b79956018
  1. 2
      compat/msvc.h
  2. 1
      compat/vcbuild/include/sys/poll.h
  3. 3
      compat/vcbuild/include/unistd.h
  4. 4
      config.mak.uname
  5. 3
      git-compat-util.h
  6. 2
      test-svn-fe.c

2
compat/msvc.h

@ -12,6 +12,8 @@ @@ -12,6 +12,8 @@
#define __attribute__(x)
#define strncasecmp _strnicmp
#define ftruncate _chsize
#define strtoull _strtoui64
#define strtoll _strtoi64

static __inline int strcasecmp (const char *s1, const char *s2)
{

1
compat/vcbuild/include/sys/poll.h

@ -1 +0,0 @@ @@ -1 +0,0 @@
/* Intentionally empty file to support building git with MSVC */

3
compat/vcbuild/include/unistd.h

@ -49,6 +49,9 @@ typedef int64_t off64_t; @@ -49,6 +49,9 @@ typedef int64_t off64_t;
#define INTMAX_MAX _I64_MAX
#define UINTMAX_MAX _UI64_MAX

#define UINT32_MAX 0xffffffff /* 4294967295U */

#define STDIN_FILENO 0
#define STDOUT_FILENO 1
#define STDERR_FILENO 2


4
config.mak.uname

@ -326,7 +326,6 @@ ifeq ($(uname_S),Windows) @@ -326,7 +326,6 @@ ifeq ($(uname_S),Windows)
# NEEDS_LIBICONV = YesPlease
NO_ICONV = YesPlease
NO_STRTOUMAX = YesPlease
NO_STRTOULL = YesPlease
NO_MKDTEMP = YesPlease
NO_MKSTEMPS = YesPlease
SNPRINTF_RETURNS_BOGUS = YesPlease
@ -343,6 +342,9 @@ ifeq ($(uname_S),Windows) @@ -343,6 +342,9 @@ ifeq ($(uname_S),Windows)
NO_CURL = YesPlease
NO_PYTHON = YesPlease
BLK_SHA1 = YesPlease
ETAGS_TARGET = ETAGS
NO_INET_PTON = YesPlease
NO_INET_NTOP = YesPlease
NO_POSIX_GOODIES = UnfortunatelyYes
NATIVE_CRLF = YesPlease
DEFAULT_HELP_FORMAT = html

3
git-compat-util.h

@ -86,6 +86,9 @@ @@ -86,6 +86,9 @@
#define _SGI_SOURCE 1

#ifdef WIN32 /* Both MinGW and MSVC */
# if defined (_MSC_VER)
# define _WIN32_WINNT 0x0502
# endif
#define WIN32_LEAN_AND_MEAN /* stops windows.h including winsock.h */
#include <winsock2.h>
#include <windows.h>

2
test-svn-fe.c

@ -24,7 +24,7 @@ static int apply_delta(int argc, char *argv[]) @@ -24,7 +24,7 @@ static int apply_delta(int argc, char *argv[])
die_errno("cannot open preimage");
if (buffer_init(&delta, argv[3]))
die_errno("cannot open delta");
if (svndiff0_apply(&delta, (off_t) strtoull(argv[4], NULL, 0),
if (svndiff0_apply(&delta, (off_t) strtoumax(argv[4], NULL, 0),
&preimage_view, stdout))
return 1;
if (buffer_deinit(&preimage))

Loading…
Cancel
Save