1. 09 May, 2011 1 commit
    • Eli Zaretskii's avatar
      Backport revisions... · 14fe7b53
      Eli Zaretskii authored
      Backport revisions 2011-04-24T05:30:24Z!eggert@cs.ucla.edu..2011-04-25T19:40:22Z!eggert@cs.ucla.edu (inclusive) from trunk (bug#8623)
      
      	The next log entry shows the actual changes by Paul Eggert.
      
       Fix a problem with aliasing and vector headers.
       GCC 4.6.0 optimizes based on type-based alias analysis.  For
       example, if b is of type struct buffer * and v of type struct
       Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
       != &v->size, and therefore "v->size = 1; b->size = 2; return
       v->size;" must therefore return 1.  This assumption is incorrect
       for Emacs, since it type-puns struct Lisp_Vector * with many other
       types.  To fix this problem, this patch adds a new type struct
       vector_header that documents the constraints on layout of vectors
       and pseudovectors, and helps optimizing compilers not get fooled
       by Emacs's type punning.  It also adds the macros XSETTYPED_PVECTYPE
       XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
       src/lisp.h (XVECTOR_SIZE): New convenience macro.  All previous uses of
       XVECTOR (foo)->size replaced to use this macro, to avoid the hassle
       of writing XVECTOR (foo)->header.size.
       src/lisp.h: Say "vectorlike header" rather than "vector header.
       (struct vectorlike_header): Rename from struct vector_header.
       (XVECTORLIKE_HEADER_SIZE): Renamed from XVECTOR_HEADER_SIZE.
       All uses changed.
       (XVECTOR_HEADER_SIZE): New macro, for use in XSETPSEUDOVECTOR.
       (XSETTYPED_PVECTYPE): New macro, specifying the name of the size
       member.
       (XSETPVECTYPE): Rewrite in terms of new macro.
       (XSETPVECTYPESIZE): New macro, specifying both type and size.
       This is a bit clearer, and further avoids the possibility of
       undesirable aliasing.
       (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
       (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR
       and XVECTOR_HEADER_SIZE.
       (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
       since Lisp_Subr is a special case (no "next" field).
       (ASIZE): Rewrite in terms of XVECTOR_SIZE.
       (struct vector_header): New type.
       (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
       object, to help avoid aliasing.
       (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
       (SUBRP): Likewise, since Lisp_Subr is a special case.
       src/lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
       (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
       (struct Lisp_Hash_Table): Combine first two members into a single
       struct vector_header member.  All uses of "size" and "next" members
       changed to be "header.size" and "header.next".
       src/buffer.h (struct buffer): Likewise.
       src/font.h (struct font_spec, struct font_entity, struct font): Likewise.
       src/frame.h (struct frame): Likewise.
       src/process.h (struct Lisp_Process): Likewise.
       src/termhooks.h (struct terminal): Likewise.
       src/window.c (struct save_window_data, struct saved_window): Likewise.
       src/window.h (struct window): Likewise.
       src/alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
       Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
       src/buffer.c (init_buffer_once): Likewise.
       src/lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
       special case.
       src/process.c (Fformat_network_address): Use local var for size,
       for brevity.
       src/fns.c (vector): Remove; this old hack is no longer needed.
       src/bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
      14fe7b53
  2. 02 Jan, 2011 1 commit
  3. 01 Nov, 2010 1 commit
    • Jan Djärv's avatar
      Backport fix for Bug#6571 from trunk. NOTE: May cause merge conflicts. · 3649d303
      Jan Djärv authored
      * src/keyboard.c (input_available_signal): Declare.
      (kbd_buffer_nr_stored): New function.
      (kbd_buffer_store_event_hold): If kbd_buffer_nr_stored returns
      more than KBD_BUFFER_SIZE/2, stop reding input (Bug#6571).
      (kbd_buffer_get_event): If input is suspended and kbd_buffer_nr_stored
      returns less than KBD_BUFFER_SIZE/4, resume reding input (Bug#6571).
      (tty_read_avail_input): If input is on hold, return.
      Don't read more that free slots in kbd_buffer (Bug#6571).
      
      * src/process.c (kbd_is_on_hold): New variable.
      (hold_keyboard_input, unhold_keyboard_input, kbd_on_hold_p):
      New functions.
      (wait_reading_process_output): If kbd_on_hold_p returns non-zero,
      select on empty input mask.
      (init_process): Initialize kbd_is_on_hold to 0.
      
      * src/process.h (hold_keyboard_input, unhold_keyboard_input)
      (kbd_on_hold_p): Declare.
      3649d303
  4. 13 Jan, 2010 1 commit
  5. 08 Jan, 2009 1 commit
  6. 02 Jan, 2009 1 commit
  7. 19 Dec, 2008 1 commit
    • Dan Nicolaescu's avatar
      Reorganize implementation of Flist_system_processes and · 06e111a6
      Dan Nicolaescu authored
      Fsystem_process_attributes.  No functional changes.
      * process.c: Don't #include pwd.h, grp.h and limits.h.
      (Flist_system_processes): Just call list_system_processes.
      (Fsystem_process_attributes): Just call system_process_attributes.
      (procfs_list_system_processes, time_from_jiffies)
      (ltime_from_jiffies, get_up_time, procfs_ttyname, MAJOR, MINOR)
      (procfs_get_total_memory, procfs_system_process_attributes): Move ...
      
      * sysdep.c: ... here.  Include pwd.h, grp.h and limits.h.
      (list_system_processes): Rename from
      procfs_list_system_processes.  Enclose in #ifdef HAVE_PROCFS.
      Provide a do nothing implementation.
      (system_process_attributes): Rename from
      procfs_list_system_processes.
      (ltime_from_jiffies, get_up_time, procfs_ttyname, MAJOR, MINOR)
      (procfs_get_total_memory):  Enclose in #ifdef GNU_LINUX.
      
      * w32.c (list_system_processes): Rename from
      w32_list_system_processes.
      (system_process_attributes): Rename from
      w32_system_process_attributes.
      
      * s/gnu-linux.h (LISTPROC, PROCATTR): Remove.
      
      * process.h (w32_list_system_processes)
      (w32_system_process_attributes): Remove.
      (list_system_processes, system_process_attributes): New
      prototypes.
      
      * config.nt (LISTPROC, PROCATTR): Remove.
      06e111a6
  8. 09 Aug, 2008 1 commit
  9. 31 Jul, 2008 1 commit
    • Dan Nicolaescu's avatar
      * bitmaps/README: · 7c2fb837
      Dan Nicolaescu authored
      * xfns.c:
      * termcap.c:
      * term.c:
      * syswait.h:
      * systty.h:
      * systime.h:
      * syssignal.h:
      * sysdep.c:
      * process.h:
      * process.c:
      * print.c:
      * ndir.h:
      * lread.c:
      * keyboard.c:
      * getpagesize.h:
      * floatfns.c:
      * fileio.c:
      * emacs.c:
      * doc.c:
      * dispnew.c:
      * dired.c:
      * data.c:
      * callproc.c:
      * buffer.c:
      * README:
      * Makefile.in:
      * s/template.h:
      * s/msdos.h:
      * m/vax.h: Remove VMS support.
      * s/vms.h:
      * vlimit.h:
      * uaf.h:
      * temacs.opt:
      * param.h:
      * ioctl.h: Remove file.
      
      * descrip.mms:
      * compile.com: Remove file.
      * Create.c: Remove VMS support.
      
      * message.el (Module):
      
      * gnus-start.el (Module):
      
      * gnus-registry.el (Module):
      
      * textmodes/texinfmt.el:
      * nxml/nxml-enc.el:
      * mail/feedmail.el:
      * international/mule.el:
      * international/latexenc.el:
      * emulation/viper-util.el:
      * emulation/viper-init.el:
      * emulation/viper-ex.el:
      * emacs-lisp/bytecomp.el:
      * version.el:
      * subr.el:
      * startup.el:
      * sort.el:
      * shadowfile.el:
      * recentf.el:
      * printing.el:
      * paths.el:
      * minibuffer.el:
      * ls-lisp.el:
      * loadup.el:
      * hippie-exp.el:
      * finder.el:
      * files.el:
      * ediff-util.el:
      * ediff-ptch.el:
      * ediff-init.el:
      * ediff-diff.el:
      * dired.el:
      * dired-aux.el:
      * cus-edit.el:
      * bindings.el:
      * arc-mode.el:
      * add-log.el: Remove VMS support.
      * obsolete/vmsproc.el:
      * obsolete/vms-pmail.el:
      * obsolete/vms-patch.el: Remove file.
      
      * etags.c:
      * emacsclient.c: Remove VMS support.
      
      * termcap.src: Remove file.
      * README:
      * PROBLEMS:
      * MACHINES: Remove VMS info.
      
      * ediff.texi: Remove VMS support.
      
      * os.texi:
      * intro.texi:
      * files.texi: Remove VMS support.
      
      * emacs.texi: Remove VMS support.
      
      * make-dist:
      * README: Remove VMS support.
      * vms: Remove directory.
      7c2fb837
  10. 13 Jun, 2008 1 commit
    • Glenn Morris's avatar
      Daniel Engeler <engeler at gmail.com> · d888760c
      Glenn Morris authored
      These changes add serial port access.
      * process.c: Add HAVE_SERIAL.
      (Fdelete_process, Fprocess_status, Fset_process_buffer)
      (Fset_process_filter, Fset_process_sentinel, Fprocess_contact)
      (list_processes_1, select_wrapper, Fstop_process)
      (Fcontinue_process, Fprocess_send_eof, kill_buffer_processes)
      (status_notify): Modify to handle serial processes.
      [HAVE_SERIAL] (Fserial_process_configure)
      [HAVE_SERIAL] (make_serial_process_unwind, Fmake_serial_process):
      New functions.
      * process.h (struct Lisp_Process): Add `type'.
      * sysdep.c [HAVE_TERMIOS] (serial_open, serial_configure):
      New functions.
      * w32.c (_sys_read_ahead, sys_read, sys_write): Modify to handle serial ports.
      (serial_open, serial_configure) New functions.
      * w32.h: Add FILE_SERIAL.
      (struct _child_process): Add ovl_read, ovl_write.
      d888760c
  11. 15 May, 2008 1 commit
  12. 25 Mar, 2008 1 commit
    • Stefan Monnier's avatar
      * process.h (struct Lisp_Process): Remove filter_multibyte. · 5431bd6a
      Stefan Monnier authored
      * process.c (QCfilter_multibyte): Remove.
      (setup_process_coding_systems): Don't use filter_multibyte.
      (Fstart_process, Fmake_network_process): Don't set filter_multibyte.
      (read_process_output): Don't adjust multibyteness to filter_multibyte.
      (Fset_process_filter_multibyte): Change the coding-system to
      approximate the previous behavior.
      (Fprocess_filter_multibyte_p): Get the multibyteness straight from the
      coding-system.
      5431bd6a
  13. 08 Mar, 2008 2 commits
  14. 08 Jan, 2008 1 commit
  15. 02 Oct, 2007 1 commit
    • Stefan Monnier's avatar
      * window.h (struct window): · d0fdb6da
      Stefan Monnier authored
      * window.c (struct save_window_data, struct saved_window):
      * termhooks.h (struct terminal):
      * process.h (struct Lisp_Process):
      * frame.h (struct frame):
      * buffer.h (struct buffer):
      * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table)
      (struct Lisp_Bool_Vector, struct Lisp_Subr, struct Lisp_Hash_Table):
      The size field of (pseudo)vectors is now unsigned.
      (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG): Simplify accordingly.
      d0fdb6da
  16. 08 Aug, 2007 1 commit
  17. 25 Jul, 2007 1 commit
  18. 12 Jul, 2007 1 commit
  19. 14 Jan, 2007 1 commit
  20. 08 Sep, 2006 1 commit
  21. 24 Apr, 2006 1 commit
  22. 08 Apr, 2006 1 commit
    • Stefan Monnier's avatar
      * process.h (struct Lisp_Process): Replace Lisp_Objects `pid', · 6bfd98e7
      Stefan Monnier authored
      `raw_status_high', and `raw_status_low' with plain integers, and move
      them to the end of the structure.
      
      * alloc.c (allocate_process): Use PSEUDOVECSIZE to initialize the
      pseudovector's size field so only the Lisp_Object fields get GC'd.
      
      * process.c (update_status, make_process, Fdelete_process)
      (Fprocess_status, list_processes_1, start_process_unwind)
      (create_process, Fmake_network_process, server_accept_connection)
      (wait_reading_process_output, send_process, Fprocess_running_child_p)
      (process_send_signal, proc_encode_coding_system, Fprocess_send_eof)
      (sigchld_handler, status_notify): Adjust to new non-Lisp fields for
      `pid' and `raw_status'.
      (Fprocess_id, Fsignal_process): Same, and additionally use floats when
      representing PIDs that are larger than most-positive-fixnum.
      6bfd98e7
  23. 06 Feb, 2006 1 commit
  24. 07 Aug, 2005 1 commit
  25. 04 Jul, 2005 1 commit
  26. 08 Jun, 2005 2 commits
  27. 16 Apr, 2004 1 commit
  28. 27 Jan, 2004 1 commit
  29. 26 Jan, 2004 1 commit
  30. 01 Jan, 2004 1 commit
  31. 08 Sep, 2003 1 commit
  32. 01 Sep, 2003 1 commit
  33. 21 Feb, 2003 1 commit
  34. 10 Feb, 2003 1 commit
  35. 14 Jan, 2003 1 commit
  36. 12 Jan, 2003 1 commit
  37. 17 Mar, 2002 1 commit
    • Kim F. Storm's avatar
      (struct Lisp_Process): New member log. · cfa955c2
      Kim F. Storm authored
      Doc fix: Member command used to indicate stopped network process.
      Doc fix: Member childp contains plist for network process.
      Doc fix: Member kill_without_query is inverse of query-on-exit flag.
      cfa955c2
  38. 14 Oct, 2001 1 commit