lkml.org 
[lkml]   [1999]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectstable kernel macro?
Is there a generic way to detect, via the C pre-processor, whether the
kernel is a stable or experimental series?

I would like to do something in my code like

#if LINUX_SERIES_EXPERIMENTAL
#define assert (expr) if (!(expr)) {...}
#else /* LINUX_SERIES_STABLE, or neither symbol exists */
#define assert (expr)
#endif

so that lightweight assertions are in the experimental series, but
magically disappear in the stable series.

Thanks,

Jeff

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:1.453 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site