mirror of
https://git.proxmox.com/git/libgit2
synced 2026-02-01 17:27:18 +00:00
win32: Define the ssize_t type using SSIZE_T if supported
Some win32 compilers define the SSIZE_T type, with the same meaning and intent as ssize_t. If available, make ssize_t a synonym of SSIZE_T. At present, the Digital-Mars compiler is known not to define SSIZE_T, so we provide an SSIZE_T macro to use in the typedef. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
This commit is contained in:
parent
5cae6c2527
commit
04e8824004
13
src/common.h
13
src/common.h
@ -31,13 +31,16 @@
|
||||
|
||||
# define snprintf _snprintf
|
||||
|
||||
# if (defined(_MSC_VER) && defined(_WIN64)) || \
|
||||
(defined(__DMC__) && defined(_M_AMD64))
|
||||
typedef long long ssize_t;
|
||||
# else
|
||||
typedef int ssize_t;
|
||||
# if defined(__DMC__)
|
||||
# if defined(_M_AMD64)
|
||||
# define SSIZE_T long long
|
||||
# else
|
||||
# define SSIZE_T int
|
||||
# endif
|
||||
# endif
|
||||
|
||||
typedef SSIZE_T ssize_t;
|
||||
|
||||
# if defined(_MSC_VER)
|
||||
/* access() mode parameter #defines */
|
||||
# define F_OK 0 /* existence check */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user