Skip to content

tools/nolibc: assorted fixes and small updates

Willy Tarreau lkml 2 versions – Applied

Status from this message: Applied.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 6 repliesApplied
  2. v14 patches 20 repliesSuperseded

Changes in v2 from the cover letter

- rebase this old changeset onto latest updates from Thomas
- moved select() definition do sys/select.h as well and include nolibc.h to avoid having just a dummy file like in v1

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/4tools/nolibc: fix misleading help message regarding installation pathtools/include/nolibc/Makefile+1 -11 reply
2/4tools/nolibc: add the more portable inttypes.htools/include/nolibc/Makefile tools/include/nolibc/inttypes.h+9 -03 replies
3/4tools/nolibc: add missing memchr() to string.htools/include/nolibc/string.h tools/testing/selftests/nolibc/nolibc-test.c+17 -01 reply
4/4tools/nolibc: provide the portable sys/select.htools/include/nolibc/Makefile tools/include/nolibc/nolibc.h tools/include/nolibc/sys.h +2 more+105 -921 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/4] tools/nolibc: assorted fixes and small updates

Trying to port a program to nolibc triggered a few trivial errors that are worth being addressed:
- inttypes.h is missing, while being generally recommended over stdint.h for being more portable. Here we add it, which simply includes stdint.h.

- sys/select.h is supposed to be where struct fd_set and FD_CLR() etc are defined. Till now it was still in types.h. Let's create the file and move these definitions there.

- memchr() was still missing, thus a trivial one was added.

Finally the help message from "make help" reported an inaccurate installation path, omitting the dependency on $OUTPUT. This was fixed as well.

---
v2:
- rebase this old changeset onto latest updates from Thomas
- moved select() definition do sys/select.h as well and include nolibc.h to avoid having just a dummy file like in v1

Willy Tarreau (4):
tools/nolibc: fix misleading help message regarding installation path tools/nolibc: add the more portable inttypes.h tools/nolibc: add missing memchr() to string.h tools/nolibc: provide the portable sys/select.h

 tools/include/nolibc/Makefile                |   4 +-
 tools/include/nolibc/inttypes.h              |   8 ++
 tools/include/nolibc/nolibc.h                |   1 +
 tools/include/nolibc/string.h                |  15 +++
 tools/include/nolibc/sys.h                   |  45 --------
 tools/include/nolibc/sys/select.h            | 103 +++++++++++++++++++
 tools/include/nolibc/types.h                 |  47 ---------
 tools/testing/selftests/nolibc/nolibc-test.c |   2 +
 8 files changed, 132 insertions(+), 93 deletions(-)
 create mode 100644 tools/include/nolibc/inttypes.h
 create mode 100644 tools/include/nolibc/sys/select.h
Signature · 1 line
2.17.5