Skip to content

Commit

Permalink
Merge branch 'rj/msvc-build'
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
gitster committed Mar 19, 2013
2 parents 31ccd35 + e0492c5 commit 9b79956
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 3 deletions.
2 changes: 2 additions & 0 deletions compat/msvc.h
Expand Up @@ -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)
{
Expand Down
1 change: 0 additions & 1 deletion compat/vcbuild/include/sys/poll.h

This file was deleted.

3 changes: 3 additions & 0 deletions compat/vcbuild/include/unistd.h
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion config.mak.uname
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions git-compat-util.h
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion test-svn-fe.c
Expand Up @@ -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))
Expand Down

0 comments on commit 9b79956

Please sign in to comment.