All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Dibowitz <phil@ipom.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: [PATCH] libnetfilter_conntrack: add extern C's to public headers
Date: Thu, 29 Mar 2007 15:12:20 -0700	[thread overview]
Message-ID: <20070329221220.GC15170@ipom.com> (raw)
In-Reply-To: <460C382E.6020108@netfilter.org>

[-- Attachment #1: Type: text/plain, Size: 1428 bytes --]

On Fri, Mar 30, 2007 at 12:05:34AM +0200, Pablo Neira Ayuso wrote:
> Sorry for the late reply.
> 
> Phil Dibowitz wrote:
> > --- libnetfilter_conntrack-0.0.50/include/libnetfilter_conntrack/linux_nfnetlink_conntrack.h.orig	2007-03-19 22:53:08.000000000 -0700
> > +++ libnetfilter_conntrack-0.0.50/include/libnetfilter_conntrack/linux_nfnetlink_conntrack.h	2007-03-19 22:53:30.000000000 -0700
> > @@ -2,6 +2,10 @@
> >  #define _IPCONNTRACK_NETLINK_H
> >  #include <libnfnetlink/linux_nfnetlink.h>
> >  
> > +#ifdef __cplusplus
> > +extern "C" {
> > +#endif
> > +
> 
> Do you really need to include the extern "C" in linux_nfnetlink_conntrack.h?

I believe so, yes. The alternative is to put it around the #include of
linux_nfnetlink_conntrack.h inside of libnetfilter_conntrack.h, but that isn't
as clean and prevents anyone from using it directly. Anything in /usr/include
is fair game for using in an #include, and thus should be extern-C-safe.

-- 
Phil Dibowitz                             phil@ipom.com
Open Source software and tech docs        Insanity Palace of Metallica
http://www.phildev.net/                   http://www.ipom.com/

"Never write it in C if you can do it in 'awk';
 Never do it in 'awk' if 'sed' can handle it;
 Never use 'sed' when 'tr' can do the job;
 Never invoke 'tr' when 'cat' is sufficient;
 Avoid using 'cat' whenever possible" -- Taylor's Laws of Programming


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2007-03-29 22:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-20  6:07 [PATCH] libnetfilter_conntrack: add extern C's to public headers Phil Dibowitz
2007-03-29  5:55 ` Phil Dibowitz
2007-03-29 22:05 ` Pablo Neira Ayuso
2007-03-29 22:12   ` Phil Dibowitz [this message]
2007-03-29 22:35     ` Pablo Neira Ayuso
2007-03-29 23:11       ` Phil Dibowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070329221220.GC15170@ipom.com \
    --to=phil@ipom.com \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.