git: <sys/cdefs.h>: Use _Static_assert for CTASSERT.

Sascha Wildner swildner at crater.dragonflybsd.org
Sat Mar 29 02:09:14 PDT 2014


commit 21c9b87db1815625fe21f025ed40acb155396299
Author: Sascha Wildner <saw at online.de>
Date:   Sat Mar 29 10:07:03 2014 +0100

    <sys/cdefs.h>: Use _Static_assert for CTASSERT.
    
    Move CTASSERT from <sys/systm.h> to <sys/cdefs.h> and use _Static_assert
    for its definition (which gives us a better error message in case it is
    triggered).
    
    But if there is no support for _Static_assert or static_assert in the
    compiler, use the previous typedef method.

Summary of changes:
 sys/sys/cdefs.h | 8 ++++++++
 sys/sys/systm.h | 4 ----
 2 files changed, 8 insertions(+), 4 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/21c9b87db1815625fe21f025ed40acb155396299


-- 
DragonFly BSD source repository



More information about the Commits mailing list