Merge from trunk.
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 9 Jul 2011 07:06:04 +0000 (00:06 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 9 Jul 2011 07:06:04 +0000 (00:06 -0700)
1  2 
ChangeLog
configure.in
src/ChangeLog
src/callint.c
src/emacs.c
src/sysdep.c
src/xdisp.c

diff --cc ChangeLog
+++ b/ChangeLog
@@@ -1,20 -1,36 +1,51 @@@
- 2011-07-07  Paul Eggert  <eggert@cs.ucla.edu>
++2011-07-09  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      Assume freestanding C89 headers, string.h, stdlib.h.
 +      Again, this simplifies the code, and all current platforms have these.
 +      * configure.in (AC_CHECK_HEADERS): Don't check for limits.h.
 +      (AC_HEADER_STDC): Remove.
 +      (AC_CHECK_FUNCS): No need to check for strchr, strrchr.
 +      (strchr, strrchr): Remove fallback macros.
 +
- 2011-07-06  Paul Eggert  <eggert@cs.ucla.edu>
 +      Assume support for memcmp, memcpy, memmove, memset.
 +      This simplifies the code a bit.  All current platforms have these,
 +      as they are required for C89.  If this turns into a problem we
 +      can add the gnulib modules for these (a 1-line change to Makefile.in).
 +      * configure.in: Don't check for memcmp, memcpy, memmove, memset.
 +
+ 2011-07-09  Paul Eggert  <eggert@cs.ucla.edu>
+       Add gnulib's strtoimax module, needed on Solaris 8.
+       * Makefile.in (GNULIB_MODULES): Add strtoimax.
+       * lib/strtoll.c, m4/strtoimax.m4, m4/strtoll.m4: New files,
+       automatically imported from gnulib.
+       * lib/gnulib.mk, m4/gl-comp.m4: Regenerate.
+ 2011-07-08  Paul Eggert  <eggert@cs.ucla.edu>
+       Add gnulib support for pthread_sigmask (Bug#9010).
+       * Makefile.in (GNULIB_MODULES): Add pthread_sigmask.
+       * configure.in (AC_TYPE_UID_T): New dummy macro.
+       Configure gnulib after adjusting LIBS,
+       so that gnulib can assume the libraries in LIBS.
+       * lib/signal.in.h, m4/pthread_sigmask.m4, m4/signal_h.m4:
+       * lib/pthread_sigprocmask.c, lib/sigprocmask.c, m4/signalblocking.m4:
+       * lib/pthread_sigmask.c:
+       New files, automatically imported from gnulib.
+       * lib/gnulib.mk, m4/gl-comp.m4: Automatically-imported update
+       due to the above changes.
+       * .bzrignore: Add lib/signal.h.
+       * lib/getopt.c, lib/unistd.in.h, m4/getopt.m4: Merge from gnulib.
+ 2011-07-07  Andreas Schwab  <schwab@linux-m68k.org>
+       * configure.in (maintainer-mode): Reflect default in help string.
+ 2011-07-07  Dan Nicolaescu  <dann@ics.uci.edu>
+       * configure.in: Remove reference to iris4d.h.
  2011-07-05  Jan Djärv  <jan.h.d@swipnet.se>
  
        * configure.in (HAVE_GCONF): Allow both HAVE_GCONF and HAVE_GSETTINGS.
diff --cc configure.in
Simple merge
diff --cc src/ChangeLog
- 2011-07-08  Paul Eggert  <eggert@cs.ucla.edu>
 +2011-07-09  Paul Eggert  <eggert@cs.ucla.edu>
 +
 +      * image.c: Integer signedness and overflow and related fixes.
 +      This is not an exhaustive set of fixes, but it's time to
 +      record what I've got.
 +      (lookup_pixel_color, check_image_size): Remove redundant decls.
 +      (check_image_size): Don't assume that arbitrary EMACS_INT values
 +      fit in 'int', or that arbitrary 'double' values fit in 'int'.
 +      (x_alloc_image_color, x_create_x_image_and_pixmap, png_load)
 +      (tiff_load, imagemagick_load_image):
 +      Check for overflow in size calculations.
 +      (x_create_x_image_and_pixmap): Remove unnecessary test for
 +      xmalloc returning NULL; that can't happen.
 +      (xbm_read_bitmap_data): Don't assume sizes fit into 'int'.
 +      (xpm_color_bucket): Use better integer hashing function.
 +      (xpm_cache_color): Don't possibly over-allocate memory.
 +      (struct png_memory_storage, tiff_memory_source, tiff_seek_in_memory)
 +      (gif_memory_source):
 +      Use ptrdiff_t, not int or size_t, to record sizes.
 +      (png_load): Don't assume values greater than 2**31 fit in 'int'.
 +      (our_stdio_fill_input_buffer): Prefer ptrdiff_t to size_t when
 +      either works, as we prefer signed integers.
 +      (tiff_read_from_memory, tiff_write_from_memory):
 +      Return tsize_t, not size_t, since that's what the TIFF API wants.
 +      (tiff_read_from_memory): Don't fail simply because the read would
 +      go past EOF; instead, return a short read.
 +      (tiff_load): Omit no-longer-needed casts.
 +      (Fimagemagick_types): Don't assume size fits into 'int'.
 +
- 2011-07-07  Paul Eggert  <eggert@cs.ucla.edu>
 +      Improve hashing quality when configured --with-wide-int.
 +      * fns.c (hash_string): New function, taken from sxhash_string.
 +      Do not discard information about ASCII character case; this
 +      discarding is no longer needed.
 +      (sxhash-string): Use it.  Change sig to match it.  Caller changed.
 +      * lisp.h: Declare it.
 +      * lread.c (hash_string): Remove, since we now use fns.c's version.
 +      The fns.c version returns a wider integer if --with-wide-int is
 +      specified, so this should help the quality of the hashing a bit.
 +
- 2011-07-06  Paul Eggert  <eggert@cs.ucla.edu>
 +      * emacs.c: Integer overflow minor fix.
 +      (heap_bss_diff): Now uprintmax_t, not unsigned long.  All used changed.
 +      Define only if GNU_LINUX.
 +      (main, Fdump_emacs): Set and use heap_bss_diff only if GNU_LINUX.
 +
 +      * dispnew.c: Integer signedness and overflow fixes.
 +      Remove unnecessary forward decls, that were a maintenance hassle.
 +      (history_tick): Now uprintmax_t, so it's more likely to avoid overflow.
 +      All uses changed.
 +      (adjust_glyph_matrix, realloc_glyph_pool, adjust_frame_message_buffer)
 +      (scrolling_window): Use ptrdiff_t, not int, for byte count.
 +      (prepare_desired_row, line_draw_cost):
 +      Use int, not unsigned, where either works.
 +      (save_current_matrix, restore_current_matrix):
 +      Use ptrdiff_t, not size_t, where either works.
 +      (init_display): Check for overflow more accurately, and without
 +      relying on undefined behavior.
 +
 +      * editfns.c (pWIDE, pWIDElen, signed_wide, unsigned_wide):
 +      Remove, replacing with the new symbols in lisp.h.  All uses changed.
 +      * fileio.c (make_temp_name):
 +      * filelock.c (lock_file_1, lock_file):
 +      * xdisp.c (message_dolog):
 +      Don't assume PRIdMAX etc. works; this isn't portable to pre-C99 hosts.
 +      Use pMd etc. instead.
 +      * lisp.h (printmax_t, uprintmax_t, pMd, pMu): New types and macros,
 +      replacing the pWIDE etc. symbols removed from editfns.c.
 +
 +      * keyboard.h (num_input_events): Now uintmax_t.
 +      This is (very slightly) less likely to mess up due to wraparound.
 +      All uses changed.
 +
 +      * buffer.c: Integer signedness fixes.
 +      (alloc_buffer_text, enlarge_buffer_text):
 +      Use ptrdiff_t rather than size_t when either will do, as we prefer
 +      signed integers.
 +
 +      * bidi.c: Integer signedness and overflow fixes.
 +      (bidi_cache_idx, bidi_cache_last_idx, bidi_cache_fetch_state)
 +      (bidi_cache_search, bidi_cache_find_level_change)
 +      (bidi_cache_iterator_state, bidi_cache_find, bidi_find_other_level_edge)
 +      (bidi_dump_cached_states):
 +      Don't arbitrarily limit cache indexes to int; use ptrdiff_t instead.
 +      (bidi_cache_size): Use ptrdiff_t rather than size_t, as we prefer
 +      signed integers.
 +      (elsz): Make it a (signed) constant.
 +      (bidi_cache_iterator_state): Check for size-calculation overflow.
 +
 +      * alloc.c: Integer signedness and overflow fixes.
 +      Do not impose an arbitrary 32-bit limit on malloc sizes when debugging.
 +      (__malloc_size_t): Default to size_t, not to int.
 +      (pure_size, pure_bytes_used_before_overflow, stack_copy_size)
 +      (Fgarbage_collect, mark_object_loop_halt, mark_object):
 +      Prefer ptrdiff_t to size_t when either would do, as we prefer
 +      signed integers.
 +      (XMALLOC_OVERRUN_CHECK_OVERHEAD): New macro.
 +      (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer):
 +      Now const.  Initialize with values that are in range even if char
 +      is signed.
 +      (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): Remove, replacing with ...
 +      (xmalloc_put_size, xmalloc_get_size): New functions.  All uses changed.
 +      These functions do the right thing with sizes > 2**32.
 +      (check_depth): Now ptrdiff_t, not int.
 +      (overrun_check_malloc, overrun_check_realloc, overrun_check_free):
 +      Adjust to new way of storing sizes.  Check for size overflow bugs
 +      in rest of code.
 +      (STRING_BYTES_MAX): Adjust to new overheads.  The old code was
 +      slightly wrong anyway, as it missed one instance of
 +      XMALLOC_OVERRUN_CHECK_OVERHEAD.
 +      (refill_memory_reserve): Omit needless cast to size_t.
 +      (mark_object_loop_halt): Mark as externally visible.
 +
 +      * xselect.c: Integer signedness and overflow fixes.
 +      (Fx_register_dnd_atom, x_handle_dnd_message):
 +      Use ptrdiff_t, not size_t, since we prefer signed.
 +      (Fx_register_dnd_atom): Check for ptrdiff_t (and size_t) overflow.
 +      * xterm.h (struct x_display_info): Use ptrdiff_t, not size_t, for
 +      x_dnd_atoms_size and x_dnd_atoms_length.
 +
 +      * doprnt.c: Prefer signed to unsigned when either works.
 +      * eval.c (verror):
 +      * doprnt.c (doprnt):
 +      * lisp.h (doprnt):
 +      * xdisp.c (vmessage):
 +      Use ptrdiff_t, not size_t, when using or implementing doprnt,
 +      since the sizes cannot exceed ptrdiff_t bounds anyway, and we
 +      prefer signed arithmetic to avoid comparison confusion.
 +      * doprnt.c (doprnt): Avoid a "+ 1" that can't overflow,
 +      but is a bit tricky.
 +
 +      Assume freestanding C89 headers, string.h, stdlib.h.
 +      * data.c, doprnt.c, floatfns.c, print.c:
 +      Include float.h unconditionally.
 +      * gmalloc.c: Assume C89-at-least behavior for preprocessor,
 +      limits.h, stddef.h, string.h.  Use memset instead of 'flood'.
 +      * regex.c: Likewise for stddef.h, string.h.
 +      (ISASCII): Remove; can assume it returns 1 now.  All uses removed.
 +      * s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef.
 +      * s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
 +      (STDC_HEADERS): Remove obsolete defines.
 +      * sysdep.c: Include limits.h unconditionally.
 +
 +      Assume support for memcmp, memcpy, memmove, memset.
 +      * lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
 +      * regex.c (memcmp, memcpy):
 +      Remove; we assume C89 now.
 +
 +      * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
 +      (__malloc_safe_bcopy): Remove; no longer needed.
 +
 +      * lisp.h (struct vectorlike_header, struct Lisp_Subr):  Signed sizes.
 +      Use EMACS_INT, not EMACS_UINT, for sizes.  The code works equally
 +      well either way, and we prefer signed to unsigned.
 +
+ 2011-07-08  Paul Eggert  <eggert@cs.ucla.edu>
+       Use pthread_sigmask, not sigprocmask (Bug#9010).
+       sigprocmask is portable only for single-threaded applications, and
+       Emacs can be multi-threaded when it uses GTK.
+       * Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
+       (LIBES): Use it.
+       * callproc.c (Fcall_process):
+       * process.c (create_process):
+       * sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask):
+       Use pthread_sigmask, not sigprocmask.
+ 2011-07-08  Jan Djärv  <jan.h.d@swipnet.se>
+       * gtkutil.c (qttip_cb): Set line wrap to FALSE for tooltip widget.
+       (xg_prepare_tooltip): Revert text in x->ttip_lbl, margins was
+       wrong (Bug#8591).
+ 2011-07-08  Jan Djärv  <jan.h.d@swipnet.se>
+       * gtkutil.c (xg_prepare_tooltip): Fix indentation and comment.
+       Put text in x->ttip_lbl instead of gtk_tooltip_set_text (Bug#8591).
+       (xg_hide_tooltip): Fix comment.
+       * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
+       in registerServicesMenuSendTypes.
+       (validRequestorForSendType): Don't check ns_return_types.
+       * nsfns.m (Fx_open_connection): Put NSStringPboardType into
+       ns_return_type.
+ 2011-07-08  Jason Rumney  <jasonr@gnu.org>
+       * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
+       frame struct members of non-existent frames (Bug#6284).
+ 2011-07-08  Jan Djärv  <jan.h.d@swipnet.se>
+       * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
+       variable firstTime not needed on OSX >= 10.6.
+       (setPosition): setFloatValue:knobProportion: is deprecated on OSX
+       >= 10.5.  Use setKnobProportion, setDoubleValue.
+       * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
+       (MAC_OS_X_VERSION_10_5): Define if not defined.
+       (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
+       (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
+       (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
+       * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
+       cString and lossyCString on OSX >= 10.4
+       * nsmenu.m (fillWithWidgetValue): Don't use depercated method
+       sizeToFit on OSX >= 10.2.
+       * nsimage.m (allocInitFromFile): Don't use deprecated method
+       bestRepresentationForDevice on OSX >= 10.6.
+       * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
+       to avoid warning.
+       * emacs.c: Declare unexec_init_emacs_zone.
+       * nsgui.h: Fix compiler warning about gnulib redefining verify.
+       * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
+       * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
+       on svcsMenu (Bug#8842).
+       * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
+       ns_return_types.
+       (Fns_list_services): Just return Qnil on 10.6, code not working there.
+       * nsterm.m (QUTF8_STRING): Declare.
+       (initFrameFromEmacs): Call registerServicesMenuSendTypes.
+       (validRequestorForSendType): Return type is (id).
+       Change indexOfObjectIdenticalTo to indexOfObject.
+       Check if we have local selection before returning self (Bug#8842).
+       (writeSelectionToPasteboard): Put local selection into paste board
+       if we have a local selection (Bug#8842).
+       (syms_of_nsterm): DEFSYM QUTF8_STRING.
+       * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
+       (ns_get_local_selection): Declare.
+ 2011-07-07  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+       * keymap.c (describe_map_tree): Don't insert a double newline at
+       the end of the buffer (bug#1169) and return whether we inserted
+       something.
+       * callint.c (Fcall_interactively): Change "reading args" to
+       "providing args" to try to clarify what it does (bug#1010).
+ 2011-07-07  Kenichi Handa  <handa@m17n.org>
+       * composite.c (composition_compute_stop_pos): Ignore a static
+       composition starting before CHARPOS (Bug#8915).
+       * xdisp.c (handle_composition_prop): Likewise.
+ 2011-07-07  Eli Zaretskii  <eliz@gnu.org>
+       * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what.
+       (Bug#9015)
+ 2011-07-07  Kenichi Handa  <handa@m17n.org>
+       * character.h (unicode_category_t): New enum type.
+       * chartab.c (uniprop_decoder_t, uniprop_encoder_t): New types.
+       (Qchar_code_property_table): New variable.
+       (UNIPROP_TABLE_P, UNIPROP_GET_DECODER)
+       (UNIPROP_COMPRESSED_FORM_P): New macros.
+       (char_table_ascii): Uncompress the compressed values.
+       (sub_char_table_ref): New arg is_uniprop.  Callers changed.
+       Uncompress the compressed values.
+       (sub_char_table_ref_and_range):  Likewise.
+       (char_table_ref_and_range): Uncompress the compressed values.
+       (sub_char_table_set): New arg is_uniprop.  Callers changed.
+       Uncompress the compressed values.
+       (sub_char_table_set_range): Args changed.  Callers changed.
+       (char_table_set_range): Adjuted for the above change.
+       (map_sub_char_table): Delete args default_val and parent.  Add arg
+       top.  Give decoded values to a Lisp function.
+       (map_char_table): Adjusted for the above change.  Give decoded
+       values to a Lisp function.  Gcpro more variables.
+       (uniprop_table_uncompress)
+       (uniprop_decode_value_run_length): New functions.
+       (uniprop_decoder, uniprop_decoder_count): New variables.
+       (uniprop_get_decoder, uniprop_encode_value_character)
+       (uniprop_encode_value_run_length, uniprop_encode_value_numeric):
+       New functions.
+       (uniprop_encoder, uniprop_encoder_count): New variables.
+       (uniprop_get_encoder, uniprop_table)
+       (Funicode_property_table_internal, Fget_unicode_property_internal)
+       (Fput_unicode_property_internal): New functions.
+       (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
+       Sunicode_property_table_internal, Sget_unicode_property_internal,
+       and Sput_unicode_property_internal. Defvar_lisp
+       char-code-property-alist.
+       * composite.c (CHAR_COMPOSABLE_P): Adjusted for the change of
+       Vunicode_category_table.
+       * font.c (font_range): Adjusted for the change of
+       Vunicode_category_table.
+ 2011-07-07  Dan Nicolaescu  <dann@ics.uci.edu>
+       * m/iris4d.h: Remove file, move contents ...
+       * s/irix6-5.h: ... here.
  2011-07-06  Paul Eggert  <eggert@cs.ucla.edu>
  
        Remove unportable assumption about struct layout (Bug#8884).
diff --cc src/callint.c
Simple merge
diff --cc src/emacs.c
Simple merge
diff --cc src/sysdep.c
Simple merge
diff --cc src/xdisp.c
Simple merge