2011-06-09 Paul Eggert <eggert@cs.ucla.edu>
+ * buffer.h (PTR_BYTE_POS): Don't assume a byte count fits in 'unsigned'.
+
* buffer.c (Fgenerate_new_buffer_name): Use EMACS_INT for count, not int.
(advance_to_char_boundary): Return EMACS_INT, not int.
#define PTR_BYTE_POS(ptr) \
((ptr) - (current_buffer)->text->beg \
- - (ptr - (current_buffer)->text->beg <= (unsigned) (GPT_BYTE - BEG_BYTE) ? 0 : GAP_SIZE) \
+ - (ptr - (current_buffer)->text->beg <= (size_t) (GPT_BYTE - BEG_BYTE) ? 0 : GAP_SIZE) \
+ BEG_BYTE)
/* Return character at byte position POS. */