VirtualBox

source: vbox/trunk/src/VBox/Additions/3D/mesa/include/assert.h@ 107250

Last change on this file since 107250 was 106061, checked in by vboxsync, 5 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.4 KB
Line 
1/* $Id: assert.h 106061 2024-09-16 14:03:52Z vboxsync $ */
2/** @file
3 * Replaces C runtime assert with a simplified version which just hits breakpoint.
4 *
5 * Mesa code uses assert.h a lot, which is inconvenient because the C runtime
6 * implementation wants to open a message box and it does not work in the
7 * graphics driver.
8 */
9
10/*
11 * Copyright (C) 2017-2024 Oracle and/or its affiliates.
12 *
13 * This file is part of VirtualBox base platform packages, as
14 * available from https://www.virtualbox.org.
15 *
16 * This program is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU General Public License
18 * as published by the Free Software Foundation, in version 3 of the
19 * License.
20 *
21 * This program is distributed in the hope that it will be useful, but
22 * WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 * General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, see <https://www.gnu.org/licenses>.
28 *
29 * SPDX-License-Identifier: GPL-3.0-only
30 */
31
32#ifndef GA_INCLUDED_3D_MESA_assert_h
33#define GA_INCLUDED_3D_MESA_assert_h
34#ifndef RT_WITHOUT_PRAGMA_ONCE
35# pragma once
36#endif
37
38#include <iprt/asm.h>
39
40#undef assert
41#ifdef DEBUG
42#define assert(_e) (void)( (!!(_e)) || (ASMBreakpoint(), 0) )
43#else
44#define assert(_e) (void)(0)
45#endif
46
47#endif /* !GA_INCLUDED_3D_MESA_assert_h */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette