-2011-04-09 Paul Eggert <eggert@cs.ucla.edu>
+2011-04-13 Paul Eggert <eggert@cs.ucla.edu>
+
+ * sysdep.c (MAX_RW_COUNT): New macro, to work around kernel bugs.
+ (emacs_read, emacs_write): Use it.
+
+ * process.c (send_process): Count partial writes as successes.
+ See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html
+
+ emacs_write: Return size_t, not ssize_t, to avoid overflow issues.
+ * gnutls.c, gnutls.h (emacs_gnutls_write): Return size_t, not ssize_t.
+ * sysdep.c, lisp.h (emacs_write): Likewise.
+ Without the above change, emacs_gnutls_write and emacs_write had
+ undefined behavior and would typically mistakenly report an error
+ when writing a buffer whose size exceeds SSIZE_MAX.
+ (emacs_read, emacs_write): Remove check for negative size, as the
+ Emacs source code has been audited now.
+ (emacs_write): Adjust to new signature, making the code look more
+ like that of emacs_gnutls_write.
+ * process.c (send_process): Adjust to the new signatures of
+ emacs_write and emacs_gnutls_write. Do not attempt to store
+ a byte offset into an 'int'; it might overflow.
+
+ * sound.c: Don't assume sizes fit in 'int'.
+ (struct sound_device.period_size, alsa_period_size):
+ Return size_t, not int.
+ (struct sound_device.write, vox_write, alsa_write):
+ Accept size_t, not int.
+ (wav_play, au_play): Use size_t to store sizes, and ssize_t to
+ record read return values.
+
+2011-04-12 Andreas Schwab <schwab@linux-m68k.org>
+
+ * charset.c (Fclear_charset_maps): Use xfree instead of free.
+ (Bug#8437)
+ * keyboard.c (parse_tool_bar_item): Likewise.
+ * sound.c (sound_cleanup, alsa_close): Likewise.
+ * termcap.c (tgetent): Likewise.
+ * xfns.c (x_default_font_parameter): Likewise.
+ * xsettings.c (read_and_apply_settings): Likewise.
+
+ * alloc.c (overrun_check_malloc, overrun_check_realloc)
+ (overrun_check_free): Protoize.
+
+2011-04-12 Paul Eggert <eggert@cs.ucla.edu>
+
+ * sysdep.c (emacs_read, emacs_write): Check for negative sizes
+ since callers should never pass a negative size.
+ Change the signature to match that of plain 'read' and 'write'; see
+ <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00397.html>.
+ * lisp.h: Update prototypes of emacs_write and emacs_read.
+
+2011-04-11 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (redisplay_window): Don't try to determine the character
+ position of the scroll margin if the window start point w->startp
+ is outside the buffer's accessible region. (Bug#8468)
+
+2011-04-10 Eli Zaretskii <eliz@gnu.org>
+
+ Fix write-region and its subroutines for buffers > 2GB.
+ * fileio.c (a_write, e_write): Modify declaration of arguments and
+ local variables to support buffers larger than 2GB.
+ (Fcopy_file): Use EMACS_INT for return value of emacs_read.
+
+ * sysdep.c (emacs_write, emacs_read): Use ssize_t for last
+ argument, local variables, and return value.
+
+ * lisp.h: Update prototypes of emacs_write and emacs_read.
+
+ * sound.c (vox_write): Use ssize_t for return value of emacs_write.
+
+2011-04-10 Paul Eggert <eggert@cs.ucla.edu>
+
+ * xdisp.c (vmessage): Use memchr, not strnlen, which some hosts lack.
+
+ Fix more problems found by GCC 4.6.0's static checks.
+
+ * xdisp.c (vmessage): Use a better test for character truncation.
+
+ * charset.c (load_charset_map): <, not <=, for optimization,
+ and to avoid potential problems with integer overflow.
+ * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
+ * casetab.c (set_identity, shuffle): Likewise.
+ * editfns.c (Fformat): Likewise.
+ * syntax.c (skip_chars): Likewise.
+
+ * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
+ This also lets GCC 4.6.0 generate slightly better loop code.
+
+ * callint.c (Fcall_interactively): <, not <=, for optimization.
+ (Fcall_interactively): Count the number of arguments produced,
+ not the number of arguments given. This is simpler and lets GCC
+ 4.6.0 generate slightly better code.
* ftfont.c: Distingish more carefully between FcChar8 and char.
The previous code passed unsigned char * to a functions like
* eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
- Remove the doprnt implementation, as Emacs now uses vsnprintf.
- * doprnt.c: Remove.
+ Remove invocations of doprnt, as Emacs now uses vsnprintf.
+ But keep the doprint source code for now, as we might revamp it
+ and use it again (Bug#8435).
* lisp.h (doprnt): Remove.
* Makefile.in (base_obj): Remove doprnt.o.
* deps.mk (doprnt.o): Remove.
* xdisp.c, lisp.h (message_nolog): Remove; unused.
+2011-04-10 Jim Meyering <meyering@redhat.com>
+
+ use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
+ * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
+ return ssize_t not "int", and use size_t as the buffer length.
+ (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
+ * gnutls.h: Update declarations.
+ * process.c (read_process_output): Use ssize_t, to match.
+ (send_process): Likewise.
+
+2011-04-09 Chong Yidong <cyd@stupidchicken.com>
+
+ * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
+
2011-04-09 Chong Yidong <cyd@stupidchicken.com>
* ftfont.c (get_adstyle_property, ftfont_pattern_entity): Use
* xselect.c (x_decline_selection_request)
(x_reply_selection_request): Avoid type-punned deref of X events.
-2011-04-09 Eli Zaretskii <eliz@emacstest.gnu.org>
+2011-04-09 Eli Zaretskii <eliz@gnu.org>
Fix some uses of `int' instead of EMACS_INT.
* search.c (string_match_1, fast_string_match)