Karsten Hopp af6144
To: vim-dev@vim.org
Karsten Hopp af6144
Subject: Patch 7.2.371
Karsten Hopp af6144
Fcc: outbox
Karsten Hopp af6144
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp af6144
Mime-Version: 1.0
Karsten Hopp af6144
Content-Type: text/plain; charset=UTF-8
Karsten Hopp af6144
Content-Transfer-Encoding: 8bit
Karsten Hopp af6144
------------
Karsten Hopp af6144
Karsten Hopp af6144
Patch 7.2.371
Karsten Hopp af6144
Problem:    Build problems on Tandem NonStop.
Karsten Hopp af6144
Solution:   A few changes to #ifdefs (Joachim Schmitz)
Karsten Hopp af6144
Files:	    src/auto/configure, src/configure.in, src/config.h.in, src/vim.h,
Karsten Hopp af6144
	    src/if_cscope.c, src/osdef1.h.in, src/tag.c
Karsten Hopp af6144
Karsten Hopp af6144
Karsten Hopp af6144
*** ../vim-7.2.370/src/auto/configure	2010-02-17 16:23:03.000000000 +0100
Karsten Hopp af6144
--- src/auto/configure	2010-02-24 14:27:00.000000000 +0100
Karsten Hopp af6144
***************
Karsten Hopp af6144
*** 14038,14046 ****
Karsten Hopp af6144
  
Karsten Hopp af6144
  
Karsten Hopp af6144
  
Karsten Hopp af6144
! 
Karsten Hopp af6144
! 
Karsten Hopp af6144
! for ac_func in bcmp fchdir fchown fseeko fsync ftello getcwd getpseudotty \
Karsten Hopp af6144
  	getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \
Karsten Hopp af6144
  	memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
Karsten Hopp af6144
  	setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
Karsten Hopp af6144
--- 14038,14044 ----
Karsten Hopp af6144
  
Karsten Hopp af6144
  
Karsten Hopp af6144
  
Karsten Hopp af6144
! for ac_func in bcmp fchdir fchown fsync getcwd getpseudotty \
Karsten Hopp af6144
  	getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \
Karsten Hopp af6144
  	memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
Karsten Hopp af6144
  	setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
Karsten Hopp af6144
***************
Karsten Hopp af6144
*** 14146,14151 ****
Karsten Hopp af6144
--- 14144,14281 ----
Karsten Hopp af6144
  fi
Karsten Hopp af6144
  done
Karsten Hopp af6144
  
Karsten Hopp af6144
+ { $as_echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
Karsten Hopp af6144
+ $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
Karsten Hopp af6144
+ if test "${ac_cv_sys_largefile_source+set}" = set; then
Karsten Hopp af6144
+   $as_echo_n "(cached) " >&6
Karsten Hopp af6144
+ else
Karsten Hopp af6144
+   while :; do
Karsten Hopp af6144
+   cat >conftest.$ac_ext <<_ACEOF
Karsten Hopp af6144
+ /* confdefs.h.  */
Karsten Hopp af6144
+ _ACEOF
Karsten Hopp af6144
+ cat confdefs.h >>conftest.$ac_ext
Karsten Hopp af6144
+ cat >>conftest.$ac_ext <<_ACEOF
Karsten Hopp af6144
+ /* end confdefs.h.  */
Karsten Hopp af6144
+ #include <sys/types.h> /* for off_t */
Karsten Hopp af6144
+      #include <stdio.h>
Karsten Hopp af6144
+ int
Karsten Hopp af6144
+ main ()
Karsten Hopp af6144
+ {
Karsten Hopp af6144
+ int (*fp) (FILE *, off_t, int) = fseeko;
Karsten Hopp af6144
+      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
Karsten Hopp af6144
+   ;
Karsten Hopp af6144
+   return 0;
Karsten Hopp af6144
+ }
Karsten Hopp af6144
+ _ACEOF
Karsten Hopp af6144
+ rm -f conftest.$ac_objext conftest$ac_exeext
Karsten Hopp af6144
+ if { (ac_try="$ac_link"
Karsten Hopp af6144
+ case "(($ac_try" in
Karsten Hopp af6144
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
Karsten Hopp af6144
+   *) ac_try_echo=$ac_try;;
Karsten Hopp af6144
+ esac
Karsten Hopp af6144
+ eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
Karsten Hopp af6144
+ $as_echo "$ac_try_echo") >&5
Karsten Hopp af6144
+   (eval "$ac_link") 2>conftest.er1
Karsten Hopp af6144
+   ac_status=$?
Karsten Hopp af6144
+   grep -v '^ *+' conftest.er1 >conftest.err
Karsten Hopp af6144
+   rm -f conftest.er1
Karsten Hopp af6144
+   cat conftest.err >&5
Karsten Hopp af6144
+   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Karsten Hopp af6144
+   (exit $ac_status); } && {
Karsten Hopp af6144
+ 	 test -z "$ac_c_werror_flag" ||
Karsten Hopp af6144
+ 	 test ! -s conftest.err
Karsten Hopp af6144
+        } && test -s conftest$ac_exeext && {
Karsten Hopp af6144
+ 	 test "$cross_compiling" = yes ||
Karsten Hopp af6144
+ 	 $as_test_x conftest$ac_exeext
Karsten Hopp af6144
+        }; then
Karsten Hopp af6144
+   ac_cv_sys_largefile_source=no; break
Karsten Hopp af6144
+ else
Karsten Hopp af6144
+   $as_echo "$as_me: failed program was:" >&5
Karsten Hopp af6144
+ sed 's/^/| /' conftest.$ac_ext >&5
Karsten Hopp af6144
+ 
Karsten Hopp af6144
+ 
Karsten Hopp af6144
+ fi
Karsten Hopp af6144
+ 
Karsten Hopp af6144
+ rm -rf conftest.dSYM
Karsten Hopp af6144
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Karsten Hopp af6144
+       conftest$ac_exeext conftest.$ac_ext
Karsten Hopp af6144
+   cat >conftest.$ac_ext <<_ACEOF
Karsten Hopp af6144
+ /* confdefs.h.  */
Karsten Hopp af6144
+ _ACEOF
Karsten Hopp af6144
+ cat confdefs.h >>conftest.$ac_ext
Karsten Hopp af6144
+ cat >>conftest.$ac_ext <<_ACEOF
Karsten Hopp af6144
+ /* end confdefs.h.  */
Karsten Hopp af6144
+ #define _LARGEFILE_SOURCE 1
Karsten Hopp af6144
+ #include <sys/types.h> /* for off_t */
Karsten Hopp af6144
+      #include <stdio.h>
Karsten Hopp af6144
+ int
Karsten Hopp af6144
+ main ()
Karsten Hopp af6144
+ {
Karsten Hopp af6144
+ int (*fp) (FILE *, off_t, int) = fseeko;
Karsten Hopp af6144
+      return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
Karsten Hopp af6144
+   ;
Karsten Hopp af6144
+   return 0;
Karsten Hopp af6144
+ }
Karsten Hopp af6144
+ _ACEOF
Karsten Hopp af6144
+ rm -f conftest.$ac_objext conftest$ac_exeext
Karsten Hopp af6144
+ if { (ac_try="$ac_link"
Karsten Hopp af6144
+ case "(($ac_try" in
Karsten Hopp af6144
+   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
Karsten Hopp af6144
+   *) ac_try_echo=$ac_try;;
Karsten Hopp af6144
+ esac
Karsten Hopp af6144
+ eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
Karsten Hopp af6144
+ $as_echo "$ac_try_echo") >&5
Karsten Hopp af6144
+   (eval "$ac_link") 2>conftest.er1
Karsten Hopp af6144
+   ac_status=$?
Karsten Hopp af6144
+   grep -v '^ *+' conftest.er1 >conftest.err
Karsten Hopp af6144
+   rm -f conftest.er1
Karsten Hopp af6144
+   cat conftest.err >&5
Karsten Hopp af6144
+   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Karsten Hopp af6144
+   (exit $ac_status); } && {
Karsten Hopp af6144
+ 	 test -z "$ac_c_werror_flag" ||
Karsten Hopp af6144
+ 	 test ! -s conftest.err
Karsten Hopp af6144
+        } && test -s conftest$ac_exeext && {
Karsten Hopp af6144
+ 	 test "$cross_compiling" = yes ||
Karsten Hopp af6144
+ 	 $as_test_x conftest$ac_exeext
Karsten Hopp af6144
+        }; then
Karsten Hopp af6144
+   ac_cv_sys_largefile_source=1; break
Karsten Hopp af6144
+ else
Karsten Hopp af6144
+   $as_echo "$as_me: failed program was:" >&5
Karsten Hopp af6144
+ sed 's/^/| /' conftest.$ac_ext >&5
Karsten Hopp af6144
+ 
Karsten Hopp af6144
+ 
Karsten Hopp af6144
+ fi
Karsten Hopp af6144
+ 
Karsten Hopp af6144
+ rm -rf conftest.dSYM
Karsten Hopp af6144
+ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Karsten Hopp af6144
+       conftest$ac_exeext conftest.$ac_ext
Karsten Hopp af6144
+   ac_cv_sys_largefile_source=unknown
Karsten Hopp af6144
+   break
Karsten Hopp af6144
+ done
Karsten Hopp af6144
+ fi
Karsten Hopp af6144
+ { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
Karsten Hopp af6144
+ $as_echo "$ac_cv_sys_largefile_source" >&6; }
Karsten Hopp af6144
+ case $ac_cv_sys_largefile_source in #(
Karsten Hopp af6144
+   no | unknown) ;;
Karsten Hopp af6144
+   *)
Karsten Hopp af6144
+ cat >>confdefs.h <<_ACEOF
Karsten Hopp af6144
+ #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
Karsten Hopp af6144
+ _ACEOF
Karsten Hopp af6144
+ ;;
Karsten Hopp af6144
+ esac
Karsten Hopp af6144
+ rm -rf conftest*
Karsten Hopp af6144
+ 
Karsten Hopp af6144
+ # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
Karsten Hopp af6144
+ # in glibc 2.1.3, but that breaks too many other things.
Karsten Hopp af6144
+ # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
Karsten Hopp af6144
+ if test $ac_cv_sys_largefile_source != unknown; then
Karsten Hopp af6144
+ 
Karsten Hopp af6144
+ cat >>confdefs.h <<\_ACEOF
Karsten Hopp af6144
+ #define HAVE_FSEEKO 1
Karsten Hopp af6144
+ _ACEOF
Karsten Hopp af6144
+ 
Karsten Hopp af6144
+ fi
Karsten Hopp af6144
+ 
Karsten Hopp af6144
  
