src: polyfill the 'include' keyword for Visual Studio 2013
This commit is contained in:
parent
450292aebc
commit
99ce867424
@ -2,6 +2,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "queue.h"
|
||||
#include "util.h"
|
||||
|
||||
void queue_init(queue_t* queue) {
|
||||
queue_node_init(&queue->head);
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
#include "error.h"
|
||||
#include "rb.h"
|
||||
#include "tree.h"
|
||||
#include "util.h"
|
||||
|
||||
static inline int _tree_compare(tree_node_t* a, tree_node_t* b) {
|
||||
if (a->key < b->key)
|
||||
|
||||
@ -20,6 +20,11 @@ typedef intptr_t ssize_t;
|
||||
|
||||
#define unused(v) ((void) (v))
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
/* Polyfill `inline` for msvc 12 (Visual Studio 2013) */
|
||||
#define inline __inline
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
/* Polyfill static_assert() because clang doesn't support it. */
|
||||
#define static_assert(condition, message) typedef __attribute__( \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user