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
81c3e0cf
Unverified
Commit
81c3e0cf
authored
Nov 19, 2018
by
Joshua Haberman
Committed by
GitHub
Nov 19, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5142 from noloader/master
Mostly fix Sun Studio configuration using SunCC compiler (GH #5141)
parents
cb7678eb
be14bf2b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
+14
-8
acx_check_suncc.m4
m4/acx_check_suncc.m4
+4
-1
generated_message_util.cc
src/google/protobuf/generated_message_util.cc
+8
-6
common.cc
src/google/protobuf/stubs/common.cc
+2
-1
No files found.
m4/acx_check_suncc.m4
View file @
81c3e0cf
...
...
@@ -26,7 +26,7 @@ AC_DEFUN([ACX_CHECK_SUNCC],[
AS_IF([test "$SUNCC" = "yes" -a "x${ac_cv_env_CXXFLAGS_set}" = "x"],[
dnl Sun Studio has a crashing bug with -xO4 in some cases. Keep this
dnl at -xO3 until a proper test to detect those crashes can be done.
CXXFLAGS="-g0 -xO3 -xlibmil -xdepend -xbuiltin -mt -
compat=5 -library=stlport4 -library=Crun -
template=no%extdef ${CXXFLAGS}"
CXXFLAGS="-g0 -xO3 -xlibmil -xdepend -xbuiltin -mt -template=no%extdef ${CXXFLAGS}"
])
case $host_os in
...
...
@@ -67,4 +67,7 @@ AC_DEFUN([ACX_CHECK_SUNCC],[
;;
esac
AS_IF([test "$target_cpu" = "sparc" -a "x$SUNCC" = "xyes" ],[
CXXFLAGS="-xregs=no%appl ${CXXFLAGS}"
])
])
src/google/protobuf/generated_message_util.cc
View file @
81c3e0cf
...
...
@@ -620,6 +620,7 @@ bool IsNull<FieldMetadata::kInlinedType>(const void* ptr) {
void
SerializeInternal
(
const
uint8
*
base
,
const
FieldMetadata
*
field_metadata_table
,
int32
num_fields
,
io
::
CodedOutputStream
*
output
)
{
SpecialSerializer
func
=
nullptr
;
for
(
int
i
=
0
;
i
<
num_fields
;
i
++
)
{
const
FieldMetadata
&
field_metadata
=
field_metadata_table
[
i
];
const
uint8
*
ptr
=
base
+
field_metadata
.
offset
;
...
...
@@ -646,9 +647,9 @@ void SerializeInternal(const uint8* base,
// Special cases
case
FieldMetadata
:
:
kSpecial
:
reinterpret_cast
<
SpecialSerializer
>
(
const_cast
<
void
*>
(
field_metadata
.
ptr
))
(
base
,
field_metadata
.
offset
,
field_metadata
.
tag
,
func
=
reinterpret_cast
<
SpecialSerializer
>
(
const_cast
<
void
*>
(
field_metadata
.
ptr
))
;
func
(
base
,
field_metadata
.
offset
,
field_metadata
.
tag
,
field_metadata
.
has_offset
,
output
);
break
;
default
:
...
...
@@ -664,6 +665,7 @@ uint8* SerializeInternalToArray(const uint8* base,
uint8
*
buffer
)
{
ArrayOutput
array_output
=
{
buffer
,
is_deterministic
};
ArrayOutput
*
output
=
&
array_output
;
SpecialSerializer
func
=
nullptr
;
for
(
int
i
=
0
;
i
<
num_fields
;
i
++
)
{
const
FieldMetadata
&
field_metadata
=
field_metadata_table
[
i
];
const
uint8
*
ptr
=
base
+
field_metadata
.
offset
;
...
...
@@ -692,9 +694,9 @@ uint8* SerializeInternalToArray(const uint8* base,
io
::
ArrayOutputStream
array_stream
(
array_output
.
ptr
,
INT_MAX
);
io
::
CodedOutputStream
output
(
&
array_stream
);
output
.
SetSerializationDeterministic
(
is_deterministic
);
reinterpret_cast
<
SpecialSerializer
>
(
const_cast
<
void
*>
(
field_metadata
.
ptr
))
(
base
,
field_metadata
.
offset
,
field_metadata
.
tag
,
func
=
reinterpret_cast
<
SpecialSerializer
>
(
const_cast
<
void
*>
(
field_metadata
.
ptr
))
;
func
(
base
,
field_metadata
.
offset
,
field_metadata
.
tag
,
field_metadata
.
has_offset
,
&
output
);
array_output
.
ptr
+=
output
.
ByteCount
();
}
break
;
...
...
src/google/protobuf/stubs/common.cc
View file @
81c3e0cf
...
...
@@ -338,7 +338,8 @@ struct ShutdownData {
};
static
void
RunZeroArgFunc
(
const
void
*
arg
)
{
reinterpret_cast
<
void
(
*
)()
>
(
const_cast
<
void
*>
(
arg
))();
void
(
*
func
)()
=
reinterpret_cast
<
void
(
*
)()
>
(
const_cast
<
void
*>
(
arg
));
func
();
}
void
OnShutdown
(
void
(
*
func
)())
{
...
...
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