components/vim/vim72-patches/7.2.413
changeset 198 172fc01ce997
equal deleted inserted replaced
197:fd801ec0737c 198:172fc01ce997
       
     1 To: [email protected]
       
     2 Subject: Patch 7.2.413
       
     3 Fcc: outbox
       
     4 From: Bram Moolenaar <[email protected]>
       
     5 Mime-Version: 1.0
       
     6 Content-Type: text/plain; charset=UTF-8
       
     7 Content-Transfer-Encoding: 8bit
       
     8 ------------
       
     9 
       
    10 Patch 7.2.413
       
    11 Problem:    Large file support is incorrect.
       
    12 Solution:   Add AC_SYS_LARGEFILE to configure. (James Vega)
       
    13 Files:      src/configure.in, src/config.h.in, src/auto/configure
       
    14     
       
    15 
       
    16 *** ../vim-7.2.412/src/configure.in	2010-03-10 16:27:27.000000000 +0100
       
    17 --- src/configure.in	2010-04-01 15:06:04.000000000 +0200
       
    18 ***************
       
    19 *** 2669,2674 ****
       
    20 --- 2669,2678 ----
       
    21   	usleep utime utimes)
       
    22   AC_FUNC_FSEEKO
       
    23   
       
    24 + dnl define _LARGE_FILES, _FILE_OFFSET_BITS and _LARGEFILE_SOURCE when
       
    25 + dnl appropriate, so that off_t is 64 bits when needed.
       
    26 + AC_SYS_LARGEFILE
       
    27 + 
       
    28   dnl fstatfs() can take 2 to 4 arguments, try to use st_blksize if possible
       
    29   AC_MSG_CHECKING(for st_blksize)
       
    30   AC_TRY_COMPILE(
       
    31 *** ../vim-7.2.412/src/config.h.in	2010-02-24 14:46:58.000000000 +0100
       
    32 --- src/config.h.in	2010-04-01 15:10:49.000000000 +0200
       
    33 ***************
       
    34 *** 196,201 ****
       
    35 --- 196,206 ----
       
    36   #undef HAVE_UTIME
       
    37   #undef HAVE_BIND_TEXTDOMAIN_CODESET
       
    38   
       
    39 + /* Define, if needed, for accessing large files. */
       
    40 + #undef _LARGE_FILES
       
    41 + #undef _FILE_OFFSET_BITS
       
    42 + #undef _LARGEFILE_SOURCE
       
    43 + 
       
    44   /* Define if you do not have utime(), but do have the utimes() function. */
       
    45   #undef HAVE_UTIMES
       
    46   
       
    47 *** ../vim-7.2.412/src/auto/configure	2010-03-10 16:27:27.000000000 +0100
       
    48 --- src/auto/configure	2010-05-07 16:01:08.000000000 +0200
       
    49 ***************
       
    50 *** 821,826 ****
       
    51 --- 821,827 ----
       
    52   with_gnome
       
    53   with_motif_lib
       
    54   with_tlib
       
    55 + enable_largefile
       
    56   enable_acl
       
    57   enable_gpm
       
    58   enable_sysmouse
       
    59 ***************
       
    60 *** 1485,1490 ****
       
    61 --- 1486,1492 ----
       
    62     --enable-nextaw-check   If auto-select GUI, check for neXtaw default=yes
       
    63     --enable-carbon-check   If auto-select GUI, check for Carbon default=yes
       
    64     --disable-gtktest       Do not try to compile and run a test GTK program
       
    65 +   --disable-largefile     omit support for large files
       
    66     --disable-acl           Don't check for ACL support.
       
    67     --disable-gpm           Don't use gpm (Linux mouse daemon).
       
    68     --disable-sysmouse    Don't use sysmouse (mouse in *BSD console).
       
    69 ***************
       
    70 *** 14345,14350 ****
       
    71 --- 14347,14709 ----
       
    72   fi
       
    73   
       
    74   
       
    75 + # Check whether --enable-largefile was given.
       
    76 + if test "${enable_largefile+set}" = set; then
       
    77 +   enableval=$enable_largefile;
       
    78 + fi
       
    79 + 
       
    80 + if test "$enable_largefile" != no; then
       
    81 + 
       
    82 +   { $as_echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
       
    83 + $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
       
    84 + if test "${ac_cv_sys_largefile_CC+set}" = set; then
       
    85 +   $as_echo_n "(cached) " >&6
       
    86 + else
       
    87 +   ac_cv_sys_largefile_CC=no
       
    88 +      if test "$GCC" != yes; then
       
    89 +        ac_save_CC=$CC
       
    90 +        while :; do
       
    91 + 	 # IRIX 6.2 and later do not support large files by default,
       
    92 + 	 # so use the C compiler's -n32 option if that helps.
       
    93 + 	 cat >conftest.$ac_ext <<_ACEOF
       
    94 + /* confdefs.h.  */
       
    95 + _ACEOF
       
    96 + cat confdefs.h >>conftest.$ac_ext
       
    97 + cat >>conftest.$ac_ext <<_ACEOF
       
    98 + /* end confdefs.h.  */
       
    99 + #include <sys/types.h>
       
   100 +  /* Check that off_t can represent 2**63 - 1 correctly.
       
   101 +     We can't simply define LARGE_OFF_T to be 9223372036854775807,
       
   102 +     since some C++ compilers masquerading as C compilers
       
   103 +     incorrectly reject 9223372036854775807.  */
       
   104 + #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
       
   105 +   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
       
   106 + 		       && LARGE_OFF_T % 2147483647 == 1)
       
   107 + 		      ? 1 : -1];
       
   108 + int
       
   109 + main ()
       
   110 + {
       
   111 + 
       
   112 +   ;
       
   113 +   return 0;
       
   114 + }
       
   115 + _ACEOF
       
   116 + 	 rm -f conftest.$ac_objext
       
   117 + if { (ac_try="$ac_compile"
       
   118 + case "(($ac_try" in
       
   119 +   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
       
   120 +   *) ac_try_echo=$ac_try;;
       
   121 + esac
       
   122 + eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
       
   123 + $as_echo "$ac_try_echo") >&5
       
   124 +   (eval "$ac_compile") 2>conftest.er1
       
   125 +   ac_status=$?
       
   126 +   grep -v '^ *+' conftest.er1 >conftest.err
       
   127 +   rm -f conftest.er1
       
   128 +   cat conftest.err >&5
       
   129 +   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
       
   130 +   (exit $ac_status); } && {
       
   131 + 	 test -z "$ac_c_werror_flag" ||
       
   132 + 	 test ! -s conftest.err
       
   133 +        } && test -s conftest.$ac_objext; then
       
   134 +   break
       
   135 + else
       
   136 +   $as_echo "$as_me: failed program was:" >&5
       
   137 + sed 's/^/| /' conftest.$ac_ext >&5
       
   138 + 
       
   139 + 
       
   140 + fi
       
   141 + 
       
   142 + rm -f core conftest.err conftest.$ac_objext
       
   143 + 	 CC="$CC -n32"
       
   144 + 	 rm -f conftest.$ac_objext
       
   145 + if { (ac_try="$ac_compile"
       
   146 + case "(($ac_try" in
       
   147 +   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
       
   148 +   *) ac_try_echo=$ac_try;;
       
   149 + esac
       
   150 + eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
       
   151 + $as_echo "$ac_try_echo") >&5
       
   152 +   (eval "$ac_compile") 2>conftest.er1
       
   153 +   ac_status=$?
       
   154 +   grep -v '^ *+' conftest.er1 >conftest.err
       
   155 +   rm -f conftest.er1
       
   156 +   cat conftest.err >&5
       
   157 +   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
       
   158 +   (exit $ac_status); } && {
       
   159 + 	 test -z "$ac_c_werror_flag" ||
       
   160 + 	 test ! -s conftest.err
       
   161 +        } && test -s conftest.$ac_objext; then
       
   162 +   ac_cv_sys_largefile_CC=' -n32'; break
       
   163 + else
       
   164 +   $as_echo "$as_me: failed program was:" >&5
       
   165 + sed 's/^/| /' conftest.$ac_ext >&5
       
   166 + 
       
   167 + 
       
   168 + fi
       
   169 + 
       
   170 + rm -f core conftest.err conftest.$ac_objext
       
   171 + 	 break
       
   172 +        done
       
   173 +        CC=$ac_save_CC
       
   174 +        rm -f conftest.$ac_ext
       
   175 +     fi
       
   176 + fi
       
   177 + { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
       
   178 + $as_echo "$ac_cv_sys_largefile_CC" >&6; }
       
   179 +   if test "$ac_cv_sys_largefile_CC" != no; then
       
   180 +     CC=$CC$ac_cv_sys_largefile_CC
       
   181 +   fi
       
   182 + 
       
   183 +   { $as_echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
       
   184 + $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
       
   185 + if test "${ac_cv_sys_file_offset_bits+set}" = set; then
       
   186 +   $as_echo_n "(cached) " >&6
       
   187 + else
       
   188 +   while :; do
       
   189 +   cat >conftest.$ac_ext <<_ACEOF
       
   190 + /* confdefs.h.  */
       
   191 + _ACEOF
       
   192 + cat confdefs.h >>conftest.$ac_ext
       
   193 + cat >>conftest.$ac_ext <<_ACEOF
       
   194 + /* end confdefs.h.  */
       
   195 + #include <sys/types.h>
       
   196 +  /* Check that off_t can represent 2**63 - 1 correctly.
       
   197 +     We can't simply define LARGE_OFF_T to be 9223372036854775807,
       
   198 +     since some C++ compilers masquerading as C compilers
       
   199 +     incorrectly reject 9223372036854775807.  */
       
   200 + #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
       
   201 +   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
       
   202 + 		       && LARGE_OFF_T % 2147483647 == 1)
       
   203 + 		      ? 1 : -1];
       
   204 + int
       
   205 + main ()
       
   206 + {
       
   207 + 
       
   208 +   ;
       
   209 +   return 0;
       
   210 + }
       
   211 + _ACEOF
       
   212 + rm -f conftest.$ac_objext
       
   213 + if { (ac_try="$ac_compile"
       
   214 + case "(($ac_try" in
       
   215 +   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
       
   216 +   *) ac_try_echo=$ac_try;;
       
   217 + esac
       
   218 + eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
       
   219 + $as_echo "$ac_try_echo") >&5
       
   220 +   (eval "$ac_compile") 2>conftest.er1
       
   221 +   ac_status=$?
       
   222 +   grep -v '^ *+' conftest.er1 >conftest.err
       
   223 +   rm -f conftest.er1
       
   224 +   cat conftest.err >&5
       
   225 +   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
       
   226 +   (exit $ac_status); } && {
       
   227 + 	 test -z "$ac_c_werror_flag" ||
       
   228 + 	 test ! -s conftest.err
       
   229 +        } && test -s conftest.$ac_objext; then
       
   230 +   ac_cv_sys_file_offset_bits=no; break
       
   231 + else
       
   232 +   $as_echo "$as_me: failed program was:" >&5
       
   233 + sed 's/^/| /' conftest.$ac_ext >&5
       
   234 + 
       
   235 + 
       
   236 + fi
       
   237 + 
       
   238 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
       
   239 +   cat >conftest.$ac_ext <<_ACEOF
       
   240 + /* confdefs.h.  */
       
   241 + _ACEOF
       
   242 + cat confdefs.h >>conftest.$ac_ext
       
   243 + cat >>conftest.$ac_ext <<_ACEOF
       
   244 + /* end confdefs.h.  */
       
   245 + #define _FILE_OFFSET_BITS 64
       
   246 + #include <sys/types.h>
       
   247 +  /* Check that off_t can represent 2**63 - 1 correctly.
       
   248 +     We can't simply define LARGE_OFF_T to be 9223372036854775807,
       
   249 +     since some C++ compilers masquerading as C compilers
       
   250 +     incorrectly reject 9223372036854775807.  */
       
   251 + #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
       
   252 +   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
       
   253 + 		       && LARGE_OFF_T % 2147483647 == 1)
       
   254 + 		      ? 1 : -1];
       
   255 + int
       
   256 + main ()
       
   257 + {
       
   258 + 
       
   259 +   ;
       
   260 +   return 0;
       
   261 + }
       
   262 + _ACEOF
       
   263 + rm -f conftest.$ac_objext
       
   264 + if { (ac_try="$ac_compile"
       
   265 + case "(($ac_try" in
       
   266 +   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
       
   267 +   *) ac_try_echo=$ac_try;;
       
   268 + esac
       
   269 + eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
       
   270 + $as_echo "$ac_try_echo") >&5
       
   271 +   (eval "$ac_compile") 2>conftest.er1
       
   272 +   ac_status=$?
       
   273 +   grep -v '^ *+' conftest.er1 >conftest.err
       
   274 +   rm -f conftest.er1
       
   275 +   cat conftest.err >&5
       
   276 +   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
       
   277 +   (exit $ac_status); } && {
       
   278 + 	 test -z "$ac_c_werror_flag" ||
       
   279 + 	 test ! -s conftest.err
       
   280 +        } && test -s conftest.$ac_objext; then
       
   281 +   ac_cv_sys_file_offset_bits=64; break
       
   282 + else
       
   283 +   $as_echo "$as_me: failed program was:" >&5
       
   284 + sed 's/^/| /' conftest.$ac_ext >&5
       
   285 + 
       
   286 + 
       
   287 + fi
       
   288 + 
       
   289 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
       
   290 +   ac_cv_sys_file_offset_bits=unknown
       
   291 +   break
       
   292 + done
       
   293 + fi
       
   294 + { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
       
   295 + $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
       
   296 + case $ac_cv_sys_file_offset_bits in #(
       
   297 +   no | unknown) ;;
       
   298 +   *)
       
   299 + cat >>confdefs.h <<_ACEOF
       
   300 + #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
       
   301 + _ACEOF
       
   302 + ;;
       
   303 + esac
       
   304 + rm -rf conftest*
       
   305 +   if test $ac_cv_sys_file_offset_bits = unknown; then
       
   306 +     { $as_echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
       
   307 + $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
       
   308 + if test "${ac_cv_sys_large_files+set}" = set; then
       
   309 +   $as_echo_n "(cached) " >&6
       
   310 + else
       
   311 +   while :; do
       
   312 +   cat >conftest.$ac_ext <<_ACEOF
       
   313 + /* confdefs.h.  */
       
   314 + _ACEOF
       
   315 + cat confdefs.h >>conftest.$ac_ext
       
   316 + cat >>conftest.$ac_ext <<_ACEOF
       
   317 + /* end confdefs.h.  */
       
   318 + #include <sys/types.h>
       
   319 +  /* Check that off_t can represent 2**63 - 1 correctly.
       
   320 +     We can't simply define LARGE_OFF_T to be 9223372036854775807,
       
   321 +     since some C++ compilers masquerading as C compilers
       
   322 +     incorrectly reject 9223372036854775807.  */
       
   323 + #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
       
   324 +   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
       
   325 + 		       && LARGE_OFF_T % 2147483647 == 1)
       
   326 + 		      ? 1 : -1];
       
   327 + int
       
   328 + main ()
       
   329 + {
       
   330 + 
       
   331 +   ;
       
   332 +   return 0;
       
   333 + }
       
   334 + _ACEOF
       
   335 + rm -f conftest.$ac_objext
       
   336 + if { (ac_try="$ac_compile"
       
   337 + case "(($ac_try" in
       
   338 +   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
       
   339 +   *) ac_try_echo=$ac_try;;
       
   340 + esac
       
   341 + eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
       
   342 + $as_echo "$ac_try_echo") >&5
       
   343 +   (eval "$ac_compile") 2>conftest.er1
       
   344 +   ac_status=$?
       
   345 +   grep -v '^ *+' conftest.er1 >conftest.err
       
   346 +   rm -f conftest.er1
       
   347 +   cat conftest.err >&5
       
   348 +   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
       
   349 +   (exit $ac_status); } && {
       
   350 + 	 test -z "$ac_c_werror_flag" ||
       
   351 + 	 test ! -s conftest.err
       
   352 +        } && test -s conftest.$ac_objext; then
       
   353 +   ac_cv_sys_large_files=no; break
       
   354 + else
       
   355 +   $as_echo "$as_me: failed program was:" >&5
       
   356 + sed 's/^/| /' conftest.$ac_ext >&5
       
   357 + 
       
   358 + 
       
   359 + fi
       
   360 + 
       
   361 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
       
   362 +   cat >conftest.$ac_ext <<_ACEOF
       
   363 + /* confdefs.h.  */
       
   364 + _ACEOF
       
   365 + cat confdefs.h >>conftest.$ac_ext
       
   366 + cat >>conftest.$ac_ext <<_ACEOF
       
   367 + /* end confdefs.h.  */
       
   368 + #define _LARGE_FILES 1
       
   369 + #include <sys/types.h>
       
   370 +  /* Check that off_t can represent 2**63 - 1 correctly.
       
   371 +     We can't simply define LARGE_OFF_T to be 9223372036854775807,
       
   372 +     since some C++ compilers masquerading as C compilers
       
   373 +     incorrectly reject 9223372036854775807.  */
       
   374 + #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
       
   375 +   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
       
   376 + 		       && LARGE_OFF_T % 2147483647 == 1)
       
   377 + 		      ? 1 : -1];
       
   378 + int
       
   379 + main ()
       
   380 + {
       
   381 + 
       
   382 +   ;
       
   383 +   return 0;
       
   384 + }
       
   385 + _ACEOF
       
   386 + rm -f conftest.$ac_objext
       
   387 + if { (ac_try="$ac_compile"
       
   388 + case "(($ac_try" in
       
   389 +   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
       
   390 +   *) ac_try_echo=$ac_try;;
       
   391 + esac
       
   392 + eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
       
   393 + $as_echo "$ac_try_echo") >&5
       
   394 +   (eval "$ac_compile") 2>conftest.er1
       
   395 +   ac_status=$?
       
   396 +   grep -v '^ *+' conftest.er1 >conftest.err
       
   397 +   rm -f conftest.er1
       
   398 +   cat conftest.err >&5
       
   399 +   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
       
   400 +   (exit $ac_status); } && {
       
   401 + 	 test -z "$ac_c_werror_flag" ||
       
   402 + 	 test ! -s conftest.err
       
   403 +        } && test -s conftest.$ac_objext; then
       
   404 +   ac_cv_sys_large_files=1; break
       
   405 + else
       
   406 +   $as_echo "$as_me: failed program was:" >&5
       
   407 + sed 's/^/| /' conftest.$ac_ext >&5
       
   408 + 
       
   409 + 
       
   410 + fi
       
   411 + 
       
   412 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
       
   413 +   ac_cv_sys_large_files=unknown
       
   414 +   break
       
   415 + done
       
   416 + fi
       
   417 + { $as_echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
       
   418 + $as_echo "$ac_cv_sys_large_files" >&6; }
       
   419 + case $ac_cv_sys_large_files in #(
       
   420 +   no | unknown) ;;
       
   421 +   *)
       
   422 + cat >>confdefs.h <<_ACEOF
       
   423 + #define _LARGE_FILES $ac_cv_sys_large_files
       
   424 + _ACEOF
       
   425 + ;;
       
   426 + esac
       
   427 + rm -rf conftest*
       
   428 +   fi
       
   429 + fi
       
   430 + 
       
   431 + 
       
   432   { $as_echo "$as_me:$LINENO: checking for st_blksize" >&5
       
   433   $as_echo_n "checking for st_blksize... " >&6; }
       
   434   cat >conftest.$ac_ext <<_ACEOF
       
   435 *** ../vim-7.2.412/src/version.c	2010-05-07 15:51:59.000000000 +0200
       
   436 --- src/version.c	2010-05-07 16:04:29.000000000 +0200
       
   437 ***************
       
   438 *** 683,684 ****
       
   439 --- 683,686 ----
       
   440   {   /* Add new patch number below this line */
       
   441 + /**/
       
   442 +     413,
       
   443   /**/
       
   444 
       
   445 -- 
       
   446 How To Keep A Healthy Level Of Insanity:
       
   447 2. Page yourself over the intercom. Don't disguise your voice.
       
   448 
       
   449  /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
       
   450 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
       
   451 \\\        download, build and distribute -- http://www.A-A-P.org        ///
       
   452  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///