HDFS-16564. Use uint32_t for hdfs_find (#4245)

* hdfs_find uses u_int32_t type for
  storing the value for the max-depth
  command line argument.
* The type u_int32_t isn't standard,
  isn't available on Windows and thus
  breaks cross-platform compatibility.
  We need to replace this with uint32_t
  which is available on all platforms since
  it's part of the C++ standard.
This commit is contained in:
Gautham B A 2022-05-04 20:19:08 +05:30 committed by GitHub
parent 4230162a76
commit d346be9bd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -16,6 +16,7 @@
* limitations under the License.
*/
#include <cstdint>
#include <future>
#include <iostream>
#include <memory>
@ -40,7 +41,7 @@ bool Find::Initialize() {
"If provided, all results will be matching the NAME pattern otherwise, "
"the implicit '*' will be used NAME allows wild-cards");
add_options(
"max-depth,m", po::value<u_int32_t>(),
"max-depth,m", po::value<uint32_t>(),
"If provided, the maximum depth to recurse after the end of the path is "
"reached will be limited by MAX_DEPTH otherwise, the maximum depth to "
"recurse is unbound MAX_DEPTH can be set to 0 for pure globbing and "