windows: omit stdint.h, fix msvc 2008 build error

Don't include <stdint.h>, it's not available when compiling with MSVC
2008 and we don't need it in the first place - just cast the argument
to `char *` rather than `uintptr_t`.

Fixes #893.
This commit is contained in:
Ben Noordhuis 2013-08-20 14:05:25 +02:00
parent 303ae3b958
commit 8531046a86

View File

@ -16,8 +16,6 @@
#ifndef QUEUE_H_
#define QUEUE_H_
#include <stdint.h>
typedef void *QUEUE[2];
/* Private macros. */
@ -28,7 +26,7 @@ typedef void *QUEUE[2];
/* Public macros. */
#define QUEUE_DATA(ptr, type, field) \
((type *) ((char *) (ptr) - ((uintptr_t) &((type *) 0)->field)))
((type *) ((char *) (ptr) - ((char *) &((type *) 0)->field)))
#define QUEUE_FOREACH(q, h) \
for ((q) = (QUEUE *) (*(h))[0]; (q) != (h); (q) = (QUEUE *) (*(q))[0])