Skip to content

Commit

Permalink
Fix ssize_t on 64-bit Windows (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
haozhun authored and kuba-- committed Mar 5, 2019
1 parent e5ef416 commit 635ef1d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/zip.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,14 @@ extern "C" {
#if !defined(_SSIZE_T_DEFINED) && !defined(_SSIZE_T_DEFINED_) && \
!defined(_SSIZE_T) && !defined(_SSIZE_T_) && !defined(__ssize_t_defined)
#define _SSIZE_T
// 64-bit Windows is the only mainstream platform
// where sizeof(long) != sizeof(void*)
#ifdef _WIN64
typedef long long ssize_t; /* byte count or error */
#else
typedef long ssize_t; /* byte count or error */
#endif
#endif

#ifndef MAX_PATH
#define MAX_PATH 32767 /* # chars in a path name including NULL */
Expand Down

0 comments on commit 635ef1d

Please sign in to comment.