Commit Graph

5 Commits

Author SHA1 Message Date
Ben Noordhuis
0520464870 queue: strengthen type checks
Rewrite some of the macros in a way that:

  a) makes them more likely to trigger compile-time errors if used
     inappropriately, and

  b) makes C++ compilers happy
2013-11-02 13:55:57 +01:00
Ben Noordhuis
8531046a86 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.
2013-08-20 14:06:35 +02:00
Bert Belder
7d8504cf69 queue: fix pointer truncation on LLP64 platforms
QUEUE_DATA used to cast a pointer to long and back to pointer. This can
corrupt pointers on systems where the long type isn't large enough to
store pointer, like Windows x64. This commit fixes that.

Fixes #835
2013-06-15 14:08:36 +02:00
Ben Noordhuis
c766dfe815 src: make queue.h c++ compatible
Squelch a warning about a cast from void* to another pointer type.
It's legal C but not legal C++. Makes queue.h usable in node.js.
2013-06-04 12:20:40 +02:00
Ben Noordhuis
0635e29714 unix, windows: remove ngx-queue.h
Avoids an extra #include in public headers and stops the ngx_queue_*
types and macros from leaking into user code.
2013-03-27 00:09:36 +01:00