Commit Graph

298 Commits

Author SHA1 Message Date
Arseny Smirnov
38ef3a75cc PollableFd: explicit sync_with_poll
GitOrigin-RevId: 71fa35a594816e84e372ebcfa9d0077a13f26a62
2020-07-21 18:29:39 +03:00
levlam
37fa018c28 Increase max content size in HttpReader.
GitOrigin-RevId: c31b929989d4ab3d4baf6e487488a27b190a11c1
2020-07-19 13:17:05 +03:00
levlam
060c01ace3 Minor improvements.
GitOrigin-RevId: b4e5073248377d84cb8acdf4a032970ec5cf5df9
2020-07-14 20:54:38 +03:00
Arseny Smirnov
9b98451c43 IPAddress: function to clear interface part of ipv6
GitOrigin-RevId: ff738e215e458bc9e7257e9a89c318fb01cdb345
2020-07-14 17:22:40 +03:00
levlam
7767842d4c Minor fixes.
GitOrigin-RevId: b9f67c5e5edf818610c1739533f01a7873e6e1b6
2020-07-14 03:37:04 +03:00
levlam
c89412e175 Minor improvements.
GitOrigin-RevId: 8942b7461a1c83f963510c9884cd003948967fd0
2020-07-13 21:49:07 +03:00
levlam
8872fbf6ac Fix tdutils after merge.
GitOrigin-RevId: 5b9a863e405a9e3782157570156fda71bf2bb589
2020-06-26 02:24:13 +03:00
Arseny Smirnov
fd6423dedf update tdutils from another project
GitOrigin-RevId: 79b8eb2ba229d733f82dbb17b8bd7f27471c9472
2020-06-24 14:47:36 +03:00
levlam
afcf7197ae Unify constant name style.
GitOrigin-RevId: 660f8aa17fa856c828e6c11ade6c497a82cb7612
2020-06-22 02:40:05 +03:00
levlam
4ae7bc23dc Add two ways for OS version detection on Darwin.
GitOrigin-RevId: cddea795e5d289b1fe15d88fc99db51e42c7138e
2020-06-20 02:39:33 +03:00
levlam
79808f6dd2 Add /etc/os-release support on Linux.
GitOrigin-RevId: 066c8dc879719539aff88cec1b7424824267bdbc
2020-06-20 01:16:29 +03:00
levlam
0877d7f716 Automatically detect operating system version.
GitOrigin-RevId: d693799fdbfe4919da5a70c141709f2db93063d7
2020-06-19 03:45:24 +03:00
levlam
2172c71191 Add uname.
GitOrigin-RevId: d63397a217f67714d621425e7c6d3ea1e1fa3c60
2020-06-19 03:08:42 +03:00
levlam
0275ecdcbc Fix "Try to" usages.
GitOrigin-RevId: 4ff6d26737f67180a1e9a1289f7f7fb428828b08
2020-06-18 05:02:18 +03:00
levlam
fae344a65d Improve error messages.
GitOrigin-RevId: 99d0bdaec60007ace41631804e36c17b0753ede2
2020-06-18 00:58:54 +03:00
levlam
3442a88413 Unify constant names style.
GitOrigin-RevId: 6e4475366b94cea6ab0331d57f254311490bdee2
2020-06-16 05:10:16 +03:00
levlam
0cf4fea1ff Remove enum usages for static constants creation.
GitOrigin-RevId: 2a88fd2cd961398a09403fe35a15ae56372a44f8
2020-06-15 04:52:56 +03:00
levlam
715146c65c Move skip_eintr to a separate header.
GitOrigin-RevId: 80eeb583cd1a4351c5b72c7ec4021575dbc216a7
2020-06-15 03:50:38 +03:00
levlam
c8913e71af Add td::change_user.
GitOrigin-RevId: 8140b771e561d968d6fbf790249364190cb96d6c
2020-06-15 03:14:08 +03:00
levlam
7cd42fc518 Add set_resource_limit.
GitOrigin-RevId: 29cf122b31ff86ccc8f6c1fc3b71c28e89b8054f
2020-06-15 01:50:03 +03:00
levlam
18b8e87e74 Support cpu_stat on Windows.
GitOrigin-RevId: df9a2fa6d53fb1c19cd30f2da3354bc23b2f3aee
2020-06-14 04:01:02 +03:00
levlam
50a6b5da92 Minor cpu_stat improvements.
GitOrigin-RevId: ef6f8b0ed04ae88c9784260435e06a647babf0a1
2020-06-14 02:49:10 +03:00
levlam
6b1c2f797d Add mem_stat support on Windows.
GitOrigin-RevId: cf63e7fe53a00f2fa116472ed12f73492ad8bf29
2020-06-14 02:31:57 +03:00
levlam
b1419f9de5 Fix some includes.
GitOrigin-RevId: f4b44d2e91ca72b6090d7f1f35673e8268723241
2020-06-07 18:14:52 +03:00
levlam
de6d5359ed Use #pragma managed(push, off) around unmanaged includes in managed code.
GitOrigin-RevId: 1b8944dfa23e38f675aec0f25d78644baa27ab84
2020-06-06 22:51:45 +03:00
levlam
eb8fba8b28 Fix init_host_port.
GitOrigin-RevId: 30abb3480d906ebd7ea50a7feecf072be6e36641
2020-05-16 23:54:40 +03:00
levlam
5b18a56e03 Add IPAddress::get_ip_host and use it whenever appropriate.
GitOrigin-RevId: 7254ebd036463fe2c8b6262269cbee843b320421
2020-05-16 23:12:52 +03:00
levlam
9fe0d4bbd9 Do not remove brackets from HttpUrl IPv6 host.
GitOrigin-RevId: 59db5b747e66bd83cbfa81d4276af2aa1bb8b7ca
2020-05-16 22:53:19 +03:00
levlam
842e2033b7 Fix IP address verification in TLS certificate.
GitOrigin-RevId: 5275f8be34e9459a13a87e6fbd056754ceb515d4
2020-05-16 18:43:49 +03:00
levlam
7bdff46710 Do not send IP address in SNI.
GitOrigin-RevId: ff01b1f5f9219e34b0cacdf8acd49bf4e5a3daa2
2020-05-16 17:50:58 +03:00
levlam
e58d423af1 Add IPAddress::get_ip_address.
GitOrigin-RevId: 8b82c462f10d705412cb6cedc3d25d5fb95c59e2
2020-05-16 17:35:53 +03:00
levlam
705ab4d415 Supoort bracketed IPv6 in init_ipv6_port.
GitOrigin-RevId: 5452157d85fa5628a07e82fec20c92e8b0836508
2020-05-16 17:30:16 +03:00
levlam
06b053ff3e Add comment about IPAddress::get_ip_str unsafety.
GitOrigin-RevId: 29cd28bf9a6422cd0295c74f904ba380fc119570
2020-05-16 16:43:40 +03:00
levlam
54f9c77a20 Make ipv4_to_str/ipv6_to_str safe to use.
GitOrigin-RevId: 622c8f03c8791545922d3ae5f596f0a9699b91a9
2020-05-16 16:33:32 +03:00
levlam
bf963ccadf Make IPAddress::get_ipv6 safe to use.
GitOrigin-RevId: 47d50318abac4231efe63820902ba4d74b6dd03d
2020-05-16 16:11:03 +03:00
levlam
77c7f4c660 Add Clocks::tz_offset.
GitOrigin-RevId: b1dcb9a8533f408961778eac7c7fa5db1bd2b920
2020-04-08 20:47:14 +03:00
levlam
b35862bd71 Simplify Clocks.
GitOrigin-RevId: 6684cd9d98efea14d00317d1975b58aa7e2c8a11
2020-04-08 02:39:51 +03:00
levlam
f9e8bbdff4 Fix undef of small with WIN32_LEAN_AND_MEAN defined.
GitOrigin-RevId: ca8ca03bdf62e9aaf2fe44078aa074296a3a949e
2020-04-01 00:36:01 +03:00
levlam
c4023a3f9b Use KB instead of kB for 1024 bytes.
GitOrigin-RevId: 163ebf3f28f5e6f6710b3ff85bdfc21996c67acb
2020-03-20 03:20:07 +03:00
levlam
9d1e3ed661 Add WIN32_LEAN_AND_MEAN during build on Windows (0% build time speed up).
GitOrigin-RevId: ebe9742fa94187434be37339862f11b750db44ac
2020-03-19 02:33:53 +03:00
levlam
2df3de7b80 Improve logging.
GitOrigin-RevId: 8574b038e9682f8020d1508a7be7beef223e1b08
2020-03-10 04:37:46 +03:00
levlam
1313fb1543 Remove illegal MovableValue<void *> usage.
GitOrigin-RevId: 1daee39044131e396183ee20baa589b96ba27eb4
2020-01-30 22:11:04 +03:00
levlam
c8bf8fa5f7 Use real allocated file size in storage statistics.
GitOrigin-RevId: 6e5232700d8e97ba3ce0838c3bf7764541b6fd2a
2020-01-03 04:08:22 +03:00
levlam
eee0b2b23a Fix preprocessor directive.
GitOrigin-RevId: f473450b6ee28537cb66226ab46745d63d066541
2020-01-03 02:43:49 +03:00
levlam
75ecd9c692 Optimize FileFd.get_size/get_real_size on Windows.
GitOrigin-RevId: e39efbecdd6882bf4465b17dad556b585633b56e
2020-01-03 02:41:57 +03:00
levlam
69f30a3505 Add real_size to Stat.
GitOrigin-RevId: 3b8b4c24504ed1fa7eed1885abd3a3e9014eb2c4
2020-01-03 01:01:39 +03:00
levlam
12ab53bdfa Always open files on Windows as sparse files.
GitOrigin-RevId: 93a01f926970045e5db78e16f21eab293822b3be
2020-01-02 20:18:55 +03:00
levlam
80c35676a2 Update copyright year.
GitOrigin-RevId: 09afb551b6e637dc69739fa735b0051a38b9e14c
2020-01-01 04:23:48 +03:00
levlam
a91d296f87 Minor improvements.
GitOrigin-RevId: f66a5294ec1026c85dc71f62bb0026dce4a09fe0
2019-12-20 20:12:52 +03:00
Arseny Smirnov
3d972da1e6 Stacktrace improvements.
GitOrigin-RevId: 99dd952cff5c9e5edce575b84e365def24a59441
2019-08-14 11:31:25 +03:00
levlam
8c495d99e6 Use TRY_RESULT_ASSIGN.
GitOrigin-RevId: 99b60b9044fab9357a3440aed7da55f146677e6b
2019-12-08 09:57:33 +03:00
levlam
c81e18f5f1 Do not try to use sysctl if sys/sysctl.h is not included.
GitOrigin-RevId: 49a50aa9c102fd3681963552f5524840e8d222df
2019-10-23 05:00:04 +03:00
levlam
4ffa2169d9 tdutils: Fix build for alpine linux
* Error log: https://del.dog/ujofeqowol
2019-10-23 04:55:25 +03:00
levlam
4d68487c12 Add utf8_utf16_length.
GitOrigin-RevId: d5e713df1f3e0cdf70004d0898c5b55246dd014e
2019-10-07 03:41:04 +03:00
levlam
0b6c1d226f Update clag-format to the latest (190926/r372920) version.
GitOrigin-RevId: 7861ae8ad28eb1f6a06ff3c6f56eff3f67b1d24c
2019-09-28 05:14:21 +03:00
levlam
f29c4a9ed1 Remove unneded explicit td::.
GitOrigin-RevId: e3888510ce72a55072a11d105311f07b4ba42bbf
2019-09-15 06:19:46 +03:00
levlam
ef5e709ac8 Fix clang 3.4 and OpenSSL 0.9.8 CE.
GitOrigin-RevId: 9157bfe975bdb376fbd573bd23107c36b1444f34
2019-09-09 02:04:30 +03:00
levlam
abb140a714 Minor improvements.
GitOrigin-RevId: a50ba2cc0b47b395d7d7787ad59868d23bf22634
2019-09-08 03:49:16 +03:00
Arseny Smirnov
2b382567be NativeFd: fix CHECKs
GitOrigin-RevId: bbbbad169513c4503eba1c7a98349c98b9e6ed1a
2019-08-28 16:59:50 +03:00
levlam
22f4507033 ThreadPthread fixes.
GitOrigin-RevId: 5c56a443f95beda913c3b1b46eacbfc068271c0e
2019-08-26 17:44:30 +03:00
Arseny Smirnov
80d96550ba ThreadPthread: better hardware_concurrency implementation
GitOrigin-RevId: 4cccfcbf5f6ad5e1293993ff111b8021bb5c70a1
2019-08-26 15:35:08 +03:00
levlam
197acde4d4 Fix first letter case in error messages.
GitOrigin-RevId: 004d1535d3fb04e51a088ad43f2386dea05b7c9c
2019-08-26 04:53:22 +03:00
Arseny Smirnov
f63ce74fef tdutils: import changes from other project
GitOrigin-RevId: 0cfbe2418933cffdce4f0d1b8461c247a814d868
2019-08-12 14:45:57 +03:00
levlam
1a100e1b0f Add NetBSD support.
GitOrigin-RevId: 42703ce955a4323757de56d0c012a54246227f70
2019-08-02 19:06:53 +03:00
levlam
9c52330720 Fix warning.
GitOrigin-RevId: ecbdb3656e990cf9d8eaf7dafbbd209b5e7b1484
2019-08-02 14:29:00 +03:00
levlam
28d3f2d860 Add OpenBSD support.
GitOrigin-RevId: 80d37bf8b6e55f68f3839bf2093994015176eecb
2019-08-02 03:25:28 +03:00
Arseny Smirnov
420a0e43af NativeFd: remove on_release_fd method
GitOrigin-RevId: 16c5d50b2a796767865b4ee32b8c2492655bd529
2019-08-01 19:43:36 +03:00
levlam
24f1a2214a Fix warnings.
GitOrigin-RevId: dbfa557bcf9dc3cd63dd5cbbbed9d23b48a5b627
2019-08-01 19:09:10 +03:00
Arseny Smirnov
b0ad2ad190 Fix TD_FD_DEBUG
GitOrigin-RevId: fd4ace2ccc618d1e43aff9226aa1d2777aa6874d
2019-08-01 07:06:43 +03:00
levlam
457f3424aa Fix TD_FD_DEBUG mode.
GitOrigin-RevId: ba9eb0f51308f865802947eeaef46e7adaa2608f
2019-08-01 05:11:55 +03:00
levlam
a82e80be0a Fix CE.
GitOrigin-RevId: 686b83e2202c35f811bd4fd56d80b3e6970c4f2c
2019-08-01 04:55:56 +03:00
levlam
dacd81a8fa NativeFd fixes.
GitOrigin-RevId: b792887066dc5f004f3d4f61224840be4cd01eeb
2019-08-01 02:48:34 +03:00
Arseny Smirnov
bc1e26779f Epoll: use NativeFd
GitOrigin-RevId: a4ff097abcf03cc7ac3a918969762c1539a19644
2019-07-31 13:45:15 +03:00
Arseny Smirnov
115fba770f TD_FD_DEBUG: cmake option to debug EINVAL errors
GitOrigin-RevId: d0bd1be3a16b94a71c45ec4cca5f42e1364a3200
2019-07-31 12:18:48 +03:00
levlam
78dd033988 Fix call to CreateFile2.
GitOrigin-RevId: 71fad1b8484402e997b07641552205894d0e1c3e
2019-07-24 15:30:50 +03:00
levlam
98b8929932 Fix includes.
GitOrigin-RevId: 7b62de39f2d62ac8c14c24fb83041c717ba49873
2019-07-23 01:50:12 +03:00
levlam
5de928006b Fix GCC CE and warnings.
GitOrigin-RevId: 21c7aa0f95f6534c8d8f1515fc93c67b55bb7998
2019-07-22 07:05:50 +03:00
levlam
20503e04d2 Various fixes.
GitOrigin-RevId: da4869e5054952663ad5993f5770f2984a473818
2019-07-22 07:01:51 +03:00
levlam
feb2beeec0 Fix testProxy.
GitOrigin-RevId: 6ad0bf0e7685ccae35931c4949ba29bafbcc6335
2019-07-22 05:04:18 +03:00
levlam
635aca2924 Fix tdutils after update.
GitOrigin-RevId: afc6d10dd0e2b2a7193dd2c96f07d5ca1cb11a00
2019-07-21 21:07:07 +03:00
levlam
e300208960 Add missing files.
GitOrigin-RevId: 8a8503246a51483927b683ba5cd74f758e21a538
2019-07-07 03:05:30 +03:00
Arseny Smirnov
02c31f486f tdutils: update from other project
GitOrigin-RevId: 73c666dbdd72811b151a48504716ed4aee6af1a0
2019-07-06 13:29:15 +02:00
levlam
948da791ad Wrap calls to fsync with skip_eintr.
GitOrigin-RevId: c7eaba54794d461428cce064e51be26909f39a30
2019-07-03 17:51:00 +03:00
levlam
0a1fb007d9 TlsInit fixes.
GitOrigin-RevId: 798d053d68b6e0955b6e0e0c7c8d36592f76c987
2019-07-01 16:18:28 +03:00
levlam
c5eace2057 FileFd::stat fixes.
GitOrigin-RevId: 36197c4d134e4afe902eef066dc497c03228c271
2019-06-20 05:09:03 +03:00
Arseny Smirnov
ff3164ff04 Fd::stat returns Result<Stat> instead of Stat
GitOrigin-RevId: 7bdb5f0d65df55424db302e4df060b697d8ee11d
2019-06-19 16:31:25 +02:00
levlam
6ffd4ce1f4 Fix walk_path.
GitOrigin-RevId: a75c5a6314e3c5312cd94a5844d276710ec9944c
2019-06-05 03:59:37 +03:00
levlam
34fcde6827 Minor fixes.
GitOrigin-RevId: a5d8a4b0b9b9c4e858d7a9a7403bef0de7e009e0
2019-05-22 21:17:24 +03:00
Arseny Smirnov
7831955779 Fix CE
GitOrigin-RevId: 1747b786d930cd2150a9d5eacd75908e3f37a45b
2019-05-02 06:43:33 +02:00
Arseny Smirnov
83f99f6193 Fix CE
GitOrigin-RevId: 48135ab7ebeea8bc6b14de5734a107068cb0dc99
2019-05-01 22:31:07 +02:00
Arseny Smirnov
0264e2bbfd WalkPath: allow to skip dirs and to abort a walk
GitOrigin-RevId: 6be49d1c098b0d17b63ae1f26dbefb6904320d6b
2019-05-01 12:23:19 +03:00
levlam
62fb384ec6 Fix return type of WSAGetOverlappedResult.
GitOrigin-RevId: d6e8575d2b8c15ce1f285de2eae573e7bf6f46fa
2019-04-26 05:15:26 +03:00
levlam
6acdaf056f Fix std::atomic_flag init.
GitOrigin-RevId: a5db747edd902e2e6c7847c7c525bbd2cef0df1a
2019-04-22 03:18:33 +03:00
levlam
d494a3e13f Return stdin to blocking state when closing.
GitOrigin-RevId: db4f43a526b099f07dbc5c1c717cc4e67aad5ee7
2019-03-22 01:59:16 +03:00
levlam
6af95d721d Deprecate Log in .NET native binding.
GitOrigin-RevId: 08d3321d68a7406dd0e2a5f5877619d9e864ba1e
2019-02-24 19:17:36 +03:00
levlam
272608a5fb Use F_FULLFSYNC instead of fsync on Darwin.
GitOrigin-RevId: 05a7bc0683641a679b026b6d636fa127fe104123
2019-02-22 04:20:23 +03:00
levlam
93494cf048 Fix log messages style.
GitOrigin-RevId: f99e2e838220826d3dea7fdc33c43ac9918a5efd
2019-02-21 18:58:20 +03:00
levlam
9b42166c68 Explicitly include common.h.
GitOrigin-RevId: 5ae32c18d0ff18aac36334b494ea526ce7da4a9a
2019-02-13 00:26:36 +03:00
levlam
eb9ead582f Remove unneded includes of td/utils/loggging.h.
GitOrigin-RevId: 82a3b506dba5c9d5267dc0e2504a7093a7fa87db
2019-02-12 23:48:16 +03:00
Arseny Smirnov
20bfcaa979 Use LOG_CHECK where it is necessary
GitOrigin-RevId: a8bd17cc2ee6e43dcea52bb25aef9ee1f91c7ec4
2019-02-12 19:17:20 +03:00