strace/static_assert.h
Dmitry V. Levin d6c71dd061 Fix preprocessor indentation
Indent the C preprocessor directives to reflect their nesting
using the following script:

$ cppi -l $(git grep -El '^[[:space:]]*#[[:space:]]*(if|ifdef|ifndef|elif|else|endif|define|pragma)[[:space:]]' |grep -v '\.sh$') |while read f; do
	cppi < "$f" > "$f".cppi; mv "$f".cppi "$f"
done
2018-12-30 15:35:21 +00:00

30 lines
616 B
C

/*
* Copyright (c) 2018 Dmitry V. Levin <ldv@altlinux.org>
* All rights reserved.
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef STRACE_STATIC_ASSERT_H
# define STRACE_STATIC_ASSERT_H
# include "assert.h"
# if defined HAVE_STATIC_ASSERT
/* static_assert is already available */
# elif defined HAVE__STATIC_ASSERT
# undef static_assert
# define static_assert _Static_assert
# else /* !HAVE_STATIC_ASSERT && !HAVE__STATIC_ASSERT */
# define static_assert(expr, message) \
extern int (*strace_static_assert(int))[sizeof(int[2 * !!(expr) - 1])]
# endif
#endif /* !STRACE_STATIC_ASSERT_H */