Files
Xiang XiaoandAlin Jerpelea d1dc791d11 libs/libc/string: Add 4-byte alignment middle path for BSD functions.
libc_data_t is 8 bytes wide, so a buffer which is 4-byte but not
8-byte aligned falls back to the byte at a time loop.  Add a 32-bit
middle path so such buffers still handle four bytes per iteration.

* Add DETECTNULL32/DETECTCHAR32, UNALIGNED4/UNALIGNED4_X,
  LITTLEBLOCKSIZE4/BIGBLOCKSIZE4 and TOO_SMALL4 to libs/libc/libc.h.
* Take the new path in memccpy, memcmp, memcpy, memset, stpcpy,
  stpncpy, strcmp, strcpy, strncmp and strncpy when both pointers are
  4-byte aligned but the 8-byte path can't be used.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-08-17 10:47:33 +02:00
..