DragonFly commits List (threaded) for 2010-07
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
git: math.h: Convert HUGE_VALL to constant, from const-qualified var
commit d1c42bb23082b2a1c10016ee94c3f7cdb678a2e8
Author: Stathis Kamperis <beket@dragonflybsd.org>
Date: Wed Jun 30 23:56:06 2010 +0300
math.h: Convert HUGE_VALL to constant, from const-qualified var
Define HUGE_VALL via a compiler builtin. If the compiler doesn't
support it, we just fallback to previous situation. Both gcc and
clang play well with it.
This patch allows us to:
1. use HUGE_VALL as initializer element for objects with static
storage duration
2. not worry about the format of long double (e.g., 96bit vs 128bit)
3. not worry about things like endianness
Briefly-discussed-with: corecode@, swildner@, but put the blame on me
if I broke something for you.
Special-thanks-to: swildner@ for checking code with clang.
P.S. HUGE_VAL{,F} already do the right thing.
Summary of changes:
include/math.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/d1c42bb23082b2a1c10016ee94c3f7cdb678a2e8
--
DragonFly BSD source repository
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]