]>
Commit | Line | Data |
---|---|---|
bb742ede | 1 | /* |
359fc2d2 | 2 | * Copyright (C) the libgit2 contributors. All rights reserved. |
bb742ede VM |
3 | * |
4 | * This file is part of libgit2, distributed under the GNU GPL v2 with | |
5 | * a Linking Exception. For full terms see the included COPYING file. | |
6 | */ | |
eae0bfdc PP |
7 | #ifndef INCLUDE_win32_msvc_compat_h__ |
8 | #define INCLUDE_win32_msvc_compat_h__ | |
e8cc449f RJ |
9 | |
10 | #if defined(_MSC_VER) | |
11 | ||
2f795d8f | 12 | typedef unsigned short mode_t; |
a53420e4 VM |
13 | typedef SSIZE_T ssize_t; |
14 | ||
ac3d33df JK |
15 | #ifdef _WIN64 |
16 | # define SSIZE_MAX _I64_MAX | |
17 | #else | |
18 | # define SSIZE_MAX LONG_MAX | |
19 | #endif | |
20 | ||
1a7ea63d TK |
21 | #define strcasecmp(s1, s2) _stricmp(s1, s2) |
22 | #define strncasecmp(s1, s2, c) _strnicmp(s1, s2, c) | |
23 | ||
e8cc449f RJ |
24 | #endif |
25 | ||
c25aa7cd PP |
26 | /* |
27 | * Offer GIT_LIBGIT2_CALL for our calling conventions (__cdecl, always). | |
28 | * This is useful for providing callbacks to userspace code. | |
29 | * | |
30 | * Offer GIT_SYSTEM_CALL for the system calling conventions (__stdcall on | |
31 | * Win32). Useful for providing callbacks to system libraries. | |
32 | */ | |
33 | #define GIT_LIBGIT2_CALL __cdecl | |
34 | #define GIT_SYSTEM_CALL NTAPI | |
97b71374 | 35 | |
eae0bfdc | 36 | #endif |