diff options
author | Roland McGrath <roland@gnu.org> | 2005-10-08 06:27:44 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2005-10-08 06:27:44 +0000 |
commit | faa26ad4cf1603c3b0c8ef09804aa1742fd4776a (patch) | |
tree | de91ce5225093cb7d274107d1681bc3343b678b0 | |
parent | b3b413967aaddc6311f0088a7cf96badcb4eaf52 (diff) | |
download | glibc-faa26ad4cf1603c3b0c8ef09804aa1742fd4776a.tar glibc-faa26ad4cf1603c3b0c8ef09804aa1742fd4776a.tar.gz glibc-faa26ad4cf1603c3b0c8ef09804aa1742fd4776a.tar.bz2 glibc-faa26ad4cf1603c3b0c8ef09804aa1742fd4776a.zip |
[BZ #1438]
2005-10-07 Roland McGrath <roland@redhat.com>
[BZ #1438]
* include/features.h: Make tests on _FORTIFY_SOURCE and __OPTIMIZE__
friendly to -Wundef.
(__USE_FORTIFY_LEVEL): Always define it, to 0 if nothing else.
-rw-r--r-- | include/features.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/features.h b/include/features.h index 822fe4987b..89f00dfe07 100644 --- a/include/features.h +++ b/include/features.h @@ -262,12 +262,15 @@ # define __USE_REENTRANT 1 #endif -#if _FORTIFY_SOURCE > 0 && __GNUC_PREREQ (4, 1) && __OPTIMIZE__ > 0 -# if _FORTIFY_SOURCE == 1 -# define __USE_FORTIFY_LEVEL 1 -# elif _FORTIFY_SOURCE > 1 +#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \ + && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0 +# if _FORTIFY_SOURCE > 1 # define __USE_FORTIFY_LEVEL 2 +# else +# define __USE_FORTIFY_LEVEL 1 # endif +#else +# define __USE_FORTIFY_LEVEL 0 #endif /* We do support the IEC 559 math functionality, real and complex. */ |