[PATCH] Fix libedit detection on *BSD OS's
Poul-Henning Kamp
phk at phk.freebsd.dk
Thu Apr 26 18:10:57 CEST 2012
In message <20120426070128.GA26996 at rox.home.comstyle.com>, Brad Smith writes:
Thanks, committed.
>On Thu, Apr 26, 2012 at 02:13:40AM -0400, Brad Smith wrote:
>> On 02/01/12 2:03 PM, Brad wrote:
>> >The following patch allows the autoconf script to detect the presence of
>> >libedit when there isn't a pkg-config file present and thus allowing
>> >Varnish to detect libedit on OpenBSD/FreeBSD/NetBSD/DragonFly.
>> >
>> >diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c
>> >index bb5cc8e..90532a8 100644
>> >--- a/bin/varnishadm/varnishadm.c
>> >+++ b/bin/varnishadm/varnishadm.c
>> >@@ -33,8 +33,12 @@
>> >
>> > #ifdef HAVE_LIBEDIT
>> > #include<stdio.h>
>> >+#ifdef HAVE_READLINE_READLINE_H
>> >+#include<readline/readline.h>
>> >+#else
>> > #include<editline/readline.h>
>> > #endif
>> >+#endif
>> >
>> > #include<errno.h>
>> > #include<fcntl.h>
>>
>> This part of the diff was not commited and the tree is broken
>> at the moment.
>
>Here is an updated diff to fix the build on OpenBSD/NetBSD/DragonFly.
>
>
>diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c
>index f3b8b69..aff9336 100644
>--- a/bin/varnishadm/varnishadm.c
>+++ b/bin/varnishadm/varnishadm.c
>@@ -35,6 +35,8 @@
> # include <stdio.h>
> # ifdef HAVE_EDIT_READLINE_READLINE_H
> # include <edit/readline/readline.h>
>+# elif HAVE_READLINE_READLINE_H
>+# include <readline/readline.h>
> # else
> # include <editline/readline.h>
> # endif
>
>--
>This message has been scanned for viruses and
>dangerous content by MailScanner, and is
>believed to be clean.
>
>
>_______________________________________________
>varnish-dev mailing list
>varnish-dev at varnish-cache.org
>https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
>
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the varnish-dev
mailing list