All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manik Raina <manik@cisco.com>
To: linux-kernel@vger.kernel.org
Subject: query about use of IFDEFS
Date: Fri, 02 Nov 2001 19:06:19 +0530	[thread overview]
Message-ID: <3BE2A153.B9B06FD2@cisco.com> (raw)

hi,

which of the following be acceptable  in the linux kernel ?

1. first choice, you've put the static inline in the header
---------------------------------------

foo.h:

#ifdef CONFIG_BAR
void foo_init(void);
#else
static void __inline__ foo_init(void);

foo.c:

#ifdef CONFIG_BAR

void foo_init(void)
{
    do_some_stuff_here();
}

#else
#endif

2. you've left the conditional compilation only in the .c file
----------------------------------------

foo.h:

void foo_init(void);

foo.c:

void foo_init (void)
{

#ifdef CONFIG_BAR
        do_some_stuff_here();
#else
#endif
}


             reply	other threads:[~2001-11-02 13:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-02 13:36 Manik Raina [this message]
2001-11-02 21:30 ` query about use of IFDEFS Robert Love

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=3BE2A153.B9B06FD2@cisco.com \
    --to=manik@cisco.com \
    --cc=linux-kernel@vger.kernel.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.