Commit 04e88240 by Ramsay Jones

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>
parent 5cae6c25
...@@ -31,13 +31,16 @@ ...@@ -31,13 +31,16 @@
# define snprintf _snprintf # define snprintf _snprintf
# if (defined(_MSC_VER) && defined(_WIN64)) || \ # if defined(__DMC__)
(defined(__DMC__) && defined(_M_AMD64)) # if defined(_M_AMD64)
typedef long long ssize_t; # define SSIZE_T long long
# else # else
typedef int ssize_t; # define SSIZE_T int
# endif
# endif # endif
typedef SSIZE_T ssize_t;
# if defined(_MSC_VER) # if defined(_MSC_VER)
/* access() mode parameter #defines */ /* access() mode parameter #defines */
# define F_OK 0 /* existence check */ # define F_OK 0 /* existence check */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment