Fix for utiltime to compile with msvc. #13031

pull sipsorcery wants to merge 1 commits into bitcoin:master from sipsorcery:msvc_gmtime changing 1 files +12 −0
  1. sipsorcery commented at 10:46 PM on April 19, 2018: member

    This PR allows utiltime.cpp to compile with msvc after the changes introduced in #12973.

  2. Fix for utiltime to compile with msvc. abd58a2fca
  3. fanquake added the label Windows on Apr 19, 2018
  4. fanquake added the label Utils/log/libs on Apr 19, 2018
  5. theuni commented at 11:19 PM on April 19, 2018: member

    I closed #9566 because I thought it was getting out of hand, but since we're going that way anyway, here's how my attempt at it looked back then: https://github.com/bitcoin/bitcoin/pull/9566/files#diff-8e9b29a6133dd7bf43643c37c5c4689aR27

  6. in src/utiltime.cpp:108 in abd58a2fca
     103 |      time_t time_val = nTime;
     104 | +#ifdef _MSC_VER
     105 | +    gmtime_s(&ts, &time_val);
     106 | +#else
     107 |      gmtime_r(&time_val, &ts);
     108 | +#endif
    


    laanwj commented at 4:12 PM on April 20, 2018:

    Please factor this out to a function to prevent repetition.

  7. laanwj commented at 3:14 PM on April 26, 2018: member

    utACK abd58a2fcae767e9074c49b64e9c89e5168d7005 I'm just going to merge this, if it fixes the build it shouldn't be open for weeks, can be improved later if necessary.

  8. laanwj merged this on Apr 26, 2018
  9. laanwj closed this on Apr 26, 2018

  10. laanwj referenced this in commit 826acc9a3d on Apr 26, 2018
  11. sipsorcery deleted the branch on Jun 19, 2019
  12. random-zebra referenced this in commit 14060430d9 on May 5, 2021
  13. UdjinM6 referenced this in commit 195fdfad5e on May 21, 2021
  14. UdjinM6 referenced this in commit eac133cea4 on May 25, 2021
  15. TheArbitrator referenced this in commit 7559d807f1 on Jun 4, 2021
  16. DrahtBot locked this on Dec 16, 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: 2026-04-13 15:15 UTC

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