aboutsummaryrefslogtreecommitdiff
path: root/BUILD
diff options
context:
space:
mode:
authorLaszlo Csomor <laszlocsomor@google.com>2017-03-30 14:12:44 +0200
committerLaszlo Csomor <laszlocsomor@google.com>2017-07-11 08:31:54 +0200
commite05e777d468c2486cea53764f1ac70859b5e98c4 (patch)
tree77cf85f401633bf95a42c4556dfe0e54878b9cec /BUILD
parent9ab7c73f7c989afa777a40ff2a7c5f0f138be22c (diff)
downloadprotobuf-e05e777d468c2486cea53764f1ac70859b5e98c4.tar.gz
protobuf-e05e777d468c2486cea53764f1ac70859b5e98c4.tar.bz2
protobuf-e05e777d468c2486cea53764f1ac70859b5e98c4.zip
Windows: support long paths
Add implementations of open(2), mkdir(2), stat(2), etc. that support long paths under Windows (paths longer than MAX_PATH in <windows.h>, which is 260 characters). The implementations are in a separate namespace (google::protobuf::internal::win32), so they won't collide with the standard implementations in <io.h>, but after importing them with `using` they can be drop-in replacements. Fixes https://github.com/bazelbuild/bazel/issues/2634 Fixes https://github.com/google/protobuf/issues/2891
Diffstat (limited to 'BUILD')
-rw-r--r--BUILD14
1 files changed, 14 insertions, 0 deletions
diff --git a/BUILD b/BUILD
index 5102d6ff..3ddd7b58 100644
--- a/BUILD
+++ b/BUILD
@@ -108,6 +108,7 @@ cc_library(
"src/google/protobuf/stubs/bytestream.cc",
"src/google/protobuf/stubs/common.cc",
"src/google/protobuf/stubs/int128.cc",
+ "src/google/protobuf/stubs/io_win32.cc",
"src/google/protobuf/stubs/once.cc",
"src/google/protobuf/stubs/status.cc",
"src/google/protobuf/stubs/statusor.cc",
@@ -159,6 +160,7 @@ cc_library(
"src/google/protobuf/service.cc",
"src/google/protobuf/source_context.pb.cc",
"src/google/protobuf/struct.pb.cc",
+ "src/google/protobuf/stubs/io_win32.cc",
"src/google/protobuf/stubs/mathlimits.cc",
"src/google/protobuf/stubs/substitute.cc",
"src/google/protobuf/text_format.cc",
@@ -470,6 +472,7 @@ COMMON_TEST_SRCS = [
# AUTOGEN(common_test_srcs)
"src/google/protobuf/arena_test_util.cc",
"src/google/protobuf/map_test_util.cc",
+ "src/google/protobuf/stubs/io_win32.cc",
"src/google/protobuf/test_util.cc",
"src/google/protobuf/testing/file.cc",
"src/google/protobuf/testing/googletest.cc",
@@ -491,6 +494,16 @@ cc_binary(
)
cc_test(
+ name = "win32_test",
+ srcs = ["src/google/protobuf/stubs/io_win32_unittest.cc"],
+ deps = [
+ ":protobuf_lite",
+ "//external:gtest_main",
+ ],
+ tags = ["manual", "windows"],
+)
+
+cc_test(
name = "protobuf_test",
srcs = COMMON_TEST_SRCS + [
# AUTOGEN(test_srcs)
@@ -536,6 +549,7 @@ cc_test(
"src/google/protobuf/stubs/bytestream_unittest.cc",
"src/google/protobuf/stubs/common_unittest.cc",
"src/google/protobuf/stubs/int128_unittest.cc",
+ "src/google/protobuf/stubs/io_win32_unittest.cc",
"src/google/protobuf/stubs/once_unittest.cc",
"src/google/protobuf/stubs/status_test.cc",
"src/google/protobuf/stubs/statusor_test.cc",