summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@zimbu.org>2010-02-24 14:47:08 +0100
committerBram Moolenaar <bram@zimbu.org>2010-02-24 14:47:08 +0100
commita2dad4f805eb75f03b5cfcdd7cebd882b8e097d3 (patch)
tree833264fe7e1d5a5df347c6a5c66e5f184ea3557a
parent594d15d615d6c779754cd50db6a047aad2428905 (diff)
downloadvim-a2dad4f805eb75f03b5cfcdd7cebd882b8e097d3.tar.gz
updated for version 7.2.371v7.2.371v7-2-371
Problem: Build problems on Tandem NonStop. Solution: A few changes to #ifdefs (Joachim Schmitz)
-rwxr-xr-xsrc/auto/configure136
-rw-r--r--src/config.h.in1
-rw-r--r--src/configure.in6
-rw-r--r--src/if_cscope.c4
-rw-r--r--src/osdef1.h.in2
-rw-r--r--src/tag.c3
-rw-r--r--src/version.c2
-rw-r--r--src/vim.h4
8 files changed, 149 insertions, 9 deletions
diff --git a/src/auto/configure b/src/auto/configure
index c2f1d027..0362c5a8 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -14038,9 +14038,7 @@ fi
-
-
-for ac_func in bcmp fchdir fchown fseeko fsync ftello getcwd getpseudotty \
+for ac_func in bcmp fchdir fchown fsync getcwd getpseudotty \
getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \
memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
@@ -14146,6 +14144,138 @@ _ACEOF
fi
done
+{ $as_echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
+if test "${ac_cv_sys_largefile_source+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
+int
+main ()
+{
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_sys_largefile_source=no; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#define _LARGEFILE_SOURCE 1
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
+int
+main ()
+{
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_sys_largefile_source=1; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_cv_sys_largefile_source=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
+$as_echo "$ac_cv_sys_largefile_source" >&6; }
+case $ac_cv_sys_largefile_source in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
+_ACEOF
+;;
+esac
+rm -rf conftest*
+
+# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
+# in glibc 2.1.3, but that breaks too many other things.
+# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
+if test $ac_cv_sys_largefile_source != unknown; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FSEEKO 1
+_ACEOF
+
+fi
+
{ $as_echo "$as_me:$LINENO: checking for st_blksize" >&5
$as_echo_n "checking for st_blksize... " >&6; }
diff --git a/src/config.h.in b/src/config.h.in
index 2b2730eb..8fc8539c 100644
--- a/src/config.h.in
+++ b/src/config.h.in
@@ -144,7 +144,6 @@
#undef HAVE_FCHOWN
#undef HAVE_FSEEKO
#undef HAVE_FSYNC
-#undef HAVE_FTELLO
#undef HAVE_GETCWD
#undef HAVE_GETPSEUDOTTY
#undef HAVE_GETPWNAM
diff --git a/src/configure.in b/src/configure.in
index b7187996..177fa885 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -2642,14 +2642,16 @@ if test "x$vim_cv_getcwd_broken" = "xyes" ; then
AC_DEFINE(BAD_GETCWD)
fi
-dnl Check for functions in one big call, to reduce the size of configure
-AC_CHECK_FUNCS(bcmp fchdir fchown fseeko fsync ftello getcwd getpseudotty \
+dnl Check for functions in one big call, to reduce the size of configure.
+dnl Can only be used for functions that do not require any include.
+AC_CHECK_FUNCS(bcmp fchdir fchown fsync getcwd getpseudotty \
getpwnam getpwuid getrlimit gettimeofday getwd lstat memcmp \
memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
sigvec strcasecmp strerror strftime stricmp strncasecmp \
strnicmp strpbrk strtol tgetent towlower towupper iswupper \
usleep utime utimes)
+AC_FUNC_FSEEKO
dnl fstatfs() can take 2 to 4 arguments, try to use st_blksize if possible
AC_MSG_CHECKING(for st_blksize)
diff --git a/src/if_cscope.c b/src/if_cscope.c
index b2a4ce1a..b8fef288 100644
--- a/src/if_cscope.c
+++ b/src/if_cscope.c
@@ -2278,7 +2278,11 @@ cs_release_csp(i, freefnpp)
/* Use sigaction() to limit the waiting time to two seconds. */
sigemptyset(&sa.sa_mask);
sa.sa_handler = sig_handler;
+# ifdef SA_NODEFER
sa.sa_flags = SA_NODEFER;
+# else
+ sa.sa_flags = 0;
+# endif
sigaction(SIGALRM, &sa, &old);
alarm(2); /* 2 sec timeout */
diff --git a/src/osdef1.h.in b/src/osdef1.h.in
index bdc62479..8190c9b1 100644
--- a/src/osdef1.h.in
+++ b/src/osdef1.h.in
@@ -25,7 +25,7 @@ extern int fseek __ARGS((FILE *, long, int));
extern int fseeko __ARGS((FILE *, off_t, int));
#endif
extern long ftell __ARGS((FILE *));
-#ifdef HAVE_FTELLO
+#ifdef HAVE_FSEEKO
extern off_t ftello __ARGS((FILE *));
#endif
extern void rewind __ARGS((FILE *));
diff --git a/src/tag.c b/src/tag.c
index 5dc56d30..ba36de73 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -90,8 +90,9 @@ static char_u *tagmatchname = NULL; /* name of last used tag */
/*
* We use ftello() here, if available. It returns off_t instead of long,
* which helps if long is 32 bit and off_t is 64 bit.
+ * We assume that when fseeko() is available then ftello() is too.
*/
-#ifdef HAVE_FTELLO
+#ifdef HAVE_FSEEKO
# define ftell ftello
#endif
diff --git a/src/version.c b/src/version.c
index 212e34d7..1718aa52 100644
--- a/src/version.c
+++ b/src/version.c
@@ -682,6 +682,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 371,
+/**/
370,
/**/
369,
diff --git a/src/vim.h b/src/vim.h
index 804070ef..13f00ce9 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -52,7 +52,9 @@
/* user ID of root is usually zero, but not for everybody */
#ifdef __TANDEM
-# define _TANDEM_SOURCE
+# ifndef _TANDEM_SOURCE
+# define _TANDEM_SOURCE
+# endif
# include <floss.h>
# define ROOT_UID 65535
#else