Commit Graph

10 Commits

Author SHA1 Message Date
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
b93d52fe3d Change the license of strace to LGPL-2.1-or-later
strace is now provided under the terms of the GNU Lesser General
Public License version 2.1 or later, see COPYING for more details.

strace test suite is now provided under the terms of the GNU General
Public License version 2 or later, see tests/COPYING for more details.
2018-12-10 00:00:00 +00:00
Eugene Syromyatnikov
cbbf708b4d macros: add ROUNDUP macro
* macros.h (ROUNDUP): New macro.
2018-09-02 22:03:43 +00:00
Eugene Syromyatnikov
10adc310cb Introduce ARRSZ_PAIR macro
A shorthand similar to ARG_STR in its purpose: it provides and ability
to pass an array an its size without variable name duplication.

* macros.h (ARRSZ_PAIR): New macro.
2018-05-30 10:13:06 +00:00
6bc832e2bc Update copyright headers
Headers updated automatically using maint/update_copyright_years.sh
script.
2018-04-05 01:40:00 +00:00
Eugene Syromyatnikov
41a1380c19 Move is_filled and IS_ZERO to macros.h, rename IS_ZERO to IS_ARRAY_ZERO
* s390.c: Replace all IS_ZERO invocations with IS_ARRAY_ZERO.
(is_filled, IS_ZERO): Move...
* macros.h: ...here.
(is_filled): Add inline qualifier, add const qualifier to ptr.
(IS_ZERO): Rename to IS_ARRAY_ZERO, cast arr_ to "const char *".

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-03-20 20:44:34 +00:00
Eugene Syromiatnikov
bb9673ba1d Move MIN, MAX, and CLAMP to macros.h
We shouldn't have to include the whole defs.h to get them.

* defs.h (MIN, MAX, CLAMP): Move ...
* macros.h: ... here.
2017-11-10 17:35:18 +00:00
a300de56c1 Move offsetofend from defs.h to macros.h
* defs.h (offsetofend): Move ...
* macros.h: ... here.
2017-07-26 10:28:25 +00:00
eaa2f6e06d Introduce generic STRINGIFY and STRINGIFY_VAL macros
* macros.h (STRINGIFY, STRINGIFY_VAL): New macros.
* mpers_type.h: Include "macros.h".
[IN_MPERS] (STRINGIFY): Remove.
* tests/sockname.c (TEST_SYSCALL_STR__, TEST_SYSCALL_STR_): Remove.
(TEST_SYSCALL_STR): Use STRINGIFY_VAL.

Co-authored-by: Victor Krapivensky <krapivenskiy.va@phystech.edu>
2017-07-02 00:11:31 +00:00
38198609df Introduce macros.h
Introduce a separate header file for generic macros shared between
strace and its tests.  Start this unification with ARRAY_SIZE macro.

* defs.h: Include "macros.h".
(ARRAY_SIZE): Move ...
* macros.h: ... to new file.
* Makefile.am (strace_SOURCES): Add it.
* tests/tests.h: Include "macros.h".
(ARRAY_SIZE): Remove.  All callers updated.
2017-07-02 00:11:31 +00:00