Rename init_process rather than working around it on Darwin
[bpt/emacs.git] / src / ChangeLog
index 584d6a3..8383cf1 100644 (file)
@@ -1,5 +1,330 @@
+2012-07-12  Glenn Morris  <rgm@gnu.org>
+
+
+       * process.c (init_process_emacs): Rename from init_process.
+       The old name is also the name of a Mach system call.
+       * lisp.h, emacs.c: Update for this name change.
+       * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
+       longer needed.
+
+2012-07-12  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
+       memmove call that removes glyphs covered by the left truncation
+       glyph.  Improve commentary.
+       (display_line): Fix display of continuation glyphs on GUI frames
+       when the right fringe is turned off and variable-size fonts are
+       used in the window.  Move the code that appends a stretch glyph to
+       produce_special_glyphs, so that it could be used for truncation
+       and continuation glyphs alike.
+       (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
+       glyph of a suitably computed width, to align the special glyphs at
+       the window margin.  Code moved from display_line.  (Bug#11832)
+
+2012-07-12  Glenn Morris  <rgm@gnu.org>
+
+       * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
+
+       * s/gnu-linux.h, s/hpux10-20.h:
+       Do not unconditionally define HAVE_XRMSETDATABASE.
+
+       * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
+
+2012-07-12  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Fix typos that broke OS X build.
+       Reported by Randal L. Schwartz in
+       <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
+       * nsterm.m (ns_timeout): Add missing local decl.
+       (ns_get_color): snprintf -> sprintf, to fix typo.
+
+2012-07-12  Glenn Morris  <rgm@gnu.org>
+
+       * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
+       * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
+       * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
+       Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
+
+       * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
+       Move PTY_OPEN to configure.
+
+       * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
+       * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
+       * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
+
+2012-07-12  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Use empty_unibyte_string where applicable.
+       * keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
+       * lread.c (read1): Likewise.
+       * xsettings.c (syms_of_xsettings): Likewise.
+
+2012-07-12  Glenn Morris  <rgm@gnu.org>
+
+       * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
+       * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
+       * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
+       * s/hpux10-20.h (RUN_TIME_REMAP):
+       * s/bsd-common.h (TABDLY): Move to configure.
+
+       * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
+
+       * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
+
+       * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
+       (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
+
+       * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
+
+       * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
+       * s/template.h: Move NARROWPROTO to configure.
+
+2012-07-11  Glenn Morris  <rgm@gnu.org>
+
+       * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
+       unused since 2011-01-17 change to systty.h.
+
+       * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
+       * s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
+       Move HAVE_PTYS and HAVE_SOCKETS to configure.
+
+2012-07-11  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * s/sol2-6.h (HAVE_LIBKSTAT): Remove.  (Bug#11914)
+
+2012-07-11  Glenn Morris  <rgm@gnu.org>
+
+       * s/darwin.h, s/gnu-linux.h, s/template.h:
+       Move INTERRUPT_INPUT to configure.
+
+2012-07-11  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Minor adjustments to interning code.
+       * lisp.h (intern, intern_c_string): Redefine as static inline
+       wrappers for intern_1 and intern_c_string_1, respectively.
+       (intern_1, intern_c_string_1): Rename prototypes.
+       * lread.c (intern_1, intern_c_string_1, oblookup): Simplify
+       Vobarray checking.
+       * font.c (font_intern_prop): Likewise.  Adjust comment.
+       * w32font.c (intern_font_name): Likewise.
+
+2012-07-11  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
+
+       * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
+       of Fcar/Fcdr if possible.
+       * font.c (check_otf_features): Likewise.
+       * fontset.c (Fnew_fontset): Likewise.
+       * gnutls.c (Fgnutls_boot): Likewise.
+       * minibuf.c (read_minibuf): Likewise.
+       * msdos.c (IT_set_frame_parameters): Likewise.
+       * xmenu.c (Fx_popup_dialog): Likewise.
+       * w32menu.c (Fx_popup_dialog): Likewise.
+
+2012-07-11  Glenn Morris  <rgm@gnu.org>
+
+       * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
+       since nothing has defined it on these platforms.
+
+       * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
+       * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.
+
+       * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
+       * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
+       Move CLASH_DETECTION to configure.
+
+       * s/gnu.h: Remove file, which is now empty.
+
+       * s/gnu.h, s/gnu-linux.h:
+       Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
+
+2012-07-11  John Wiegley  <johnw@newartisans.com>
+
+       * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
+       function attribute, so we only use it if it exists in the
+       compiler.
+
+2012-07-11  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Avoid call to strlen in fast_c_string_match_ignore_case.
+       * search.c (fast_c_string_match_ignore_case): Change to use
+       length argument.  Adjust users accordingly.
+       * lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
+
+2012-07-11  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Assume mkdir, rmdir.
+       * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
+       * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
+
+       Assume rename.
+       * sysdep.c (rename) [!HAVE_RENAME]: Remove.
+
+       Assume perror.
+       * s/hpux10-20.h (HAVE_PERROR): Remove.
+       * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
+       Remove dummy definition, as this problem was obsolete long ago.
+
+       Assume strerror.
+       * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
+
+2012-07-11  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Avoid calls to strlen in font processing functions.
+       * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
+       (font_open_by_name): Change to use length argument.  Adjust
+       users accordingly.
+       * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
+       Adjust prototypes.
+       * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
+       Change to return ptrdiff_t.
+       (xfont_list_pattern, xfont_match): Use length returned by
+       xfont_decode_coding_xlfd.
+       * xfns.c (x_default_font_parameter): Omit useless xstrdup.
+
+2012-07-11  Glenn Morris  <rgm@gnu.org>
+
+       * s/darwin.h, s/freebsd.h, s/netbsd.h:
+       Move DONT_REOPEN_PTY to configure.
+
+       * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
+       * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
+
+2012-07-10  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Remove "#define unix" that is no longer needed (Bug#11905).
+       * s/aix4-2.h (unix): Remove; no longer needed.
+
+       EMACS_TIME simplification (Bug#11875).
+       This replaces macros (which typically do not work in GDB)
+       with functions, typedefs and enums, making the code easier to debug.
+       The functional style also makes code easier to read and maintain.
+       * systime.h: Include <sys/time.h> on all hosts, not just if
+       WINDOWSNT, since 'struct timeval' is needed in general.
+       (EMACS_TIME): Now a typedef, not a macro.
+       (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
+       not macros.
+       (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
+       (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
+       (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
+       (EMACS_TIME_LE): Now functions, not macros.
+       (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
+       (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
+       which are not functions.  All uses rewritten to use:
+       (make_emacs_time): New function.
+       (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
+       (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
+       not functions.  All uses rewritten to use the following, respectively:
+       (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
+       (add_emacs_time, sub_emacs_time): New functions.
+       * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
+       * fileio.c (Fcopy_file):
+       * xterm.c (XTflash): Get the current time closer to when it's used.
+       * makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
+
+       * bytecode.c (targets): Suppress -Woverride-init warnings.
+
+       Simplify by avoiding confusing use of strncpy etc.
+       * doc.c (Fsnarf_documentation):
+       * fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
+       * frame.c (Fmake_terminal_frame):
+       * gtkutil.c (get_utf8_string):
+       * lread.c (openp):
+       * nsmenu.m (ns_update_menubar):
+       * regex.c (regerror):
+       Prefer memcpy to strncpy and strncat when either will do.
+       * fileio.c (Fsubstitute_in_file_name):
+       * keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
+       (menu_separator_name_p):
+       * nsmenu.m (ns_update_menubar):
+       Prefer memcmp to strncmp when either will do.
+       * nsterm.m: Include <ftoastr.h>.
+       (ns_get_color):
+       * s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
+       Prefer snprintf to strncpy.
+       * nsterm.m (ns_term_init):
+       * widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
+       * nsterm.m (ns_term_init):
+       Avoid the need for strncpy, by using build_string or
+       make_unibyte_string directly.  Use dtoastr, not snprintf.
+       * process.c (Fmake_network_process): Diagnose service names that
+       are too long, rather than silently truncating them or creating
+       non-null-terminated names.
+       (Fnetwork_interface_info): Likewise, for interface names.
+       * sysdep.c (system_process_attributes) [GNU_LINUX]:
+       Prefer sprintf to strncat.
+       * xdisp.c (debug_method_add) [GLYPH_DEBUG]:
+       Prefer vsnprintf to vsprintf + strncpy.
+
 2012-07-10  Glenn Morris  <rgm@gnu.org>
 
+       * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
+       Clarify fallback case.
+
+2012-07-10  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Use XCAR and XCDR instead of Fcar and Fcdr where possible.
+       * callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
+       * frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
+       * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
+       where argument type is known to be a Lisp_Cons.
+
+2012-07-10  Tom Tromey  <tromey@redhat.com>
+
+       * bytecode.c (BYTE_CODE_THREADED): New macro.
+       (BYTE_CODES): New macro.  Replaces all old byte-code defines.
+       (enum byte_code_op): New type.
+       (CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
+       (exec_byte_code): Use them.  Use token threading when applicable.
+
+2012-07-10  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Optimize pure C strings initialization.
+       * lisp.h (make_pure_string): Fix prototype.
+       (build_pure_c_string): New function, defined as static inline.  This
+       provides a better opportunity to optimize away calls to strlen when
+       the function is called with compile-time constant argument.
+       * alloc.c (make_pure_c_string): Fix comment.  Change to add nchars
+       argument, adjust users accordingly.  Use build_pure_c_string where
+       appropriate.
+       * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
+       * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
+       * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
+
+2012-07-10  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Avoid calls to strlen in miscellaneous functions.
+       * buffer.c (init_buffer): Use precalculated len, adjust if needed.
+       * font.c (Ffont_xlfd_name): Likewise.  Change to call make_string.
+       * lread.c (openp): Likewise.
+
+2012-07-10  Dmitry Antipov  <dmantipov@yandex.ru>
+
+       Avoid calls to strlen in path processing functions.
+       * fileio.c (file_name_as_directory): Add comment.  Change to add
+       srclen argument and return the length of result.  Adjust users
+       accordingly.
+       (directory_file_name): Fix comment.  Change to add srclen argument,
+       swap 1st and 2nd arguments to obey the common convention.  Adjust
+       users accordingly.
+       * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
+
+2012-07-10  Glenn Morris  <rgm@gnu.org>
+
+       * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
+       Move PENDING_OUTPUT_COUNT definition to configure.
+
+       * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
+       * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
+       * s/gnu.h (DATA_START): Move definitions to configure.
+
+       * s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
+       We include usg5-4-common.h, which defines them both.
+
+       * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
+       O_RDONLY already includes it).
+
        Stop ns builds setting the EMACSLOADPATH environment variable.
        * nsterm.m (ns_load_path): Rename from ns_init_paths.
        Now it does not set EMACSLOADPATH, just returns the load-path string.