81c2858
To: vim-dev@vim.org
81c2858
Subject: Patch 7.2.179
81c2858
Fcc: outbox
81c2858
From: Bram Moolenaar <Bram@moolenaar.net>
81c2858
Mime-Version: 1.0
81c2858
Content-Type: text/plain; charset=UTF-8
81c2858
Content-Transfer-Encoding: 8bit
81c2858
------------
81c2858
81c2858
Patch 7.2.179
81c2858
Problem:    Using negative value for device number might not work.
81c2858
Solution:   Use a separate flag for whether sn_dev was set.
81c2858
Files:	    src/ex_cmds2.c
81c2858
81c2858
81c2858
*** ../vim-7.2.178/src/ex_cmds2.c	2009-05-14 22:19:19.000000000 +0200
81c2858
--- src/ex_cmds2.c	2009-05-16 21:13:29.000000000 +0200
81c2858
***************
81c2858
*** 28,34 ****
81c2858
  {
81c2858
      char_u	*sn_name;
81c2858
  # ifdef UNIX
81c2858
!     int		sn_dev;
81c2858
      ino_t	sn_ino;
81c2858
  # endif
81c2858
  # ifdef FEAT_PROFILE
81c2858
--- 28,35 ----
81c2858
  {
81c2858
      char_u	*sn_name;
81c2858
  # ifdef UNIX
81c2858
!     int		sn_dev_valid;
81c2858
!     dev_t	sn_dev;
81c2858
      ino_t	sn_ino;
81c2858
  # endif
81c2858
  # ifdef FEAT_PROFILE
81c2858
***************
81c2858
*** 3049,3055 ****
81c2858
  		    /* Compare dev/ino when possible, it catches symbolic
81c2858
  		     * links.  Also compare file names, the inode may change
81c2858
  		     * when the file was edited. */
81c2858
! 		    ((stat_ok && si->sn_dev != -1)
81c2858
  			&& (si->sn_dev == st.st_dev
81c2858
  			    && si->sn_ino == st.st_ino)) ||
81c2858
  # endif
81c2858
--- 3050,3056 ----
81c2858
  		    /* Compare dev/ino when possible, it catches symbolic
81c2858
  		     * links.  Also compare file names, the inode may change
81c2858
  		     * when the file was edited. */
81c2858
! 		    ((stat_ok && si->sn_dev_valid)
81c2858
  			&& (si->sn_dev == st.st_dev
81c2858
  			    && si->sn_ino == st.st_ino)) ||
81c2858
  # endif
81c2858
***************
81c2858
*** 3076,3086 ****
81c2858
  # ifdef UNIX
81c2858
  	if (stat_ok)
81c2858
  	{
81c2858
  	    si->sn_dev = st.st_dev;
81c2858
  	    si->sn_ino = st.st_ino;
81c2858
  	}
81c2858
  	else
81c2858
! 	    si->sn_dev = -1;
81c2858
  # endif
81c2858
  
81c2858
  	/* Allocate the local script variables to use for this script. */
81c2858
--- 3077,3088 ----
81c2858
  # ifdef UNIX
81c2858
  	if (stat_ok)
81c2858
  	{
81c2858
+ 	    si->sn_dev_valid = TRUE;
81c2858
  	    si->sn_dev = st.st_dev;
81c2858
  	    si->sn_ino = st.st_ino;
81c2858
  	}
81c2858
  	else
81c2858
! 	    si->sn_dev_valid = FALSE;
81c2858
  # endif
81c2858
  
81c2858
  	/* Allocate the local script variables to use for this script. */
81c2858
*** ../vim-7.2.178/src/version.c	2009-05-16 21:06:36.000000000 +0200
81c2858
--- src/version.c	2009-05-16 21:15:08.000000000 +0200
81c2858
***************
81c2858
*** 678,679 ****
81c2858
--- 678,681 ----
81c2858
  {   /* Add new patch number below this line */
81c2858
+ /**/
81c2858
+     179,
81c2858
  /**/
81c2858
81c2858
-- 
81c2858
(letter from Mark to Mike, about the film's probable certificate)
81c2858
      I would like to get back to the Censor and agree to lose the shits, take
81c2858
      the odd Jesus Christ out and lose Oh fuck off, but to retain 'fart in
81c2858
      your general direction', 'castanets of your testicles' and 'oral sex'
81c2858
      and ask him for an 'A' rating on that basis.
81c2858
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
81c2858
81c2858
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
81c2858
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
81c2858
\\\        download, build and distribute -- http://www.A-A-P.org        ///
81c2858
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///