Accommodate some changes to 'ssize_t' in VS2019
In more recent versions of MSVC, ssize_t equates to 'long' (for a 32-bit build) or '__int64' (for 64-bit)
This commit is contained in:
parent
166ac63924
commit
952416c596
@ -32,8 +32,11 @@
|
|||||||
#include "midi++/parser.h"
|
#include "midi++/parser.h"
|
||||||
|
|
||||||
#ifndef __INT_MAX__ // 'ssize_t' won't be defined yet
|
#ifndef __INT_MAX__ // 'ssize_t' won't be defined yet
|
||||||
|
// (except in later versions of MSVC)
|
||||||
|
#if !defined (_MSC_VER) || (_MSC_VER < 1800)
|
||||||
typedef long ssize_t;
|
typedef long ssize_t;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace MIDI;
|
using namespace MIDI;
|
||||||
|
@ -154,11 +154,20 @@ typedef int (FAR PBDEXTN_APICALLTYPE *CYGINIT_API)(unsigned int);
|
|||||||
|
|
||||||
#ifndef _SSIZE_T_
|
#ifndef _SSIZE_T_
|
||||||
#define _SSIZE_T_
|
#define _SSIZE_T_
|
||||||
|
|
||||||
|
#ifdef SSIZE_T
|
||||||
|
typedef SSIZE_T _ssize_t;
|
||||||
|
#elif _MSC_VER < 1800
|
||||||
typedef long _ssize_t;
|
typedef long _ssize_t;
|
||||||
|
#else
|
||||||
|
#include <basetsd.h>
|
||||||
|
typedef LONG_PTR _ssize_t; // AFAICT - LONG_PTR is equivalent to 'long' in Win32 and '__int64' in Win64 !!
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef _NO_OLDNAMES
|
#ifndef _NO_OLDNAMES
|
||||||
typedef _ssize_t ssize_t;
|
typedef _ssize_t ssize_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* ! _SSIZE_T_ */
|
#endif /* ! _SSIZE_T_ */
|
||||||
|
|
||||||
typedef unsigned int nfds_t;
|
typedef unsigned int nfds_t;
|
||||||
|
Loading…
Reference in New Issue
Block a user