Karsten Hopp af6144
  { $as_echo "$as_me:$LINENO: checking for st_blksize" >&5
Karsten Hopp af6144
  $as_echo_n "checking for st_blksize... " >&6; }
Karsten Hopp af6144
*** ../vim-7.2.370/src/configure.in	2010-02-17 16:23:03.000000000 +0100
Karsten Hopp af6144
--- src/configure.in	2010-02-24 14:18:49.000000000 +0100
Karsten Hopp af6144
***************
Karsten Hopp af6144
*** 2642,2655 ****
Karsten Hopp af6144
    AC_DEFINE(BAD_GETCWD)
Karsten Hopp af6144
  fi
Karsten Hopp af6144
  
Karsten Hopp af6144
! dnl Check for functions in one big call, to reduce the size of configure
Karsten Hopp af6144
! AC_CHECK_FUNCS(bcmp fchdir fchown fseeko fsync ftello getcwd getpseudotty \
Karsten Hopp af6144
  	getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \
Karsten Hopp af6144
  	memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
Karsten Hopp af6144
  	setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
Karsten Hopp af6144
  	sigvec strcasecmp strerror strftime stricmp strncasecmp \
Karsten Hopp af6144
  	strnicmp strpbrk strtol tgetent towlower towupper iswupper \
Karsten Hopp af6144
  	usleep utime utimes)
Karsten Hopp af6144
  
Karsten Hopp af6144
  dnl fstatfs() can take 2 to 4 arguments, try to use st_blksize if possible
Karsten Hopp af6144
  AC_MSG_CHECKING(for st_blksize)
Karsten Hopp af6144
--- 2642,2657 ----
Karsten Hopp af6144
    AC_DEFINE(BAD_GETCWD)
