Package: nvi
Version: 1.81.6-21
Severity: normal

Dear Maintainer,

   $ nvi a b
   # ex command
   :next
   # error
   BDB0171 seek: 1024: (1 * 1024) + 0: Bad file descriptor

With the above sequence, nvi fails to open the next file ("b").

With some debugging, looks like "configure" failed to detect some by
-Wimplicit-function-declaration error.

With the attached patch (directly modify "configure" like the exists
patch), nvi works fine for me.

Thanks.

-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.9.3 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages nvi depends on:
ii  init-system-helpers  1.66
ii  libc6                2.38-12
ii  libdb5.3t64          5.3.28+dfsg2-7
ii  libncursesw6         6.5-2
ii  libtinfo6            6.5-2

Versions of packages nvi recommends:
ii  nvi-doc  1.81.6-21

nvi suggests no packages.

-- no debconf information

-- 
OGAWA Hirofumi <hirof...@mail.parknet.co.jp>

From: OGAWA Hirofumi <hirof...@mail.parknet.co.jp>
Subject: Add more function prototypes to fix -Wimplicit-function-declaration
Date: Mon, 10 Jun 2024 21:16:51 +0900

Without this,

   $ nvi a b
   # ex command
   :next
   # error
   BDB0171 seek: 1024: (1 * 1024) + 0: Bad file descriptor

Like the above, nvi fails to open the next file ("b").
---
 dist/configure |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dist/configure b/dist/configure
index d7fb54f..d78e87d 100755
--- a/dist/configure	2024-06-10 21:05:11.000000000 +0900
+++ b/dist/configure	2024-06-10 21:05:22.535640297 +0900
@@ -26719,6 +26719,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+#include <sys/file.h>
 #include <fcntl.h>
 int
 main ()
@@ -27507,7 +27508,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
+#include <stdlib.h>
 int
 main ()
 {
@@ -27632,6 +27633,8 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+#include <stdio.h>
+#include <stdlib.h>
 main(){char buf[20]; exit(sprintf(buf, "XXX") != 3);}
 _ACEOF
 rm -f conftest$ac_exeext
_

Reply via email to