Karsten Hopp f301e8
To: vim-dev@vim.org
Karsten Hopp f301e8
Subject: Patch 7.0.007
Karsten Hopp f301e8
Fcc: outbox
Karsten Hopp f301e8
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp f301e8
Mime-Version: 1.0
Karsten Hopp f301e8
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp f301e8
Content-Transfer-Encoding: 8bit
Karsten Hopp f301e8
------------
Karsten Hopp f301e8
Karsten Hopp f301e8
Patch 7.0.007
Karsten Hopp f301e8
Problem:    AIX: compiling fails for message.c. (Ruediger Hornig)
Karsten Hopp f301e8
Solution:   Move the #if outside of memchr().
Karsten Hopp f301e8
Files:	    src/message.c
Karsten Hopp f301e8
Karsten Hopp f301e8
Karsten Hopp f301e8
*** ../vim-7.0.006/src/message.c	Wed May 10 15:22:50 2006
Karsten Hopp f301e8
--- src/message.c	Tue May  9 10:36:56 2006
Karsten Hopp f301e8
***************
Karsten Hopp f301e8
*** 4175,4189 ****
Karsten Hopp f301e8
  			str_arg_l = 0;
Karsten Hopp f301e8
  		    else
Karsten Hopp f301e8
  		    {
Karsten Hopp f301e8
! 			/* memchr on HP does not like n > 2^31  !!! */
Karsten Hopp f301e8
! 			char *q = memchr(str_arg, '\0',
Karsten Hopp f301e8
  #if SIZEOF_INT <= 2
Karsten Hopp f301e8
! 				precision
Karsten Hopp f301e8
  #else
Karsten Hopp f301e8
! 				precision <= (size_t)0x7fffffffL ? precision
Karsten Hopp f301e8
! 						       : (size_t)0x7fffffffL
Karsten Hopp f301e8
  #endif
Karsten Hopp f301e8
- 						       );
Karsten Hopp f301e8
  			str_arg_l = (q == NULL) ? precision : q - str_arg;
Karsten Hopp f301e8
  		    }
Karsten Hopp f301e8
  		    break;
Karsten Hopp f301e8
--- 4175,4190 ----
Karsten Hopp f301e8
  			str_arg_l = 0;
Karsten Hopp f301e8
  		    else
Karsten Hopp f301e8
  		    {
Karsten Hopp f301e8
! 			/* Don't put the #if inside memchr(), it can be a
Karsten Hopp f301e8
! 			 * macro. */
Karsten Hopp f301e8
  #if SIZEOF_INT <= 2
Karsten Hopp f301e8
! 			char *q = memchr(str_arg, '\0', precision);
Karsten Hopp f301e8
  #else
Karsten Hopp f301e8
! 			/* memchr on HP does not like n > 2^31  !!! */
Karsten Hopp f301e8
! 			char *q = memchr(str_arg, '\0',
Karsten Hopp f301e8
! 				  precision <= (size_t)0x7fffffffL ? precision
Karsten Hopp f301e8
! 						       : (size_t)0x7fffffffL);
Karsten Hopp f301e8
  #endif
Karsten Hopp f301e8
  			str_arg_l = (q == NULL) ? precision : q - str_arg;
Karsten Hopp f301e8
  		    }
Karsten Hopp f301e8
  		    break;
Karsten Hopp f301e8
*** ../vim-7.0.006/src/version.c	Wed May 10 17:26:37 2006
Karsten Hopp f301e8
--- src/version.c	Wed May 10 17:36:03 2006
Karsten Hopp f301e8
***************
Karsten Hopp f301e8
*** 668,669 ****
Karsten Hopp f301e8
--- 668,671 ----
Karsten Hopp f301e8
  {   /* Add new patch number below this line */
Karsten Hopp f301e8
+ /**/
Karsten Hopp f301e8
+     7,
Karsten Hopp f301e8
  /**/
Karsten Hopp f301e8
Karsten Hopp f301e8
-- 
Karsten Hopp f301e8
Momento mori, ergo carpe diem
Karsten Hopp f301e8
Karsten Hopp f301e8
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp f301e8
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp f301e8
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp f301e8
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///