1. 04 Mar, 2013 1 commit
  2. 02 Mar, 2013 7 commits
    • Paul Eggert's avatar
      2db41375
    • Paul Eggert's avatar
      The lock for FILE is now .#FILE or .#-FILE. · b5029e23
      Paul Eggert authored
      The old approach, which fell back on DIR/.#FILE.0 through
      DIR/.#FILE.9, had race conditions that could not be easily fixed.
      If DIR/.#FILE is a non-symlink file, Emacs now does not create a
      lock file for DIR/FILE; that is, DIR/FILE is no longer partly
      protected by a lock if DIR/.#FILE is a non-symlink file ("partly"
      because the locking mechanism was never reliable in that case).
      This patch fixes this and other bugs discovered by a code
      inspection that was prompted by
      <http://lists.gnu.org/archive/html/emacs-devel/2013-02/msg00531.html>.
      Also, this patch switches to .#-FILE (not .#FILE) on MS-Windows,
      to avoid interoperability problems between the MS-Windows and
      non-MS-Windows implementations.  MS-Windows and non-MS-Windows
      instances of Emacs now ignore each others' locks.
      * etc/NEWS: Document this.
      * src/filelock.c (defined_WINDOWSNT): New constant.
      (MAKE_LOCK_NAME, fill_in_lock_file_name):
      Don't create DIR/.#FILE.0 through DIR/.#FILE.9.  Instead, create
      DIR/.#FILE symlinks on non-MS-Windows hosts, and DIR/.#-FILE
      regular files on MS-Windows hosts.
      (MAKE_LOCK_NAME, unlock_file, Ffile_locked_p):
      Use SAFE_ALLOCA to avoid problems with long file names.
      (MAX_LFINFO): Now a local constant, not a global macro.
      (IS_LOCK_FILE): Remove.
      (lock_file_1): Don't inspect errno if symlink call succeeds;
      that's not portable.
      (lock_file): Document that this function can return if lock
      creation fails.
      
      Fixes: debbugs:13807
      b5029e23
    • Paul Eggert's avatar
      * textprop.c: Use bool for booleans. · 81c23309
      Paul Eggert authored
      (validate_interval_range, Fadd_text_properties)
      (Fremove_text_properties): Prefer bool to int when either works.
      81c23309
    • Eli Zaretskii's avatar
      Protect against changes of interval tree when adding/removing text props. · 18f2ac09
      Eli Zaretskii authored
       src/textprop.c (Fadd_text_properties, Fremove_text_properties): If
       the interval tree changes as a side effect of calling
       modify_region, re-do processing starting from the call to
       validate_interval_range.  (Bug#13743)
      18f2ac09
    • Eli Zaretskii's avatar
      c856b8d4
    • Eli Zaretskii's avatar
      Fix bug #13734 with errors in lisp.h macro expansion. · 474b43d9
      Eli Zaretskii authored
       src/lisp.h (XPNTR) [!USE_LSB_TAG]: Fix parentheses nesting.
      474b43d9
    • Andreas Schwab's avatar
      Fixes: debbugs:13734 · b270d116
      Andreas Schwab authored
      * lisp.h (XPNTR) [!USE_LSB_TAG]: Remove extra paren.
      b270d116
  3. 27 Feb, 2013 3 commits
  4. 26 Feb, 2013 2 commits
    • Bastien Guerry's avatar
      3b166f09
    • Paul Eggert's avatar
      Minor textprop integer cleanup. · ecc0fdd4
      Paul Eggert authored
      * intervals.h, textprop.c (add_text_properties_from_list):
      Return void, not int, since nobody uses the return value.
      * textprop.c (validate_plist, add_properties, remove_properties)
      (Fadd_text_properties):
      Don't assume list length fits in int.
      (interval_has_all_properties, interval_has_some_properties)
      (interval_has_some_properties_list, add_properties, remove_properties)
      (Fadd_text_properties, Fremove_text_properties)
      (Fremove_list_of_text_properties, text_property_stickiness):
      Use bool for booleans.
      (Fadd_text_properties, Fremove_text_properties):
      (Fremove_list_of_text_properties):
      Reindent do-while as per GNU style.
      ecc0fdd4
  5. 25 Feb, 2013 4 commits
    • Eli Zaretskii's avatar
      Implement CLASH_DETECTION for MS-Windows. · 343a2aef
      Eli Zaretskii authored
       src/filelock.c [WINDOWSNT]: Include w32.h.
       (MAKE_LOCK_NAME): Don't use 'lock', it clashes with MS runtime
       function of that name.  Up-case the macro arguments.
       (IS_LOCK_FILE): New macro.
       (fill_in_lock_file_name): Use IS_LOCK_FILE instead of S_ISLNK.
       (create_lock_file): New function, with body extracted from
       lock_file_1.
       [WINDOWSNT]: Implement lock files by writing a regular file with
       the lock information as its contents.
       (read_lock_data): New function, on Posix platforms just calls
       emacs_readlinkat.
       [WINDOWSNT]: Read the lock info from the file.
       (current_lock_owner): Call read_lock_data instead of calling
       emacs_readlinkat directly.
       (lock_file) [WINDOWSNT]: Run the file name through
       dostounix_filename.
       src/w32proc.c (sys_kill): Support the case of SIG = 0, in which case
       just check if the process by that PID exists.
       src/w32.c (sys_open): Don't reset the _O_CREAT flag if _O_EXCL is
       also present, as doing so will fail to error out if the file
       already exists.
       src/makefile.w32-in ($(BLD)/filelock.$(O)): Depend on src/w32.h.
      
       nt/inc/ms-w32.h (BOOT_TIME_FILE): Define.
       nt/config.nt (CLASH_DETECTION): Define to 1.
      
       lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Reject files
       that match "\`\.#", to avoid compiling lock files, even if they
       are readable (as they are on MS-Windows).
      
       doc/emacs/files.texi (Interlocking): Don't refer to symlinks as the
       exclusive means of locking files.
      
       etc/NEWS: Mention support for lock files on MS-Windows.
      343a2aef
    • Eli Zaretskii's avatar
      Fix bug #13743 with crashes due to recursive add-text-properties. · 0248b0d7
      Eli Zaretskii authored
       src/textprop.c (Fadd_text_properties, Fremove_text_properties)
       (Fremove_list_of_text_properties): Skip all of the intervals in
       the region between START and END that already have resp. don't
       have the requested properties, not just the first one.  Add
       assertions that the loop afterwards always modifies the
       properties.
      0248b0d7
    • Stefan Monnier's avatar
      * src/callint.c (Fcall_interactively): Use the right lexical environment · b5071fc7
      Stefan Monnier authored
      for `interactive' specs.
      * src/eval.c (Feval): Accept a lexical environment.
      
      Fixes: debbugs:13811
      b5071fc7
    • Paul Eggert's avatar
      Simplify data_start configuration. · 1ddc2bd6
      Paul Eggert authored
      This is a followon simplification to the fix for Bug#13650.
      * admin/CPP-DEFINES (DATA_START, ORDINARY_LINK): Remove.
      * configure.ac (CRT_DIR, LIB_STANDARD, START_FILES, DATA_START)
      (LD_FIRSTFLAG, ORDINARY_LINK, LIB_GCC): Remove.
      (AC_CHECK_HEADERS_ONCE): Remove sys/resource.h, as it's
      not always needed.
      (HAVE_DATA_START): New macro.
      * etc/PROBLEMS (LIBS_SYSTEM, LIBS_MACHINE, LIBS_STANDARD): Remove.
      Remove legacy-systems section, as this stuff is no longer
      applicable with current linking strategies.
      * src/Makefile.in (LD_FIRSTFLAG, LIB_GCC, CRT_DIR, LIB_STANDARD)
      (START_FILES): Remove.  All uses removed.
      (otherobj): Remove $(VMLIMIT_OBJ), as it's now first.
      (ALLOBJS): Move here from autodeps.mk, and with VMLIMITS_OBJ first.
      (buildobj.h): Use it.
      ($(ALLOBJS)): Depend on globals.h.
      (temacs$(EXEEXT)): Use $(ALLOBJS).
      * src/autodeps.mk (ALLOBJS): Move to Makefile.in.
      * src/deps.mk (vm-limit.o):
      * src/makefile.w32-in ($(BLD)/vm-limit.$(O)):
      Do not depend on mem-limits.h.
      * src/emacs.c (__do_global_ctors, __do_global_ctors_aux)
      (__do_global_dtors, __CTOR_LIST__, __DTOR_LIST__)
      [__GNUC__ && !ORDINARY_LINK]: Remove.
      * src/mem-limits.h, src/pre-crt0.c: Remove.
      * src/unexaix.c, src/unexcoff.c: Don't include mem-limits.h.
      * src/unexcoff.c (etext): New decl.
      (make_hdr): Use it instead of start_of_data.
      * src/vm-limit.c: Move most of mem-limits.h's contents here.
      (data_start): New decl.  It's OK if this is approximate,
      so simplify-away some unnecessary exactness.
      (POINTER): Remove; all uses removed.
      (data_space_start): Now char *, to avoid casts.
      (exceeds_lisp_ptr): New function, replacing the old
      EXCEEDS_LISP_PTR macro.  All uses changed.
      (check_memory_limits): Simplify and remove casts.
      (start_of_data) [!CANNOT_DUMP || !SYSTEM_MALLOC]: Remove.
      (memory_warnings): Use data_start instead of start_of_data.
      
      Fixes: debbugs:13783
      1ddc2bd6
  6. 24 Feb, 2013 2 commits
  7. 22 Feb, 2013 2 commits
    • Paul Eggert's avatar
      Assume C89 or better. · fcee5028
      Paul Eggert authored
      * ralloc.c (SIZE, POINTER, NIL):
      * vm-limit.c (POINTER):
      Remove, replacing all uses with C89 equivalents.  These old
      symbols were present only for porting to pre-C89 platforms.
      fcee5028
    • Claudio Bley's avatar
      Don't call 'select' from emacs_gnutls_pull. · d78cf5ed
      Claudio Bley authored
       src/w32.c (emacs_gnutls_pull): Don't call 'select', and don't loop.
       This avoids warning messages reported as part of Bug#13546.
      d78cf5ed
  8. 21 Feb, 2013 1 commit
  9. 20 Feb, 2013 4 commits
  10. 18 Feb, 2013 1 commit
  11. 17 Feb, 2013 4 commits
    • Eli Zaretskii's avatar
      Fix bug #13735 with network streams on MS-Windows. · ae11bda5
      Eli Zaretskii authored
      Revert changes to w32proc.c done since 2012-11-30T09:23:15Z!eliz@gnu.org.
      
      Do NOT merge to trunk!
      
       src/w32proc.c (new_child): Remove the loop that attempted to salvage
       slots of dead processes.
       (new_child, delete_child, find_child_pid): Don't insist on
       procinfo.hProcess be NULL for a process slot to be considered
       inactive, or be non-NULL to be considered active.
       (reader_thread): Don't set the FILE_AT_EOF flag of a file
       descriptor if the corresponding child was deleted and its
       char_avail handle is NULL.
       (reap_subprocess): Don't reset the FILE_AT_EOF flag.
       (sys_select): Don't pass a NULL process handle to
       WaitForMultipleObjects.
      
      Fixes: debbugs:13735 debbugs:13546
      ae11bda5
    • Stefan Monnier's avatar
      Prefer `message1' over `message'. · 2f73da9c
      Stefan Monnier authored
      * src/xml.c (init_libxml2_functions):
      * src/sound.c (sound_warning):
      * src/sheap.c (report_sheap_usage):
      * src/process.c (wait_reading_process_output):
      * src/msdos.c (XMenuActivate):
      * src/macros.c (Fstart_kbd_macro, Fend_kbd_macro):
      * src/keyboard.c (top_level_1):
      * src/editfns.c (Fmessage, Fmessage_box):
      * src/callint.c (Fcall_interactively):
      * src/fns.c (Fyes_or_no_p): Prefer `message1' over `message'.
      2f73da9c
    • Eli Zaretskii's avatar
      Fix bug #13723 with redrawing vertical border in GUI sessions. · fd80c659
      Eli Zaretskii authored
       src/xdisp.c (x_draw_vertical_border): For a window that is neither
       the leftmost nor the rightmost, redraw both the left and the right
       vertical borders.
      fd80c659
    • Jan Djärv's avatar
      Move scroll-bar-adjust-thumb-portion. · fd9547e8
      Jan Djärv authored
      * xterm.c (syms_of_xterm): Move scroll-bar-adjust-thumb-portion ...
      
      * frame.c (syms_of_frame): ... to here.
      fd9547e8
  12. 16 Feb, 2013 3 commits
  13. 15 Feb, 2013 6 commits