fanquake
4395b7f084
Merge bitcoin/bitcoin#26814 : refactor: remove windows-only compat.h usage in random
...
621cfb77227b5a240d66547947f73130f0c51f44 random: consolidate WIN32 #ifdefs (fanquake)
75ec6275e6780b9ed18e271e6b24bef46d1af96d random: remove compat.h include (fanquake)
4dc12816ace11eceee05c1ad24dd925f420a0bda random: use int for MAX_TRIES (fanquake)
Pull request description:
This change is related to removing the use of `compat.h` as a miscellaneous catch-all for unclear/platform specific includes. Somewhat prompted by IWYU-related discussion here: https://github.com/bitcoin/bitcoin/pull/26763/files#r1058861693 .
The only reason `compat.h` is required in random.cpp for Windows (note the `#ifdef WIN32`), is for `ssize_t` and an "indirect" inclusion of `windows.h`. I say indirect, because `windows.h` isn't actually included in compat.h either, it's dragged in as a side-effect of other windows includes there, i.e `winsock2.h`.
Remove this coupling by replacing `ssize_t` with int, just including `windows.h` and removing compat.h.
ACKs for top commit:
hebasto:
re-ACK 621cfb77227b5a240d66547947f73130f0c51f44, rebased only since my [recent](https://github.com/bitcoin/bitcoin/pull/26814#pullrequestreview-1237312144 ) review. Verified with:
john-moffett:
ACK 621cfb77227b5a240d66547947f73130f0c51f44
Tree-SHA512: 31e1ed2e7ff7daf6c3ee72e6a908def52f7addf8305ba371c5032f1927cbb8ef5d302785e8de42b5c04a123052f04688cc9fd80decceb04738b5d9153f3d32d7
2023-02-19 13:55:17 +00:00
..
2023-02-17 12:47:52 -05:00
2023-01-26 10:44:05 +01:00
2023-01-04 12:00:25 +00:00
2023-02-06 13:56:51 -05:00
2022-08-13 13:55:38 +01:00
2023-02-15 14:58:47 +00:00
2023-02-10 04:39:11 -04:00
2022-12-24 23:49:50 +00:00
2023-02-07 11:02:01 +01:00
2022-12-24 23:49:50 +00:00
2023-02-10 04:39:11 -04:00
2022-09-29 16:43:30 +01:00
2023-01-31 18:48:50 +01:00
2022-10-23 15:03:04 +01:00
2023-02-10 04:39:11 -04:00
2023-01-31 11:50:10 +00:00
2022-12-24 23:49:50 +00:00
2023-02-17 13:34:40 -05:00
2023-02-17 13:34:40 -05:00
2023-02-16 10:01:33 +00:00
2022-12-12 23:40:36 -05:00
2023-01-31 11:50:10 +00:00
2023-02-17 17:28:14 -05:00
2023-01-31 11:50:10 +00:00
2023-02-13 15:31:50 +01:00
2023-02-17 17:28:14 -05:00
2023-01-31 11:50:10 +00:00
2023-02-01 11:33:35 +01:00
2023-01-31 16:08:44 -05:00
2023-01-26 18:11:13 -05:00
2023-02-17 13:34:40 -05:00
2023-02-01 10:18:08 -05:00
2022-12-24 23:49:50 +00:00
2023-02-01 11:33:35 +01:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2023-02-10 04:39:11 -04:00
2023-02-02 13:14:48 -05:00
2023-01-13 09:40:57 +00:00
2023-01-26 10:44:05 +01:00
2023-01-13 09:40:57 +00:00
2022-12-24 23:49:50 +00:00
2023-01-26 10:44:05 +01:00
2023-02-15 14:42:28 -08:00
2023-01-31 19:34:35 +01:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2023-01-05 09:05:14 +00:00
2022-12-24 23:49:50 +00:00
2022-09-09 10:07:39 +02:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2023-02-02 09:00:15 -05:00
2023-02-02 09:00:15 -05:00
2023-02-03 18:15:42 +01:00
2023-01-26 10:44:05 +01:00
2023-02-03 18:15:42 +01:00
2023-01-31 11:50:10 +00:00
2023-02-10 04:39:11 -04:00
2023-02-10 04:39:11 -04:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2023-02-01 11:33:35 +01:00
2023-02-01 11:33:35 +01:00
2022-12-24 23:49:50 +00:00
2023-02-16 12:33:26 +00:00
2023-01-18 15:47:06 +00:00
2022-12-24 23:49:50 +00:00
2023-01-30 15:57:12 +00:00
2022-08-30 12:09:04 -04:00
2022-08-29 08:10:35 -04:00
2023-02-17 13:34:40 -05:00
2023-02-17 13:34:40 -05:00
2022-12-24 23:49:50 +00:00
2023-02-17 13:34:40 -05:00
2022-12-24 23:49:50 +00:00
2023-02-17 16:54:55 -05:00
2022-12-24 23:49:50 +00:00
2023-01-31 19:34:35 +01:00
2023-01-31 11:50:10 +00:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2023-02-10 04:39:11 -04:00
2022-11-15 19:23:39 -05:00
2022-07-21 10:42:09 +01:00
2022-09-13 17:15:17 +01:00
2022-09-13 17:15:17 +01:00
2022-11-17 14:52:45 +00:00
2023-02-17 17:28:14 -05:00
2023-02-15 14:58:47 +00:00
2023-02-17 13:34:40 -05:00
2023-01-28 15:24:13 +00:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2023-02-17 13:34:40 -05:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2023-02-17 14:21:06 -05:00
2023-01-26 18:11:13 -05:00
2023-02-17 13:34:40 -05:00
2023-02-17 13:34:40 -05:00
2023-02-17 13:34:40 -05:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2023-02-16 10:01:33 +00:00
2023-02-16 09:39:50 +00:00
2023-01-13 09:40:57 +00:00
2023-01-13 09:40:57 +00:00
2023-02-17 15:01:50 +00:00
2023-02-15 14:58:47 +00:00
2023-01-23 16:36:27 +01:00
2023-01-26 10:44:05 +01:00
2023-01-12 13:42:44 +00:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2023-01-31 11:50:10 +00:00
2022-12-24 23:49:50 +00:00
2023-01-31 11:50:10 +00:00
2023-02-02 10:47:37 +00:00
2023-01-25 09:33:26 +01:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2023-01-31 11:50:10 +00:00
2023-02-17 13:34:40 -05:00
2023-01-31 11:50:10 +00:00
2023-02-10 04:39:11 -04:00
2023-02-10 04:39:11 -04:00
2023-02-01 11:33:35 +01:00
2023-02-01 11:33:35 +01:00
2023-01-26 10:36:18 +00:00
2023-01-26 10:36:18 +00:00
2022-12-10 14:34:44 -06:00
2023-02-06 13:56:51 -05:00
2023-02-10 04:39:11 -04:00
2023-02-10 04:39:11 -04:00
2023-02-01 11:33:35 +01:00
2023-01-05 09:05:14 +00:00
2023-01-03 19:31:29 -06:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00
2022-12-24 23:49:50 +00:00