bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: patch-2.5.4 not building on FreeBSD-5.1


From: Jeremy C. Reed
Subject: Re: patch-2.5.4 not building on FreeBSD-5.1
Date: Sat, 6 Dec 2003 08:37:12 -0800 (PST)

On Sat, 6 Dec 2003, Sam Halliday wrote:

> i wish to have all the GNU tools on all the OS i use, so i tried to
> compile patch-2.5.4 on a FreeBSD-5.1 pentium4 system (i didnt install
> anything from the ports as i'd prefer to compile them myself to have
> recent verisons of everything). unfortunately the compile fails, does
> anyone know how to fix this?

Yes, have a look at how the FreeBSD ports does it:

perl -pi -e 's!HAVE_SETMODE!HAVE_SETMODE_DISABLE!' config.hin

Or doing some searches in gnu.utils.bug archives I see emails suggesting
changing all lines (common.h, patch.c, pch.c):

-#if HAVE_SETMODE
+#if HAVE_SETMODE && O_BINARY

By the way, NetBSD's fix is:

        ${MV} ${WRKSRC}/pch.c ${WRKSRC}/pch.c.orig
        ${AWK} '/#include <pch.h>/{print $$0 "\n#include <sys/param.h>";next;}\
                /^#if HAVE_SETMODE/                                     \
                {gsub(/^#if HAVE_SETMODE/,"#if defined(HAVE_SETMODE) \\&\\& 
(!(defined(BSD) \\&\\& BSD >= 199306))");print $$0; next; }                 \
                {print $$0;}'                                           \
                < ${WRKSRC}/pch.c.orig                                  \
                > ${WRKSRC}/pch.c



   Jeremy C. Reed
   http://www.reedmedia.net/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]