Fix compile error on 32-bit systems

This commit is contained in:
Tatsuhiro Tsujikawa 2014-04-06 17:34:44 +09:00
parent 1c00e715a3
commit 1aa69e334d
1 changed files with 6 additions and 6 deletions

View File

@ -50,13 +50,13 @@ typedef struct {
uint8_t *mark; uint8_t *mark;
} nghttp2_buf; } nghttp2_buf;
#define nghttp2_buf_len(BUF) ((BUF)->last - (BUF)->pos) #define nghttp2_buf_len(BUF) ((ssize_t)((BUF)->last - (BUF)->pos))
#define nghttp2_buf_avail(BUF) ((BUF)->end - (BUF)->last) #define nghttp2_buf_avail(BUF) ((ssize_t)((BUF)->end - (BUF)->last))
#define nghttp2_buf_mark_avail(BUF) ((BUF)->mark - (BUF)->last) #define nghttp2_buf_mark_avail(BUF) ((ssize_t)((BUF)->mark - (BUF)->last))
#define nghttp2_buf_cap(BUF) ((BUF)->end - (BUF)->begin) #define nghttp2_buf_cap(BUF) ((ssize_t)((BUF)->end - (BUF)->begin))
#define nghttp2_buf_pos_offset(BUF) ((BUF)->pos - (BUF)->begin) #define nghttp2_buf_pos_offset(BUF) ((ssize_t)((BUF)->pos - (BUF)->begin))
#define nghttp2_buf_last_offset(BUF) ((BUF)->last - (BUF)->begin) #define nghttp2_buf_last_offset(BUF) ((ssize_t)((BUF)->last - (BUF)->begin))
#define nghttp2_buf_shift_right(BUF, AMT) \ #define nghttp2_buf_shift_right(BUF, AMT) \
do { \ do { \