/*1* Copyright © 2017 Mozilla Foundation2*3* This program is made available under an ISC-style license. See the4* accompanying file LICENSE for details.5*/67#ifndef CUBEB_ASSERT8#define CUBEB_ASSERT910#include <stdio.h>11#include <stdlib.h>1213/**14* This allow using an external release assert method. This file should only15* export a function or macro called XASSERT that aborts the program.16*/1718#define XASSERT(expr) \19do { \20if (!(expr)) { \21fprintf(stderr, "%s:%d - fatal error: %s\n", __FILE__, __LINE__, #expr); \22abort(); \23} \24} while (0)2526#endif272829