build: Probe MSG_DONTWAIT in the same way as MSG_NOSIGNAL #9921

pull laanwj wants to merge 3 commits into bitcoin:master from laanwj:2017_03_cloudabi_netcompat changing 4 files +18 −11
  1. laanwj commented at 10:12 am on March 5, 2017: member

    build: Probe MSG_DONTWAIT in the same way as MSG_NOSIGNAL

    Instead of the WIN32-specific workaround, detect lack of MSG_DONTWAIT in the build system. This allows other platforms without MSG_DONTWAIT to work too.

    build: cleanup: define MSG_DONTWAIT/MSG_NO_SIGNAL locall

    Define MSG_DONTWAIT and MSG_NO_SIGNAL in the implementation files that use them (net.cpp and netbase.cpp), instead of compat.h which is included all over the place.

    This avoids putting them in the global namespace, as defining them as 0 is a hack that works for our specific usage, but it is not a general solution.

    Also makes sure they are defined only once so the !defined(MSG_x) guard can go.

    compat: use unsigned int instead of u_int

    u_int (without size specifier) is not available on some platforms (not sure what standard it’s supposed to be part of), we don’t use it anywhere else, and it doesn’t hurt to simply write unsigned int out here.

  2. build: Probe MSG_DONTWAIT in the same way as MSG_NOSIGNAL
    Instead of the WIN32-specific workaround, detect lack of `MSG_DONTWAIT`
    in the build system. This allows other platforms without `MSG_DONTWAIT`
    to work too.
    c459d509b7
  3. build: cleanup: define MSG_DONTWAIT/MSG_NO_SIGNAL locally
    Define MSG_DONTWAIT and MSG_NO_SIGNAL in the implementation files that
    use them (`net.cpp` and `netbase.cpp`), instead of compat.h which is
    included all over the place.
    
    This avoids putting them in the global namespace, as defining them as 0
    is a hack that works for our specific usage, but it is not a general
    solution.
    
    Also makes sure they are defined only once so the `!defined(MSG_x)` guard can go.
    25da1ee36c
  4. compat: use `unsigned int` instead of `u_int`
    `u_int` is not available on some platforms (not sure what standard it's
    supposed to be part of), we don't use it anywhere else, and it doesn't
    hurt to simply write `unsigned int` out here.
    a4d1c9f041
  5. laanwj added the label Build system on Mar 5, 2017
  6. laanwj assigned theuni on Mar 7, 2017
  7. theuni commented at 4:08 am on March 15, 2017: member
    Whoops, missed the assignment here (saw your IRC ping though, thanks!). utACK a4d1c9f0417e25b0aac937f07edf2bb642b84f09. Yes, Much of this stuff goes away with libevent. I like the move out of compat as well. For anything that libevent doesn’t end up absorbing, it’d be nice to make everything else local the same way.
  8. laanwj merged this on Mar 16, 2017
  9. laanwj closed this on Mar 16, 2017

  10. laanwj referenced this in commit 8b789d8141 on Mar 16, 2017
  11. laanwj referenced this in commit 5073100f27 on Mar 16, 2017
  12. practicalswift referenced this in commit 366e479184 on Apr 27, 2017
  13. PastaPastaPasta referenced this in commit 83987a8c14 on Mar 10, 2019
  14. PastaPastaPasta referenced this in commit e9f96d52ea on Mar 10, 2019
  15. PastaPastaPasta referenced this in commit 80f1e106e2 on Mar 11, 2019
  16. PastaPastaPasta referenced this in commit 58036f0555 on Mar 11, 2019
  17. PastaPastaPasta referenced this in commit a7b1536840 on Mar 12, 2019
  18. PastaPastaPasta referenced this in commit ac174e18c0 on Mar 13, 2019
  19. UdjinM6 referenced this in commit f03d9c69f5 on Mar 13, 2019
  20. PastaPastaPasta referenced this in commit 940c73367f on Mar 13, 2019
  21. PastaPastaPasta referenced this in commit 6986f40676 on Mar 14, 2019
  22. PastaPastaPasta referenced this in commit 826b839292 on Mar 14, 2019
  23. PastaPastaPasta referenced this in commit ca457b00ae on Mar 15, 2019
  24. PastaPastaPasta referenced this in commit affd351b84 on Mar 16, 2019
  25. PastaPastaPasta referenced this in commit 025f80a933 on Apr 3, 2019
  26. PastaPastaPasta referenced this in commit dcaae4fc0f on Apr 3, 2019
  27. PastaPastaPasta referenced this in commit f80d6ba494 on Apr 5, 2019
  28. PastaPastaPasta referenced this in commit 594b78fdf5 on May 6, 2019
  29. barrystyle referenced this in commit e0e49eea21 on Jan 22, 2020
  30. MarcoFalke locked this on Sep 8, 2021

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: 2024-09-29 07:12 UTC

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