Bug#348170: vim: FTBFS on hurd-i386: Unconditional use of system
limit macro
mbanck at debian.org
mbanck at debian.org
Sun Jan 15 12:43:42 UTC 2006
Package: vim
Version: 1:6.4-004+2
Severity: important
Tags: patch
Hi,
your package failed to autobuild on hurd-i386:
Automatic build of vim_1:6.4-004+2 on beethoven by sbuild/hurd-i386 79
Build started at 20051221-1255
******************************************************************************
Checking available source versions...
Fetching source files...
Reading Package Lists...
Building Dependency Tree...
Need to get 5918kB of source archives.
Get:1 http://people.debian.org unstable/main vim 1:6.4-004+2 (dsc) [1353B]
Get:2 http://people.debian.org unstable/main vim 1:6.4-004+2 (tar) [5741kB]
Get:3 http://people.debian.org unstable/main vim 1:6.4-004+2 (diff) [175kB]
Fetched 5918kB in 33s (177kB/s)
Download complete and in download only mode
** Using build dependencies supplied by package:
Build-Depends: debhelper (>= 4.2.21), dpkg (>> 1.7.0), bzip2, perl (>= 5.6), libgpmg1-dev [!hurd-i386] | not+linux-gnu, libperl-dev (>= 5.6), tcl8.4-dev [!hurd-i386] | tcl8.3-dev [!hurd-i386], python-dev, libncurses5-dev, ruby, ruby1.8-dev | ruby-dev, libgtk2.0-dev (>= 2.2) | libgtk1.2-dev, libgnomeui-dev [!hurd-i386], lesstif2-dev
Build-Conflicts: libperl-dev (= 5.8.4-1)
** Filtered missing central deps that are dependencies of or provide build-deps:
xlibs-dev (>> 4.1.0), zlib1g-dev (>= 1:1.2.1)
[...]
Checking correctness of source dependencies...
Toolchain package versions: libc0.3-dev_2.3.5-6 gcc-4.0_4.0.2-4 g++-4.0_4.0.2-4 binutils_2.16.1-2 libstdc++6-4.0-dev_4.0.2-4 libstdc++6_4.0.2-4
------------------------------------------------------------------------------
dpkg-source: extracting vim in vim-6.4
dpkg-source: unpacking vim_6.4.orig.tar.gz
dpkg-source: applying /org/buildd/build/vim_6.4-004+2.diff.gz
dpkg-buildpackage: source package is vim
dpkg-buildpackage: source version is 1:6.4-004+2
dpkg-buildpackage: host architecture hurd-i386
[...]
applying debian patch: 304_memline.c.diff
[...]
gcc -c -I. -Iproto -DHAVE_CONFIG_H -O2 -g -Wall -DFEAT_AUTOCMD -DFEAT_BYTEOFF -DFEAT_CMDL_COMPL -DFEAT_CMDHIST -DFEAT_CMDL_INFO -DFEAT_COMMENTS -DFEAT_DIFF -DFEAT_DIGRAPHS -DFEAT_EVAL -DFEAT_SEARCH_EXTRA -DFEAT_SEARCHPATH -DFEAT_INS_EXPAND -DFEAT_LISTCMDS -DFEAT_QUICKFIX -DFEAT_SCROLLBIND -DFEAT_SMARTINDENT -DFEAT_VIMINFO -DFEAT_VERTSPLIT -DFEAT_VISUALEXTRA -I/usr/X11R6/include -o objects/memline.o memline.c
In file included from vim.h:154,
from memline.c:48:
feature.h:126:1: warning: "FEAT_CMDHIST" redefined
<command line>:1:1: warning: this is the location of the previous definition
memline.c: In function 'resolvesymlink':
memline.c:3259: error: 'PATH_MAX' undeclared (first use in this function)
memline.c:3259: error: (Each undeclared identifier is reported only once
memline.c:3259: error: for each function it appears in.)
memline.c:3292: warning: pointer targets in passing argument 1 of 'vim_strsave' differ in signedness
memline.c:3259: warning: unused variable 'tmp'
memline.c: In function 'makeswapname':
memline.c:3326: error: 'PATH_MAX' undeclared (first use in this function)
memline.c:3326: warning: unused variable 'fname'
make[2]: *** [objects/memline.o] Error 1
make[2]: Leaving directory `/build/buildd/vim-6.4/vim64/src'
make[1]: *** [first] Error 2
make[1]: Leaving directory `/build/buildd/vim-6.4/vim64'
make: *** [build-stamp-vim-tiny] Error 2
rm configure-stamp-vim-tiny
******************************************************************************
Build finished at 20051221-1305
FAILED [dpkg-buildpackage died]
The full build log can be found here:
http://experimental.ftbfs.de/fetch.php?&pkg=vim&ver=1%3A6.4-004%2B2&arch=hurd-i386&stamp=1135166920&file=log&as=raw
Patch #304 introduced an unconditional use of PATH_MAX. As there is no
path name limit on GNU, PATH_MAX need not be defined. The attached
patch updates #304 to #define PATH_MAX if it is not.
cheers,
Michael
-------------- next part --------------
diff -u vim64.new/src/memline.c vim64.new/src/memline.c
--- vim64.new/src/memline.c 2005-11-18 09:18:01.000000000 -0500
+++ vim64.new/src/memline.c 2005-11-25 17:41:04.000000000 -0500
@@ -58,6 +58,10 @@
# include <proto/dos.h> /* for Open() and Close() */
#endif
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
typedef struct block0 ZERO_BL; /* contents of the first block */
typedef struct pointer_block PTR_BL; /* contents of a pointer block */
typedef struct data_block DATA_BL; /* contents of a data block */
@@ -3251,6 +3255,69 @@
}
}
+ int
+resolvesymlink(fname, buf, bufsiz)
+ char_u *fname, *buf;
+ size_t bufsiz;
+{
+ char_u tmp[PATH_MAX];
+ int ret;
+
+ if (fname == NULL)
+ return 0;
+ STRCPY(tmp, fname);
+ do
+ {
+ ret = readlink((char *) tmp, (char *) buf, bufsiz);
+ if (ret == -1)
+ {
+ if (errno == EINVAL) /* found non-symlink */
+ STRCPY(buf, tmp);
+ else
+ return ret;
+ }
+ else
+ {
+ /*
+ * check whether the symlink is relative or absolute.
+ * If it's relative, build a new path based on the directory
+ * portion of the filename (if any) and the path the symlink
+ * points to.
+ */
+ if (!mch_isFullName(buf))
+ {
+ char_u *p, *dir;
+ p = tmp + STRLEN(tmp) - 1;
+ while (!vim_ispathsep(*p) && (p >= tmp))
+ --p;
+ if (p >= tmp) /* pathsep was found */
+ p = vim_strnsave(tmp, p - tmp);
+ else
+ p = vim_strsave(".");
+ dir = concat_fnames(p, buf, TRUE);
+ STRNCPY(tmp, dir, PATH_MAX);
+ vim_free(dir);
+ vim_free(p);
+ }
+ else
+ STRNCPY(tmp, buf, PATH_MAX);
+ }
+ } while (ret != -1);
+
+ /*
+ * Try to resolve the full name of the file so the swapfile name will be
+ * consistent even when opening a relative symlink from different working
+ * directories.
+ */
+ if (vim_FullName(buf, tmp, PATH_MAX, TRUE) == OK)
+ {
+ STRCPY(buf, tmp);
+ return 0;
+ }
+ else
+ return ret;
+}
+
/*
* make swap file name out of the file name and a directory name
*/
@@ -3260,6 +3327,8 @@
char_u *dir_name;
{
char_u *r, *s;
+ char_u fname[PATH_MAX];
+ char_u *fname_p = NULL;
#if defined(UNIX) || defined(WIN3264) /* Need _very_ long file names */
s = dir_name + STRLEN(dir_name);
@@ -3275,6 +3344,12 @@
}
#endif
+ if (buf->b_fname != NULL)
+ {
+ fname_p = fname;
+ if (resolvesymlink(buf->b_fname, fname, PATH_MAX) == -1)
+ fname_p = buf->b_fname; /* symlink resolution failed */
+ }
r = buf_modname(
#ifdef SHORT_FNAME
TRUE,
@@ -3285,7 +3360,7 @@
/* Avoid problems if fname has special chars, eg <Wimp$Scrap> */
buf->b_ffname,
#else
- buf->b_fname,
+ fname_p,
#endif
(char_u *)
#if defined(VMS) || defined(RISCOS)
More information about the pkg-vim-maintainers
mailing list