public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* query about use of IFDEFS
@ 2001-11-02 13:36 Manik Raina
  2001-11-02 21:30 ` Robert Love
  0 siblings, 1 reply; 2+ messages in thread
From: Manik Raina @ 2001-11-02 13:36 UTC (permalink / raw)
  To: linux-kernel

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
}


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-11-02 21:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-02 13:36 query about use of IFDEFS Manik Raina
2001-11-02 21:30 ` Robert Love

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox