Hi,

It seems that recently the GNU coreutils programs now have unreadable
--help output due to printing large amounts of terminal control
sequences which are not interpreted as expected by e.g. GNU mach, and
probably a lot of other terminals since they seem to be printed
unconditionally (even when redirecting to a file...)

I found the configure options --disable-bold-man-page-references and
--disable-manual-url, but unfortunately these do not actually work:
when these options are used, everything gets built OK but then chroot
--help segfaults.  The build ultimately fails when it runs help2man on
chroot.

This appears to be because the fallback call to vprintf in oprintf_
passes an invalid va_list so it does not work at all.  The following
patch corrects this problem:

--- coreutils-9.12/src/system.h.orig
+++ coreutils-9.12/src/system.h
@@ -734,7 +734,9 @@
 
   if (buflen < 0)
     {
+      va_start (args, message);
       vprintf (message, args);
+      va_end (args);
       return;
     }
 
Cheers,
  Nick



Reply via email to