msvc-compat.h 601 Bytes
Newer Older
Vicent Marti committed
1
/*
Edward Thomson committed
2
 * Copyright (C) the libgit2 contributors. All rights reserved.
Vicent Marti committed
3 4 5 6
 *
 * This file is part of libgit2, distributed under the GNU GPL v2 with
 * a Linking Exception. For full terms see the included COPYING file.
 */
7 8
#ifndef INCLUDE_win32_msvc_compat_h__
#define INCLUDE_win32_msvc_compat_h__
9 10 11

#if defined(_MSC_VER)

12
typedef unsigned short mode_t;
13 14
typedef SSIZE_T ssize_t;

15 16 17 18 19 20
#ifdef _WIN64
# define SSIZE_MAX _I64_MAX
#else
# define SSIZE_MAX LONG_MAX
#endif

21 22 23
#define strcasecmp(s1, s2) _stricmp(s1, s2)
#define strncasecmp(s1, s2, c) _strnicmp(s1, s2, c)

24 25
#endif

Russell Belfer committed
26 27
#define GIT_STDLIB_CALL __cdecl

28
#endif