vgmstream/src/streamtypes.h

45 lines
746 B
C
Raw Normal View History

/*
* streamtypes.h - widely used type definitions
*/
#ifndef _STREAMTYPES_H
#define _STREAMTYPES_H
2023-05-15 16:52:09 +02:00
#include <stddef.h> //size_t
#include <stdbool.h> //bool
#ifdef _MSC_VER
2019-10-20 23:51:06 +02:00
/* Common versions:
* - 1500: VS2008
* - 1600: VS2010
* - 1700: VS2012
* - 1800: VS2013
* - 1900: VS2015
* - 1920: VS2019 */
2017-01-02 15:43:10 +01:00
2023-05-15 16:52:09 +02:00
#if (_MSC_VER >= 1600)
#include <stdint.h>
#else
#include <pstdint.h>
#endif
2019-10-20 23:51:06 +02:00
2023-05-15 16:52:09 +02:00
#if (_MSC_VER < 1800) && !defined(__cplusplus)
#define inline __inline
#endif
2017-01-02 15:43:10 +01:00
2023-05-15 16:52:09 +02:00
#define strcasecmp _stricmp
#define strncasecmp _strnicmp
2017-01-02 15:43:10 +01:00
2023-05-15 16:52:09 +02:00
#if (_MSC_VER < 1900)
#define snprintf _snprintf
#endif
#else
2023-05-15 16:52:09 +02:00
#include <stdint.h>
2019-10-20 23:51:06 +02:00
2017-01-02 15:43:10 +01:00
#endif /* _MSC_VER */
typedef int16_t sample; //TODO: deprecated, remove
typedef int16_t sample_t;
#endif