| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Handy for field size checks.
* macros.h (sizeof_field): New macro.
(offsetofend): Use it.
|
|
|
|
|
|
|
| |
Since offsetofend macro definition relies on presence of offsetof
declaration.
* macros.h: Include <stddef.h>.
|
|
|
|
|
|
|
|
|
|
| |
Rename it to FLAG and implement via newly added BIT helper macro,
in preparation for general use
* defs.h: Use FLAG instead of FLAG_.
(FLAG_): Move it...
* macros.h (FLAG): Here, implement using BIT macro.
[!BIT] (BIT): New macro.
|
|
|
|
|
| |
Headers updated automatically using maint/update_copyright_years.sh
script.
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Similar to the one used in the Linux kernel.
* macros.h (cast_ptr, containerof): New macros.
* list.h: New file.
* Makefile.am (strace_SOURCES): Add it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use a buffer of a limited size, use proper type for dump amount, avoid
hard-coding of byte counts, calculate output buffer size more accurately
and minimise its rewriting, pad offset with zeros in accordance
with expected output amount.
* defs.h (dumpstr): Change the type of len argument from int to
kernel_ulong_t.
* macros.h (ROUNDUP_DIV): New macro.
(ROUNDUP): Rewrite using ROUNDUP_DIV.
* util.c (ILOG2_ITER_): New macro.
(ilog2_64, ilog2_32): New functions.
(ilog2_klong): New macro, wrapper around ilog2_32/ilog2_64, so (potentially
more expensive) ilog2_64 is not used for ilog2 calculation
of a kernel_ulong_t-typed variable on architectures with 32-bit kernel long.
(dumpstr): Update.
Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
* macros.h (ROUNDUP): New 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.
|
|
|
|
|
| |
Headers updated automatically using maint/update_copyright_years.sh
script.
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
| |
We shouldn't have to include the whole defs.h to get them.
* defs.h (MIN, MAX, CLAMP): Move ...
* macros.h: ... here.
|
|
|
|
|
| |
* defs.h (offsetofend): Move ...
* macros.h: ... here.
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
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.
|