1// uassert.h 2 3#ifndef UASSERT_H 4#define UASSERT_H 5 6#if PLATFORM_ANDROID 7#include <stdio.h> 8 9#undef assert 10#define assert(x) _uassert((x), #x, __FILE__, __LINE__) 11 12static void _uassert(int x, const char *xstr, const char *file, int line) { 13 if (!x) { 14 printf("assert %s failed at %s:%d\n", xstr, file, line); 15 } 16} 17#else 18#include <assert.h> 19#endif 20 21#endif 22