Fix c89 'keyword is hidden by macro definition' with clang.

This commit is contained in:
orbea 2018-12-16 07:41:59 -08:00
parent 6e95a62fdf
commit d40da6aca3
4 changed files with 7 additions and 7 deletions

View File

@ -45,7 +45,7 @@
#define STB_RECT_PACK_VERSION 1
#ifdef STBRP_STATIC
#define STBRP_DEF static
#define STBRP_DEF STATIC
#else
#define STBRP_DEF extern
#endif
@ -498,7 +498,7 @@ static int rect_height_compare(const void *a, const void *b)
return (p->w > q->w) ? -1 : (p->w < q->w);
}
static int rect_width_compare(const void *a, const void *b)
STBRP_DEF int rect_width_compare(const void *a, const void *b)
{
stbrp_rect *p = (stbrp_rect *) a;
stbrp_rect *q = (stbrp_rect *) b;

View File

@ -288,7 +288,7 @@
#define __STB_INCLUDE_STB_TRUETYPE_H__
#ifdef STBTT_STATIC
#define STBTT_DEF static
#define STBTT_DEF STATIC
#else
#define STBTT_DEF extern
#endif

View File

@ -28,10 +28,10 @@
#define STB_RECT_PACK_IMPLEMENTATION
#define STBTT_STATIC
#define STBRP_STATIC
#define static static INLINE
#define STATIC static INLINE
#include "../../deps/stb/stb_rect_pack.h"
#include "../../deps/stb/stb_truetype.h"
#undef static
#undef STATIC
#endif
typedef struct

View File

@ -32,10 +32,10 @@
#define STB_RECT_PACK_IMPLEMENTATION
#define STBTT_STATIC
#define STBRP_STATIC
#define static static INLINE
#define STATIC static INLINE
#include "../../deps/stb/stb_rect_pack.h"
#include "../../deps/stb/stb_truetype.h"
#undef static
#undef STATIC
#endif
#define STB_UNICODE_ATLAS_ROWS 16