From 2aa4a82499d4becd2284cdb482213d541b8804dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 16:29:10 +0200 Subject: Adding upstream version 86.0.1. Signed-off-by: Daniel Baumann --- .../rust/cubeb-sys/libcubeb/src/cubeb_assert.h | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 third_party/rust/cubeb-sys/libcubeb/src/cubeb_assert.h (limited to 'third_party/rust/cubeb-sys/libcubeb/src/cubeb_assert.h') diff --git a/third_party/rust/cubeb-sys/libcubeb/src/cubeb_assert.h b/third_party/rust/cubeb-sys/libcubeb/src/cubeb_assert.h new file mode 100644 index 0000000000..9257a2c865 --- /dev/null +++ b/third_party/rust/cubeb-sys/libcubeb/src/cubeb_assert.h @@ -0,0 +1,26 @@ +/* + * Copyright © 2017 Mozilla Foundation + * + * This program is made available under an ISC-style license. See the + * accompanying file LICENSE for details. + */ + +#ifndef CUBEB_ASSERT +#define CUBEB_ASSERT + +#include +#include + +/** + * This allow using an external release assert method. This file should only + * export a function or macro called XASSERT that aborts the program. + */ + +#define XASSERT(expr) do { \ + if (!(expr)) { \ + fprintf(stderr, "%s:%d - fatal error: %s\n", __FILE__, __LINE__, #expr); \ + abort(); \ + } \ + } while (0) + +#endif -- cgit v1.2.3