Karsten Hopp af6144
  fi
Karsten Hopp af6144
  
Karsten Hopp af6144
! dnl Check for functions in one big call, to reduce the size of configure.
Karsten Hopp af6144
! dnl Can only be used for functions that do not require any include.
Karsten Hopp af6144
! AC_CHECK_FUNCS(bcmp fchdir fchown fsync getcwd getpseudotty \
Karsten Hopp af6144
  	getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \
Karsten Hopp af6144
  	memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
Karsten Hopp af6144
  	setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
Karsten Hopp af6144
  	sigvec strcasecmp strerror strftime stricmp strncasecmp \
Karsten Hopp af6144
  	strnicmp strpbrk strtol tgetent towlower towupper iswupper \
Karsten Hopp af6144
  	usleep utime utimes)
Karsten Hopp af6144
+ AC_FUNC_FSEEKO
Karsten Hopp af6144
  
Karsten Hopp af6144
  dnl fstatfs() can take 2 to 4 arguments, try to use st_blksize if possible
Karsten Hopp af6144
  AC_MSG_CHECKING(for st_blksize)
Karsten Hopp af6144
*** ../vim-7.2.370/src/config.h.in	2009-11-17 17:13:03.000000000 +0100
Karsten Hopp af6144
--- src/config.h.in	2010-02-24 14:20:26.000000000 +0100
Karsten Hopp af6144
***************
Karsten Hopp af6144
*** 144,150 ****
Karsten Hopp af6144
  #undef HAVE_FCHOWN
Karsten Hopp af6144
  #undef HAVE_FSEEKO
Karsten Hopp af6144
  #undef HAVE_FSYNC
Karsten Hopp af6144
- #undef HAVE_FTELLO
Karsten Hopp af6144
  #undef HAVE_GETCWD
Karsten Hopp af6144
  #undef HAVE_GETPSEUDOTTY
Karsten Hopp af6144
  #undef HAVE_GETPWNAM
Karsten Hopp af6144
--- 144,149 ----
Karsten Hopp af6144
*** ../vim-7.2.370/src/vim.h	2010-02-03 15:14:15.000000000 +0100
Karsten Hopp af6144
--- src/vim.h	2010-02-24 14:08:14.000000000 +0100
Karsten Hopp af6144
***************
Karsten Hopp af6144
*** 52,58 ****
Karsten Hopp af6144
  
Karsten Hopp af6144
  /* user ID of root is usually zero, but not for everybody */
Karsten Hopp af6144
  #ifdef __TANDEM
Karsten Hopp af6144
! # define _TANDEM_SOURCE
Karsten Hopp af6144
  # include <floss.h>
Karsten Hopp af6144
  # define ROOT_UID 65535
Karsten Hopp af6144
  #else
Karsten Hopp af6144
--- 52,60 ----
Karsten Hopp af6144
  
Karsten Hopp af6144
  /* user ID of root is usually zero, but not for everybody */
Karsten Hopp af6144
  #ifdef __TANDEM
Karsten Hopp af6144
! # ifndef _TANDEM_SOURCE
Karsten Hopp af6144
! #  define _TANDEM_SOURCE
Karsten Hopp af6144
! # endif
Karsten Hopp af6144
  # include <floss.h>
Karsten Hopp af6144
  # define ROOT_UID 65535
Karsten Hopp af6144
  #else
Karsten Hopp af6144
*** ../vim-7.2.370/src/if_cscope.c	2010-01-19 14:59:14.000000000 +0100
Karsten Hopp af6144
--- src/if_cscope.c	2010-02-24 14:10:21.000000000 +0100
Karsten Hopp af6144
***************
Karsten Hopp af6144
*** 2278,2284 ****
Karsten Hopp af6144
--- 2278,2288 ----
Karsten Hopp af6144
  	/* Use sigaction() to limit the waiting time to two seconds. */
Karsten Hopp af6144
  	sigemptyset(&sa.sa_mask);
Karsten Hopp af6144
  	sa.sa_handler = sig_handler;
Karsten Hopp af6144
+ #  ifdef SA_NODEFER
Karsten Hopp af6144
  	sa.sa_flags = SA_NODEFER;
