mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-21 19:41:44 +00:00
handle ssize_t issues with MSVC better
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1600 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
65ce5e3ae7
commit
481d47f389
4 changed files with 19 additions and 7 deletions
|
@ -28,6 +28,13 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
/* This is for Visual Studio, so this header works as distributed in the binary downloads */
|
||||
#if defined(_MSC_VER) && !defined(MPG123_DEF_SSIZE_T)
|
||||
#define MPG123_DEF_SSIZE_T
|
||||
#include <stddef.h>
|
||||
typedef ptrdiff_t ssize_t;
|
||||
#endif
|
||||
|
||||
#ifndef MPG123_NO_CONFIGURE /* Enable use of this file without configure. */
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
|
|
|
@ -173,14 +173,10 @@ typedef int fixed16_t;
|
|||
|
||||
/*==========================================================================*/
|
||||
|
||||
/* missing types */
|
||||
/* missing types: */
|
||||
#if defined(_MSC_VER)
|
||||
#if defined(_WIN64)
|
||||
#define ssize_t SSIZE_T
|
||||
#else
|
||||
typedef int ssize_t;
|
||||
#endif /* _WIN64 */
|
||||
#endif /* _MSC_VER */
|
||||
typedef ptrdiff_t ssize_t;
|
||||
#endif
|
||||
|
||||
/*==========================================================================*/
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
#include "snd_codeci.h"
|
||||
#include "snd_mp3.h"
|
||||
#include <errno.h>
|
||||
|
||||
#define MPG123_DEF_SSIZE_T /* we do define ssize_t in our stdinc.h */
|
||||
#include <mpg123.h>
|
||||
|
||||
#if !defined(MPG123_API_VERSION) || (MPG123_API_VERSION < 24)
|
||||
|
|
|
@ -28,6 +28,13 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
/* This is for Visual Studio, so this header works as distributed in the binary downloads */
|
||||
#if defined(_MSC_VER) && !defined(MPG123_DEF_SSIZE_T)
|
||||
#define MPG123_DEF_SSIZE_T
|
||||
#include <stddef.h>
|
||||
typedef ptrdiff_t ssize_t;
|
||||
#endif
|
||||
|
||||
#ifndef MPG123_NO_CONFIGURE /* Enable use of this file without configure. */
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
|
|
Loading…
Reference in a new issue