Skip to content

Commit

Permalink
HDFS-16564. Use uint32_t for hdfs_find (#4245)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
GauthamBanasandra authored May 4, 2022
1 parent 4230162 commit d346be9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* limitations under the License.
*/

#include <cstdint>
#include <future>
#include <iostream>
#include <memory>
Expand All @@ -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 "
Expand Down

0 comments on commit d346be9

Please sign in to comment.