Karsten Hopp af6144
+ #  else
Karsten Hopp af6144
+ 	sa.sa_flags = 0;
Karsten Hopp af6144
+ #  endif
Karsten Hopp af6144
  	sigaction(SIGALRM, &sa, &old;;
Karsten Hopp af6144
  	alarm(2); /* 2 sec timeout */
Karsten Hopp af6144
  
Karsten Hopp af6144
*** ../vim-7.2.370/src/osdef1.h.in	2007-02-27 16:47:59.000000000 +0100
Karsten Hopp af6144
--- src/osdef1.h.in	2010-02-24 14:20:50.000000000 +0100
Karsten Hopp af6144
***************
Karsten Hopp af6144
*** 25,31 ****
Karsten Hopp af6144
  extern int	fseeko __ARGS((FILE *, off_t, int));
Karsten Hopp af6144
  #endif
Karsten Hopp af6144
  extern long	ftell __ARGS((FILE *));
Karsten Hopp af6144
! #ifdef HAVE_FTELLO
Karsten Hopp af6144
  extern off_t	ftello __ARGS((FILE *));
Karsten Hopp af6144
  #endif
Karsten Hopp af6144
  extern void	rewind __ARGS((FILE *));
Karsten Hopp af6144
--- 25,31 ----
Karsten Hopp af6144
  extern int	fseeko __ARGS((FILE *, off_t, int));
Karsten Hopp af6144
  #endif
Karsten Hopp af6144
  extern long	ftell __ARGS((FILE *));
Karsten Hopp af6144
! #ifdef HAVE_FSEEKO
Karsten Hopp af6144
  extern off_t	ftello __ARGS((FILE *));
Karsten Hopp af6144
  #endif
Karsten Hopp af6144
  extern void	rewind __ARGS((FILE *));
Karsten Hopp af6144
*** ../vim-7.2.370/src/tag.c	2009-05-17 13:30:58.000000000 +0200
Karsten Hopp af6144
--- src/tag.c	2010-02-24 14:20:12.000000000 +0100
Karsten Hopp af6144
***************
Karsten Hopp af6144
*** 90,97 ****
Karsten Hopp af6144
  /*
Karsten Hopp af6144
   * We use ftello() here, if available.  It returns off_t instead of long,
Karsten Hopp af6144
   * which helps if long is 32 bit and off_t is 64 bit.
Karsten Hopp af6144
   */
Karsten Hopp af6144
! #ifdef HAVE_FTELLO
Karsten Hopp af6144
  # define ftell ftello
Karsten Hopp af6144
  #endif
Karsten Hopp af6144
  
Karsten Hopp af6144
--- 90,98 ----
Karsten Hopp af6144
  /*
Karsten Hopp af6144
   * We use ftello() here, if available.  It returns off_t instead of long,
Karsten Hopp af6144
   * which helps if long is 32 bit and off_t is 64 bit.
Karsten Hopp af6144
+  * We assume that when fseeko() is available then ftello() is too.
Karsten Hopp af6144
   */
Karsten Hopp af6144
! #ifdef HAVE_FSEEKO
Karsten Hopp af6144
  # define ftell ftello
Karsten Hopp af6144
  #endif
Karsten Hopp af6144
  
Karsten Hopp af6144
*** ../vim-7.2.370/src/version.c	2010-02-24 14:34:10.000000000 +0100
Karsten Hopp af6144
--- src/version.c	2010-02-24 14:45:37.000000000 +0100
Karsten Hopp af6144
***************
Karsten Hopp af6144
*** 683,684 ****
Karsten Hopp af6144
--- 683,686 ----
Karsten Hopp af6144
  {   /* Add new patch number below this line */
Karsten Hopp af6144
+ /**/
Karsten Hopp af6144
+     371,
Karsten Hopp af6144
  /**/
Karsten Hopp af6144
Karsten Hopp af6144
-- 
Karsten Hopp af6144
   A cow comes flying over the battlements,  lowing aggressively.  The cow
Karsten Hopp af6144
   lands on GALAHAD'S PAGE, squashing him completely.
Karsten Hopp af6144
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
Karsten Hopp af6144
Karsten Hopp af6144
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp af6144
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp af6144
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp af6144
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///