Skip to content

Commit

Permalink
Use intptr_t for z_ssize_t on MSVC.
Browse files Browse the repository at this point in the history
  • Loading branch information
madler authored and kornelski committed Oct 14, 2023
1 parent 47f1285 commit 9a58c5d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
7 changes: 6 additions & 1 deletion zconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,13 @@
# ifdef NO_SSIZE_T
typedef NO_SSIZE_T z_ssize_t;
# else
# include <stddef.h>
# include <sys/types.h>
typedef ssize_t z_ssize_t;
# ifdef _MSC_VER
typedef intptr_t z_ssize_t;
# else
typedef ssize_t z_ssize_t;
# endif
# endif
#endif

Expand Down
7 changes: 6 additions & 1 deletion zconf.h.cmakein
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,13 @@
# ifdef NO_SSIZE_T
typedef NO_SSIZE_T z_ssize_t;
# else
# include <stddef.h>
# include <sys/types.h>
typedef ssize_t z_ssize_t;
# ifdef _MSC_VER
typedef intptr_t z_ssize_t;
# else
typedef ssize_t z_ssize_t;
# endif
# endif
#endif

Expand Down
7 changes: 6 additions & 1 deletion zconf.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,13 @@
# ifdef NO_SSIZE_T
typedef NO_SSIZE_T z_ssize_t;
# else
# include <stddef.h>
# include <sys/types.h>
typedef ssize_t z_ssize_t;
# ifdef _MSC_VER
typedef intptr_t z_ssize_t;
# else
typedef ssize_t z_ssize_t;
# endif
# endif
#endif

Expand Down

0 comments on commit 9a58c5d

Please sign in to comment.