Differences From Artifact [76ff6117a8]:
- File src/macros.h — part of check-in [ae9f0dc0e0] at 2014-03-05 01:36:04 on branch trunk — Add OF_ROUND_UP_POW2 macro (user: js, size: 10208) [annotate] [blame] [check-ins using]
To Artifact [9ad949e286]:
- File
src/macros.h
— part of check-in
[61369b9d26]
at
2014-03-19 18:05:42
on branch trunk
— macros.h: Never define static_assert to assert
static_asserts can be used in places where asserts won't work and take
two parameters, while asserts only take one. (user: js, size: 10165) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
118 119 120 121 122 123 124 | #define OF_ENSURE(cond) \ if (!(cond)) { \ fprintf(stderr, "Failed to ensure condition in " \ __FILE__ ":%d:\n" #cond "\n", __LINE__); \ abort(); \ } | | | < | < < < | 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | #define OF_ENSURE(cond) \ if (!(cond)) { \ fprintf(stderr, "Failed to ensure condition in " \ __FILE__ ":%d:\n" #cond "\n", __LINE__); \ abort(); \ } #if __STDC_VERSION__ >= 201112L && !defined(static_assert) /* C11 compiler, but old libc */ # define static_assert _Static_assert #endif #if !defined(_WIN32) && !defined(__DJGPP__) # define OF_PATH_DELIMITER '/' # define OF_PATH_DELIMITER_STRING @"/" # define OF_IS_PATH_DELIMITER(c) (c == '/') #else |
︙ | ︙ |