Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
2761122b
Unverified
Commit
2761122b
authored
Nov 13, 2017
by
Jisi Liu
Committed by
GitHub
Nov 13, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3868 from pherl/3.5.x
Support win32 long path for cross compiled build
parents
188f1804
9c197b7e
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
22 additions
and
29 deletions
+22
-29
command_line_interface.cc
src/google/protobuf/compiler/command_line_interface.cc
+1
-1
command_line_interface_unittest.cc
...ogle/protobuf/compiler/command_line_interface_unittest.cc
+1
-1
importer.cc
src/google/protobuf/compiler/importer.cc
+1
-1
objectivec_helpers.cc
...google/protobuf/compiler/objectivec/objectivec_helpers.cc
+11
-6
plugin.cc
src/google/protobuf/compiler/plugin.cc
+1
-1
zero_copy_stream_impl.cc
src/google/protobuf/io/zero_copy_stream_impl.cc
+0
-3
zero_copy_stream_unittest.cc
src/google/protobuf/io/zero_copy_stream_unittest.cc
+0
-3
message_unittest.cc
src/google/protobuf/message_unittest.cc
+1
-1
io_win32.cc
src/google/protobuf/stubs/io_win32.cc
+2
-2
io_win32.h
src/google/protobuf/stubs/io_win32.h
+0
-6
io_win32_unittest.cc
src/google/protobuf/stubs/io_win32_unittest.cc
+2
-2
file.cc
src/google/protobuf/testing/file.cc
+1
-1
googletest.cc
src/google/protobuf/testing/googletest.cc
+1
-1
No files found.
src/google/protobuf/compiler/command_line_interface.cc
View file @
2761122b
...
@@ -100,7 +100,7 @@ namespace compiler {
...
@@ -100,7 +100,7 @@ namespace compiler {
#endif
#endif
namespace
{
namespace
{
#if defined(_
MSC_VER
)
#if defined(_
WIN32
)
// DO NOT include <io.h>, instead create functions in io_win32.{h,cc} and import
// DO NOT include <io.h>, instead create functions in io_win32.{h,cc} and import
// them like we do below.
// them like we do below.
using
google
::
protobuf
::
internal
::
win32
::
access
;
using
google
::
protobuf
::
internal
::
win32
::
access
;
...
...
src/google/protobuf/compiler/command_line_interface_unittest.cc
View file @
2761122b
...
@@ -70,7 +70,7 @@ namespace google {
...
@@ -70,7 +70,7 @@ namespace google {
namespace
protobuf
{
namespace
protobuf
{
namespace
compiler
{
namespace
compiler
{
#if defined(_
MSC_VER
)
#if defined(_
WIN32
)
// DO NOT include <io.h>, instead create functions in io_win32.{h,cc} and import
// DO NOT include <io.h>, instead create functions in io_win32.{h,cc} and import
// them like we do below.
// them like we do below.
using
google
::
protobuf
::
internal
::
win32
::
access
;
using
google
::
protobuf
::
internal
::
win32
::
access
;
...
...
src/google/protobuf/compiler/importer.cc
View file @
2761122b
...
@@ -65,7 +65,7 @@ namespace google {
...
@@ -65,7 +65,7 @@ namespace google {
namespace
protobuf
{
namespace
protobuf
{
namespace
compiler
{
namespace
compiler
{
#ifdef _
MSC_VER
#ifdef _
WIN32
// DO NOT include <io.h>, instead create functions in io_win32.{h,cc} and import
// DO NOT include <io.h>, instead create functions in io_win32.{h,cc} and import
// them like we do below.
// them like we do below.
using
google
::
protobuf
::
internal
::
win32
::
access
;
using
google
::
protobuf
::
internal
::
win32
::
access
;
...
...
src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
View file @
2761122b
...
@@ -50,11 +50,6 @@
...
@@ -50,11 +50,6 @@
#include <google/protobuf/stubs/io_win32.h>
#include <google/protobuf/stubs/io_win32.h>
#include <google/protobuf/stubs/strutil.h>
#include <google/protobuf/stubs/strutil.h>
#if defined(_MSC_VER)
// DO NOT include <io.h>, instead create functions in io_win32.{h,cc} and import
// them like we do below.
using
google
::
protobuf
::
internal
::
win32
::
open
;
#endif
// NOTE: src/google/protobuf/compiler/plugin.cc makes use of cerr for some
// NOTE: src/google/protobuf/compiler/plugin.cc makes use of cerr for some
// error cases, so it seems to be ok to use as a back door for errors.
// error cases, so it seems to be ok to use as a back door for errors.
...
@@ -64,6 +59,16 @@ namespace protobuf {
...
@@ -64,6 +59,16 @@ namespace protobuf {
namespace
compiler
{
namespace
compiler
{
namespace
objectivec
{
namespace
objectivec
{
// <io.h> is transitively included in this file. Import the functions explicitly
// in this port namespace to avoid ambiguous definition.
namespace
posix
{
#ifdef _WIN32
using
::
google
::
protobuf
::
internal
::
win32
::
open
;
#else
using
::
open
;
#endif
}
// namespace port
Options
::
Options
()
{
Options
::
Options
()
{
// Default is the value of the env for the package prefixes.
// Default is the value of the env for the package prefixes.
const
char
*
file_path
=
getenv
(
"GPB_OBJC_EXPECTED_PACKAGE_PREFIXES"
);
const
char
*
file_path
=
getenv
(
"GPB_OBJC_EXPECTED_PACKAGE_PREFIXES"
);
...
@@ -1469,7 +1474,7 @@ bool ParseSimpleFile(
...
@@ -1469,7 +1474,7 @@ bool ParseSimpleFile(
const
string
&
path
,
LineConsumer
*
line_consumer
,
string
*
out_error
)
{
const
string
&
path
,
LineConsumer
*
line_consumer
,
string
*
out_error
)
{
int
fd
;
int
fd
;
do
{
do
{
fd
=
open
(
path
.
c_str
(),
O_RDONLY
);
fd
=
posix
::
open
(
path
.
c_str
(),
O_RDONLY
);
}
while
(
fd
<
0
&&
errno
==
EINTR
);
}
while
(
fd
<
0
&&
errno
==
EINTR
);
if
(
fd
<
0
)
{
if
(
fd
<
0
)
{
*
out_error
=
*
out_error
=
...
...
src/google/protobuf/compiler/plugin.cc
View file @
2761122b
...
@@ -54,7 +54,7 @@ namespace google {
...
@@ -54,7 +54,7 @@ namespace google {
namespace
protobuf
{
namespace
protobuf
{
namespace
compiler
{
namespace
compiler
{
#if defined(_
MSC_VER
)
#if defined(_
WIN32
)
// DO NOT include <io.h>, instead create functions in io_win32.{h,cc} and import
// DO NOT include <io.h>, instead create functions in io_win32.{h,cc} and import
// them like we do below.
// them like we do below.
using
google
::
protobuf
::
internal
::
win32
::
setmode
;
using
google
::
protobuf
::
internal
::
win32
::
setmode
;
...
...
src/google/protobuf/io/zero_copy_stream_impl.cc
View file @
2761122b
...
@@ -56,9 +56,6 @@ namespace io {
...
@@ -56,9 +56,6 @@ namespace io {
// Win32 lseek is broken: If invoked on a non-seekable file descriptor, its
// Win32 lseek is broken: If invoked on a non-seekable file descriptor, its
// return value is undefined. We re-define it to always produce an error.
// return value is undefined. We re-define it to always produce an error.
#define lseek(fd, offset, origin) ((off_t)-1)
#define lseek(fd, offset, origin) ((off_t)-1)
#endif
#ifdef _MSC_VER
// DO NOT include <io.h>, instead create functions in io_win32.{h,cc} and import
// DO NOT include <io.h>, instead create functions in io_win32.{h,cc} and import
// them like we do below.
// them like we do below.
using
google
::
protobuf
::
internal
::
win32
::
access
;
using
google
::
protobuf
::
internal
::
win32
::
access
;
...
...
src/google/protobuf/io/zero_copy_stream_unittest.cc
View file @
2761122b
...
@@ -83,9 +83,6 @@ namespace {
...
@@ -83,9 +83,6 @@ namespace {
#ifdef _WIN32
#ifdef _WIN32
#define pipe(fds) _pipe(fds, 4096, O_BINARY)
#define pipe(fds) _pipe(fds, 4096, O_BINARY)
#endif
#ifdef _MSC_VER
// DO NOT include <io.h>, instead create functions in io_win32.{h,cc} and import
// DO NOT include <io.h>, instead create functions in io_win32.{h,cc} and import
// them like we do below.
// them like we do below.
using
google
::
protobuf
::
internal
::
win32
::
access
;
using
google
::
protobuf
::
internal
::
win32
::
access
;
...
...
src/google/protobuf/message_unittest.cc
View file @
2761122b
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
namespace
google
{
namespace
google
{
namespace
protobuf
{
namespace
protobuf
{
#if defined(_
MSC_VER
)
#if defined(_
WIN32
)
// DO NOT include <io.h>, instead create functions in io_win32.{h,cc} and import
// DO NOT include <io.h>, instead create functions in io_win32.{h,cc} and import
// them like we do below.
// them like we do below.
using
google
::
protobuf
::
internal
::
win32
::
close
;
using
google
::
protobuf
::
internal
::
win32
::
close
;
...
...
src/google/protobuf/stubs/io_win32.cc
View file @
2761122b
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
//
//
// This file is only used on Windows, it's empty on other platforms.
// This file is only used on Windows, it's empty on other platforms.
#if defined(_
MSC_VER
)
#if defined(_
WIN32
)
// Comment this out to fall back to using the ANSI versions (open, mkdir, ...)
// Comment this out to fall back to using the ANSI versions (open, mkdir, ...)
// instead of the Unicode ones (_wopen, _wmkdir, ...). Doing so can be useful to
// instead of the Unicode ones (_wopen, _wmkdir, ...). Doing so can be useful to
...
@@ -358,5 +358,5 @@ wstring testonly_path_to_winpath(const string& path) {
...
@@ -358,5 +358,5 @@ wstring testonly_path_to_winpath(const string& path) {
}
// namespace protobuf
}
// namespace protobuf
}
// namespace google
}
// namespace google
#endif // defined(_
MSC_VER
)
#endif // defined(_
WIN32
)
src/google/protobuf/stubs/io_win32.h
View file @
2761122b
...
@@ -52,7 +52,6 @@
...
@@ -52,7 +52,6 @@
// Compilers on Windows other than MSVC (e.g. Cygwin, MinGW32) define the
// Compilers on Windows other than MSVC (e.g. Cygwin, MinGW32) define the
// following functions already, except for mkdir.
// following functions already, except for mkdir.
#ifdef _MSC_VER
namespace
google
{
namespace
google
{
namespace
protobuf
{
namespace
protobuf
{
namespace
internal
{
namespace
internal
{
...
@@ -77,9 +76,6 @@ LIBPROTOBUF_EXPORT std::wstring testonly_path_to_winpath(
...
@@ -77,9 +76,6 @@ LIBPROTOBUF_EXPORT std::wstring testonly_path_to_winpath(
}
// namespace internal
}
// namespace internal
}
// namespace protobuf
}
// namespace protobuf
}
// namespace google
}
// namespace google
#else // _MSC_VER
#define mkdir(name, mode) mkdir(name)
#endif // !_MSC_VER
#ifndef W_OK
#ifndef W_OK
#define W_OK 02 // not defined by MSVC for whatever reason
#define W_OK 02 // not defined by MSVC for whatever reason
...
@@ -100,5 +96,3 @@ LIBPROTOBUF_EXPORT std::wstring testonly_path_to_winpath(
...
@@ -100,5 +96,3 @@ LIBPROTOBUF_EXPORT std::wstring testonly_path_to_winpath(
#endif // defined(_WIN32)
#endif // defined(_WIN32)
#endif // GOOGLE_PROTOBUF_STUBS_IO_WIN32_H__
#endif // GOOGLE_PROTOBUF_STUBS_IO_WIN32_H__
src/google/protobuf/stubs/io_win32_unittest.cc
View file @
2761122b
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
//
//
// This file is only used on Windows, it's empty on other platforms.
// This file is only used on Windows, it's empty on other platforms.
#if defined(_
MSC_VER
)
#if defined(_
WIN32
)
#define WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#include <errno.h>
#include <errno.h>
...
@@ -369,5 +369,5 @@ TEST_F(IoWin32Test, AsWindowsPathTest) {
...
@@ -369,5 +369,5 @@ TEST_F(IoWin32Test, AsWindowsPathTest) {
}
// namespace protobuf
}
// namespace protobuf
}
// namespace google
}
// namespace google
#endif // defined(_
MSC_VER
)
#endif // defined(_
WIN32
)
src/google/protobuf/testing/file.cc
View file @
2761122b
...
@@ -57,7 +57,7 @@ namespace protobuf {
...
@@ -57,7 +57,7 @@ namespace protobuf {
// them like we do below.
// them like we do below.
#endif
#endif
#ifdef _
MSC_VER
#ifdef _
WIN32
using
google
::
protobuf
::
internal
::
win32
::
access
;
using
google
::
protobuf
::
internal
::
win32
::
access
;
using
google
::
protobuf
::
internal
::
win32
::
chdir
;
using
google
::
protobuf
::
internal
::
win32
::
chdir
;
using
google
::
protobuf
::
internal
::
win32
::
fopen
;
using
google
::
protobuf
::
internal
::
win32
::
fopen
;
...
...
src/google/protobuf/testing/googletest.cc
View file @
2761122b
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
namespace
google
{
namespace
google
{
namespace
protobuf
{
namespace
protobuf
{
#ifdef _
MSC_VER
#ifdef _
WIN32
// DO NOT include <io.h>, instead create functions in io_win32.{h,cc} and import
// DO NOT include <io.h>, instead create functions in io_win32.{h,cc} and import
// them like we do below.
// them like we do below.
using
google
::
protobuf
::
internal
::
win32
::
close
;
using
google
::
protobuf
::
internal
::
win32
::
close
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment