<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>RE: [Libevent-users] [PATCH] TAILQ_ENTRY missing in evhttp.h on linux</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Then why does event.h go to the trouble of #ifndef TAILQ_ENTRY to handle the same issue?&nbsp; And why not have event.h include the file directly?<BR>
<BR>
<BR>
--<BR>
<BR>
paul<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: provos@gmail.com on behalf of Niels Provos<BR>
Sent: Sat 11/3/2007 6:56 PM<BR>
To: Paul Fisher<BR>
Cc: libevent-users@monkey.org<BR>
Subject: Re: [Libevent-users] [PATCH] TAILQ_ENTRY missing in evhttp.h on linux<BR>
<BR>
Try<BR>
<BR>
#include &lt;sys/queue.h&gt;<BR>
<BR>
before including evhttp.h<BR>
<BR>
Niels.<BR>
<BR>
On 10/30/07, Paul Fisher &lt;pfisher@alertlogic.net&gt; wrote:<BR>
&gt;<BR>
&gt;<BR>
&gt;<BR>
&gt; In using the latest 1.3e on linux, evhttp.h fails to compile because of a<BR>
&gt; missing definition of TAILQ_ENTRY in evhttp.h.&nbsp; This is due to the fact that<BR>
&gt; the workaround in event.h is #define'd and #undef'd within event.h and not<BR>
&gt; available to evhttp.h when defining &quot;struct evhttp_request&quot;.&nbsp; This patch<BR>
&gt; obviously fixes it:<BR>
&gt;<BR>
&gt;&nbsp; --- libevent-1.3e/evhttp.h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2007-08-25 13:49:22.000000000 -0500<BR>
&gt;&nbsp; +++ libevent-1.3e.002/evhttp.h&nbsp; 2007-10-29 22:32:07.000000000 -0500<BR>
&gt;&nbsp; @@ -108,7 +108,14 @@<BR>
&gt;&nbsp;&nbsp;&nbsp; * reasonable accessors.<BR>
&gt;&nbsp;&nbsp;&nbsp; */<BR>
&gt;&nbsp;&nbsp; struct evhttp_request {<BR>
&gt;&nbsp; +#if defined(TAILQ_ENTRY)<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TAILQ_ENTRY(evhttp_request) next;<BR>
&gt;&nbsp; +#else<BR>
&gt;&nbsp; +struct {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \<BR>
&gt;&nbsp; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct type *tqe_next;&nbsp; /* next element */&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \<BR>
&gt;&nbsp; +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct type **tqe_prev; /* address of previous next element */&nbsp; \<BR>
&gt;&nbsp; +}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; next;<BR>
&gt;&nbsp; +#endif<BR>
&gt;<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* the connection object that this request belongs to */<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct evhttp_connection *evcon;<BR>
&gt;<BR>
&gt;&nbsp; ... but it would be nice if this was coordinated with the definition in<BR>
&gt; event.h, possibly by simply not #undef'ing it from event.h.&nbsp; Anyway, if<BR>
&gt; there is a preference on how to fix this, I'd be glad to regenerate the<BR>
&gt; patch.<BR>
&gt;<BR>
&gt;<BR>
&gt;&nbsp; --<BR>
&gt;<BR>
&gt;&nbsp; paul<BR>
&gt; _______________________________________________<BR>
&gt; Libevent-users mailing list<BR>
&gt; Libevent-users@monkey.org<BR>
&gt; <A HREF="http://monkey.org/mailman/listinfo/libevent-users">http://monkey.org/mailman/listinfo/libevent-users</A><BR>
&gt;<BR>
&gt;<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>