Skip to content

Commit cc65d5d

Browse files
committed
customize assert, do not define bool if C++, fix typedef typo
1 parent 2251e99 commit cc65d5d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/tbprobe.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
SOFTWARE.
2323
*/
2424

25+
#ifdef TB_ASSERT
26+
#define assert(x) TB_ASSERT(x)
27+
#else
2528
#include <assert.h>
29+
#endif
30+
2631
#ifdef __cplusplus
2732
#include <atomic>
2833
#else
@@ -32,11 +37,15 @@ SOFTWARE.
3237
#include <stdio.h>
3338
#include <stdlib.h>
3439
#include <string.h>
40+
41+
#ifndef __cplusplus
3542
#ifdef TB_NO_STDBOOL
36-
#typedef uint8 bool
43+
typedef uint8 bool
3744
#else
3845
#include <stdbool.h>
3946
#endif
47+
#endif
48+
4049
#include "tbprobe.h"
4150

4251
#define TB_PIECES 7

0 commit comments

Comments
 (0)