diff options
| author | Vicent Martà <tanoku@gmail.com> | 2012-01-26 17:53:46 -0800 |
|---|---|---|
| committer | Vicent Martà <tanoku@gmail.com> | 2012-01-26 17:53:46 -0800 |
| commit | a53420e4b0efc9b1d87d6d13473d7f29ef4c68ee (patch) | |
| tree | 4d17b8f3f1e4fdbd5f2b5de704cdf92394706d9f /src | |
| parent | 99a07f0f4df5e965eb87c0066ce0afcd848e6bd9 (diff) | |
| download | libgit2-a53420e4b0efc9b1d87d6d13473d7f29ef4c68ee.tar.gz | |
msvc: Move `ssize_t` typedef to MSVC-only
This is a MSVC-only issue. All other compilers we support work properly.
Diffstat (limited to 'src')
| -rw-r--r-- | src/common.h | 4 | ||||
| -rw-r--r-- | src/win32/msvc-compat.h | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/common.h b/src/common.h index 35316012d..4f037f78c 100644 --- a/src/common.h +++ b/src/common.h @@ -33,10 +33,6 @@ # define snprintf _snprintf -#ifndef _SSIZE_T_DEFINED -typedef SSIZE_T ssize_t; -#endif - #else # include <unistd.h> diff --git a/src/win32/msvc-compat.h b/src/win32/msvc-compat.h index 93a123f96..167e2694f 100644 --- a/src/win32/msvc-compat.h +++ b/src/win32/msvc-compat.h @@ -33,6 +33,9 @@ # define strcasecmp _stricmp # define strncasecmp _strnicmp +/* MSVC doesn't define ssize_t at all */ +typedef SSIZE_T ssize_t; + #endif #endif /* INCLUDE_msvc_compat__ */ |
