MinGW-w64: No need to define 'ssize_t'

This will trigger a collision on MinGW-w64.

Define this instead for Microsoft's compiler.

We should probably have a compile time check instead.
This commit is contained in:
João Valverde 2021-09-20 15:28:00 +01:00 committed by Guy Harris
parent f3dbfa3bdf
commit 2f7e3f1d82
1 changed files with 6 additions and 4 deletions

View File

@ -288,16 +288,18 @@
/* Note: not use in the code */
#cmakedefine YYTEXT_POINTER
#if defined(_MSC_VER)
# if !defined(QT_VERSION) || !defined(_SSIZE_T_DEFINED)
typedef int ssize_t;
# endif
#endif
#if defined(_WIN32)
/* WpdPack/INclude/pcap/pcap.h checks for "#if defined(WIN32)" */
# ifndef WIN32
# define WIN32 1
# endif
# if !defined(QT_VERSION) || !defined(_SSIZE_T_DEFINED)
typedef int ssize_t;
# endif
/*
* Flex (v 2.5.35) uses this symbol to "exclude" unistd.h
*/