4 Commits

Author SHA1 Message Date
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