msvc-compat.h 621 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 9 10 11
#ifndef INCLUDE_msvc_compat__
#define INCLUDE_msvc_compat__

#if defined(_MSC_VER)

12 13
/* 64-bit stat information, regardless of USE_32BIT_TIME_T define */
#define stat __stat64
14

15
typedef unsigned short mode_t;
16 17
typedef SSIZE_T ssize_t;

18 19 20
#define strcasecmp(s1, s2) _stricmp(s1, s2)
#define strncasecmp(s1, s2, c) _strnicmp(s1, s2, c)

21 22
#endif

Russell Belfer committed
23 24
#define GIT_STDLIB_CALL __cdecl

25
#endif /* INCLUDE_msvc_compat__ */