msvc-compat.h 529 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
typedef unsigned short mode_t;
13 14
typedef SSIZE_T ssize_t;

15 16 17
#define strcasecmp(s1, s2) _stricmp(s1, s2)
#define strncasecmp(s1, s2, c) _strnicmp(s1, s2, c)

18 19
#endif

Russell Belfer committed
20 21
#define GIT_STDLIB_CALL __cdecl

22
#endif /* INCLUDE_msvc_compat__ */