Audit stdlib inclusion #13583

pull Empact wants to merge 2 commits into bitcoin:master from Empact:stdlib changing 40 files +47 −25
  1. Empact commented at 9:28 PM on July 1, 2018: member
    • Prefer cstddef over cstdlib for size_t definition - fewer overall definitions
    • Include cstdlib where used, and note which definitions are used

    I used iwyu and the following regex to check for usage:

    stdlib\.h|\bEXIT_SUCCESS\b|\bEXIT_FAILURE\b|\bMB_CUR_MAX\b|\bRAND_MAX\b|\bdiv_t\b|\bldiv_t\b|\blldiv_t\b|\babort\(|[^.]exit\(|\bquick_exit\(|\b_Exit\(|\batexit\(|\bat_quick_exit\(|\bsystem\(|[^.]getenv\(|\bmalloc\(|\bcalloc\(|\brealloc\(|[^.]free\(|\batof\(|\batoi\(|\batol\(|\batoll\(|\bstrtol\(|\bstrtoll\(|\bstrtoul\(|\bstrtoull\(|\bstrtof\(|\bstrtod\(|\bstrtold\(|\bmblen\(|\bmbtowc\(|\bwctomb\(|\bmbstowcs\(|\bwcstombs\(|\brand\(|\bsrand\(|\bqsort\(|\bbsearch\(|\babs\(|\blabs\(|\bllabs\(|\bdiv\(|\bldiv\(|\blldiv\(
    

    Prompted by initial look at include-what-you-use tool.

  2. Empact force-pushed on Jul 1, 2018
  3. Empact force-pushed on Jul 1, 2018
  4. Prefer cstddef over stdlib.h for size_t definition
    Fewest overall definitions of the headers which provide it.
    df936df50d
  5. Include cstdlib where used, and note which definitions are used 14e7737b33
  6. Empact force-pushed on Jul 1, 2018
  7. fanquake added the label Refactoring on Jul 1, 2018
  8. Empact commented at 5:41 PM on July 2, 2018: member

    Closing in favor of future / more targeted work

  9. Empact closed this on Jul 2, 2018

  10. MarcoFalke locked this on Sep 8, 2021
Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 06:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me