[Libevent-users] evdns C++ incompatibility

Nick Mathewson nickm at freehaven.net
Tue Nov 6 22:57:15 EST 2007


On Tue, Oct 02, 2007 at 02:49:28AM -0400, Roger Clark wrote:
> At least on my system, gcc complains about 'class' being used in these
> places in evdns.h:

Hi, Roger!  I've checked in a possible fix for this as subversion
revision r486.  The fix will appear in the first 1.4 release, assuming
that it doesn't break anything else too badly.

For backward compatibility with existing C code, evdns_server_question
is now defined as:

struct evdns_server_question {
       int type;
#ifdef __cplusplus
       int dns_question_class;
#else
        /* You should refer to this field as "dns_question_class".  The
        * name "class" works in C for backward compatibility, and will be
        * removed in a future version. (1.5 or later). */
        int class;
#define dns_question_class class
#endif
        char name[1];
};

This should resolve bug 1826516 on the tracker.  Please let us know if
there are any remaining C++ issues with the header, or if you run into
anything else like this?

many thanks,
-- 
Nick Mathewson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: not available
Url : http://monkeymail.org/archives/libevent-users/attachments/20071106/3a74e69a/attachment.bin


More information about the Libevent-users mailing list