d3d8/tests: Test the presentation parameters after creating an additional swap chain.
[wine.git] / libs / ldap / include / ac / assert.h
blobdbb22951c354535d7a7344a99cff0c51c5832e7b
1 /* Generic assert.h */
2 /* $OpenLDAP$ */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 * Copyright 1998-2022 The OpenLDAP Foundation.
6 * All rights reserved.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted only as authorized by the OpenLDAP
10 * Public License.
12 * A copy of this license is available in file LICENSE in the
13 * top-level directory of the distribution or, alternatively, at
14 * <http://www.OpenLDAP.org/license.html>.
17 #ifndef _AC_ASSERT_H
18 #define _AC_ASSERT_H
20 #undef assert
22 #ifdef LDAP_DEBUG
24 #if defined( HAVE_ASSERT_H ) || defined( STDC_HEADERS )
26 #undef NDEBUG
27 #include <assert.h>
29 #else /* !(HAVE_ASSERT_H || STDC_HEADERS) */
31 #define LDAP_NEED_ASSERT 1
34 * no assert()... must be a very old compiler.
35 * create a replacement and hope it works
38 LBER_F (void) ber_pvt_assert LDAP_P(( const char *file, int line,
39 const char *test ));
41 /* Can't use LDAP_STRING(test), that'd expand to "test" */
42 #if defined(__STDC__) || defined(__cplusplus)
43 #define assert(test) \
44 ((test) ? (void)0 : ber_pvt_assert( __FILE__, __LINE__, #test ) )
45 #else
46 #define assert(test) \
47 ((test) ? (void)0 : ber_pvt_assert( __FILE__, __LINE__, "test" ) )
48 #endif
50 #endif /* (HAVE_ASSERT_H || STDC_HEADERS) */
52 #else /* !LDAP_DEBUG */
53 /* no asserts */
54 #define assert(test) ((void)0)
55 #endif /* LDAP_DEBUG */
57 #endif /* _AC_ASSERT_H */