diff options
author | Eivind Eklund <eivind@FreeBSD.org> | 1999-01-23 15:07:10 +0000 |
---|---|---|
committer | Eivind Eklund <eivind@FreeBSD.org> | 1999-01-23 15:07:10 +0000 |
commit | 458a924b1d1fa839d75fa45470f9a663f9f19be9 (patch) | |
tree | 4938e6e043d0ebbb3e3bbcae68e03b790c585736 | |
parent | a29a298674da9ddd60806dff71bde324ae6c9fd1 (diff) |
Notes
-rw-r--r-- | usr.bin/xlint/xlint/xlint.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/usr.bin/xlint/xlint/xlint.c b/usr.bin/xlint/xlint/xlint.c index 84799b44db6a2..5e3b0fd87682c 100644 --- a/usr.bin/xlint/xlint/xlint.c +++ b/usr.bin/xlint/xlint/xlint.c @@ -284,6 +284,12 @@ usage() terminate(-1); } +/* Transform the value of a preprocessor symbol to a string, by using + ANSI features of the preprocessor. STRINGIZEINT() is for internal + use. */ +#define STRINGIZEINT(a) #a +#define STRINGIZE(a) STRINGIZEINT(a) + int main(argc, argv) int argc; @@ -325,12 +331,8 @@ main(argc, argv) appcstrg(&cppflags, "-$"); appcstrg(&cppflags, "-C"); appcstrg(&cppflags, "-Wcomment"); -#if defined (__FreeBSD__) && (__FreeBSD__ == 4) - appcstrg(&cppflags, "-D__FreeBSD__=4"); -#elif defined (__FreeBSD__) && (__FreeBSD__ == 3) - appcstrg(&cppflags, "-D__FreeBSD__=3"); -#elif defined (__FreeBSD__) && (__FreeBSD__ == 2) - appcstrg(&cppflags, "-D__FreeBSD__=2"); +#ifdef __FreeBSD__ + appcstrg(&cppflags, "-D__FreeBSD__=" STRINGIZE(__FreeBSD__)); #else # error "This ain't NetBSD. You lose!" appcstrg(&cppflags, "-D__NetBSD__"); |