mirror of
https://github.com/nothings/stb
synced 2025-03-14 16:21:12 -04:00
add C99 version test
This commit is contained in:
parent
358a74c890
commit
a30e2e764e
12
stb_image.h
12
stb_image.h
@ -325,10 +325,16 @@ typedef unsigned short stbi_us;
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(STB_IMAGE_STATIC) && defined(STB_IMAGE_INLINE)
|
||||
#define STBIDEF static inline
|
||||
#elif defined(STB_IMAGE_STATIC)
|
||||
#ifdef STB_IMAGE_STATIC
|
||||
#define STBIDEF static
|
||||
#elif defined(STB_IMAGE_INLINE)
|
||||
#ifdef __cplusplus
|
||||
#define STBIDEF inline
|
||||
#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#define STBIDEF inline
|
||||
#else
|
||||
#error "inline not supported."
|
||||
#endif
|
||||
#else
|
||||
#define STBIDEF extern
|
||||
#endif
|
||||
|
@ -191,17 +191,23 @@ typedef uint16_t stbir_uint16;
|
||||
typedef uint32_t stbir_uint32;
|
||||
#endif
|
||||
|
||||
#if defined(STB_IMAGE_RESIZE_STATIC) && defined(STB_IMAGE_RESIZE_INLINE)
|
||||
#define STBIRDEF static inline
|
||||
#elif defined(STB_IMAGE_RESIZE_STATIC)
|
||||
#define STBIRDEF static
|
||||
#else
|
||||
#ifdef __cplusplus
|
||||
#define STBIRDEF extern "C"
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef STB_IMAGE_RESIZE_STATIC
|
||||
#define STBIRDEF static
|
||||
#elif defined(STB_IMAGE_RESIZE_INLINE)
|
||||
#ifdef __cplusplus
|
||||
#define STBIRDEF inline
|
||||
#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#define STBIRDEF inline
|
||||
#else
|
||||
#error "inline not supported."
|
||||
#endif
|
||||
#else
|
||||
#define STBIRDEF extern
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
@ -2581,6 +2587,10 @@ STBIRDEF int stbir_resize_region( const void *input_pixels , int input_w , int
|
||||
edge_mode_horizontal, edge_mode_vertical, space);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // STB_IMAGE_RESIZE_IMPLEMENTATION
|
||||
|
||||
/*
|
||||
|
@ -119,11 +119,18 @@ LICENSE
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(STB_IMAGE_WRITE_STATIC) && defined(STB_IMAGE_WRITE_INLINE)
|
||||
#define STBIWDEF static inline
|
||||
|
||||
#ifdef STB_IMAGE_WRITE_INLINE
|
||||
#ifdef __cplusplus
|
||||
#define STBIWDEF inline
|
||||
#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#define STBIWDEF inline
|
||||
#elif defined(STB_IMAGE_WRITE_STATIC)
|
||||
#define STBIWDEF static
|
||||
#else
|
||||
#error "inline not supported."
|
||||
#endif
|
||||
#else
|
||||
#define STBIWDEF extern
|
||||
extern int stbi_write_tga_with_rle;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user