Skip to content

Commit 9de148e

Browse files
committed
Merge protobuf update.
2 parents d33f18e + b8b11c3 commit 9de148e

File tree

272 files changed

+772
-305
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

272 files changed

+772
-305
lines changed

cdk/protobuf/CMakeLists.txt

Lines changed: 56 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
22
#
33
# The MySQL Connector/C++ is licensed under the terms of the GPLv2
44
# <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
@@ -20,14 +20,14 @@
2020
# with this program; if not, write to the Free Software Foundation, Inc.,
2121
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2222

23-
# The files in protobuf-2.6.0/ are unmodified versions of google source files.
23+
# The files in protobuf-2.6.1/ are unmodified versions of google source files.
2424
# To save some space and time, we have remove directories which are not
2525
# needed by MySQL:
26-
# protobuf-2.6.0/gtest/
27-
# protobuf-2.6.0/java/
28-
# protobuf-2.6.0/python/
29-
# protobuf-2.6.0/m4/
30-
# protobuf-2.6.0/vsprojects/
26+
# protobuf-2.6.1/gtest/
27+
# protobuf-2.6.1/java/
28+
# protobuf-2.6.1/python/
29+
# protobuf-2.6.1/m4/
30+
# protobuf-2.6.1/vsprojects/
3131

3232
cmake_minimum_required(VERSION 2.8)
3333
PROJECT(Protobuf)
@@ -37,7 +37,7 @@ PROJECT(Protobuf)
3737
# TODO: Put some meaningful configuration there.
3838
#
3939

40-
file(WRITE ${PROJECT_BINARY_DIR}/config.h)
40+
file(WRITE ${PROJECT_BINARY_DIR}/config.h "\n")
4141

4242
#
4343
# Do not export any symbols
@@ -49,6 +49,37 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
4949
add_compile_options(-fvisibility=hidden)
5050
endif()
5151

52+
53+
#
54+
# Solaris compile and link settings
55+
#
56+
57+
if(CMAKE_SYSTEM_NAME MATCHES "SunOS")
58+
59+
add_definitions(-DSOLARIS_64BIT_ENABLED)
60+
61+
if(CMAKE_SYSTEM_PROCESSOR MATCHES "sparc")
62+
add_definitions(-DGOOGLE_PROTOBUF_ARCH_SPARC)
63+
endif()
64+
65+
add_compile_options(
66+
-m64 -std=c++11
67+
-xbuiltin=%all
68+
-xlibmil
69+
-xatomic=studio
70+
)
71+
72+
foreach(type EXE SHARED MODULE)
73+
74+
set(CMAKE_${type}_LINKER_FLAGS
75+
"-m64 -std=c++11 -lstdc++ -xatomic=studio -lCrunG3 -lgcc_s -lc"
76+
)
77+
78+
endforeach()
79+
80+
endif()
81+
82+
5283
#
5384
# Configure static runtime library on Windows if requested
5485
#
@@ -99,6 +130,7 @@ IF(UNIX)
99130
list(APPEND warnings_list "-Wno-ignored-qualifiers")
100131
list(APPEND warnings_list "-Wno-return-type")
101132
list(APPEND warnings_list "-Wno-unused-function")
133+
list(APPEND warnings_list "-Wno-unused-local-typedefs")
102134

103135
if(APPLE)
104136

@@ -110,11 +142,23 @@ IF(UNIX)
110142

111143
endif()
112144

113-
IF(CMAKE_COMPILER_IS_GNUCXX)
145+
if(CMAKE_COMPILER_IS_GNUCXX)
146+
114147
list(APPEND warnings_list "-Wno-unused-local-typedefs")
115148
list(APPEND warnings_list "-Wno-maybe-uninitialized")
116149
list(APPEND warnings_list "-Wno-unused-but-set-parameter")
117-
ENDIF()
150+
151+
elseif(CMAKE_SYSTEM_NAME MATCHES "SunOS")
152+
153+
# Option -erroff disables only warnings, actually. This option requires
154+
# a warning tag, which is printed if -errtags option is enabled.
155+
156+
add_compile_options(
157+
-errtags=yes
158+
-erroff=anonnotype
159+
)
160+
161+
endif()
118162

119163
ELSE(WIN32)
120164

@@ -129,8 +173,7 @@ ELSE(WIN32)
129173

130174
ENDIF()
131175

132-
string(REPLACE ";" " " warning_options "${warnings_list}")
133-
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${warning_options}")
176+
add_compile_options(${warnings_list})
134177

135178

136179
#
@@ -139,7 +182,7 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${warning_options}")
139182

140183

141184
SET(PROTO_SRC_DIR
142-
"${PROJECT_SOURCE_DIR}/protobuf-2.6.0/src")
185+
"${PROJECT_SOURCE_DIR}/protobuf-2.6.1/src")
143186

144187
set(build_stamp "${PROJECT_BINARY_DIR}/build.stamp")
145188

cdk/protobuf/protobuf-2.6.0/src/google/protobuf/testdata/golden_message

Whitespace-only changes.

cdk/protobuf/protobuf-2.6.0/src/google/protobuf/testdata/golden_message_oneof_implemented

Whitespace-only changes.

cdk/protobuf/protobuf-2.6.0/src/google/protobuf/testdata/golden_packed_fields_message

Whitespace-only changes.

cdk/protobuf/protobuf-2.6.0/CHANGES.txt renamed to cdk/protobuf/protobuf-2.6.1/CHANGES.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
2014-10-20 version 2.6.1:
2+
3+
C++
4+
* Added atomicops support for Solaris.
5+
* Released memory allocated by InitializeDefaultRepeatedFields() and
6+
GetEmptyString(). Some memory sanitizers reported them as memory leaks.
7+
8+
Java
9+
* Updated DynamicMessage.setField() to handle repeated enum values
10+
correctly.
11+
* Fixed a bug that caused NullPointerException to be thrown when
12+
converting manually constructed FileDescriptorProto to
13+
FileDescriptor.
14+
15+
Python
16+
* Fixed WhichOneof() to work with de-serialized protobuf messages.
17+
* Fixed a missing file problem of Python C++ implementation.
18+
119
2014-08-15 version 2.6.0:
220

321
General

cdk/protobuf/protobuf-2.6.0/CONTRIBUTORS.txt renamed to cdk/protobuf/protobuf-2.6.1/CONTRIBUTORS.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Patch contributors:
5050
text format.
5151
Brian Atkinson <[email protected]>
5252
* Added @Override annotation to generated Java code where appropriate.
53-
Vincent Choini�re <[email protected]>
53+
Vincent Choinière <[email protected]>
5454
* Tru64 support.
5555
Monty Taylor <[email protected]>
5656
* Solaris 10 + Sun Studio fixes.
@@ -88,3 +88,6 @@ Patch contributors:
8888
* Added CodedInputStream.getTotalBytesRead().
8989
Kacper Kowalik <[email protected]>
9090
* Fixed m4/acx_pthread.m4 problem for some Linux distributions.
91+
William Orr <[email protected]>
92+
* Fixed detection of sched_yield on Solaris.
93+
* Added atomicops for Solaris

cdk/protobuf/protobuf-2.6.0/Makefile.am renamed to cdk/protobuf/protobuf-2.6.1/Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ pkgconfig_DATA = protobuf.pc protobuf-lite.pc
3838
EXTRA_DIST = \
3939
autogen.sh \
4040
generate_descriptor_proto.sh \
41-
README.txt \
41+
README.md \
4242
INSTALL.txt \
43-
COPYING.txt \
43+
LICENSE \
4444
CONTRIBUTORS.txt \
4545
CHANGES.txt \
4646
editors/README.txt \

cdk/protobuf/protobuf-2.6.0/README.txt renamed to cdk/protobuf/protobuf-2.6.1/README.md

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,32 @@
11
Protocol Buffers - Google's data interchange format
2+
===================================================
3+
24
Copyright 2008 Google Inc.
3-
http://code.google.com/apis/protocolbuffers/
5+
6+
https://developers.google.com/protocol-buffers/
47

58
C++ Installation - Unix
6-
=======================
9+
-----------------------
10+
11+
If you get the source from github, you need to generate the configure script
12+
first:
13+
14+
$ ./autogen.sh
15+
16+
This will download gtest source (which is used for C++ Protocol Buffer
17+
unit-tests) to the current directory and run automake, autoconf, etc.
18+
to generate the configure script and various template makefiles.
19+
20+
You can skip this step if you are using a release package (which already
21+
contains gtest and the configure script).
722

823
To build and install the C++ Protocol Buffer runtime and the Protocol
924
Buffer compiler (protoc) execute the following:
1025

11-
$ ./configure
12-
$ make
13-
$ make check
14-
$ make install
26+
$ ./configure
27+
$ make
28+
$ make check
29+
$ make install
1530

1631
If "make check" fails, you can still install, but it is likely that
1732
some features of this library will not work correctly on your system.
@@ -21,7 +36,7 @@ Proceed at your own risk.
2136

2237
For advanced usage information on configure and make, see INSTALL.txt.
2338

24-
** Hint on install location **
39+
**Hint on install location**
2540

2641
By default, the package will be installed to /usr/local. However,
2742
on many platforms, /usr/local/lib is not part of LD_LIBRARY_PATH.
@@ -33,7 +48,7 @@ For advanced usage information on configure and make, see INSTALL.txt.
3348
If you already built the package with a different prefix, make sure
3449
to run "make clean" before building again.
3550

36-
** Compiling dependent packages **
51+
**Compiling dependent packages**
3752

3853
To compile a package that uses Protocol Buffers, you need to pass
3954
various flags to your compiler and linker. As of version 2.2.0,
@@ -71,7 +86,7 @@ For advanced usage information on configure and make, see INSTALL.txt.
7186
If you only want protobuf-lite, substitute "protobuf-lite" in place
7287
of "protobuf" in these examples.
7388

74-
** Note for cross-compiling **
89+
**Note for cross-compiling**
7590

7691
The makefiles normally invoke the protoc executable that they just
7792
built in order to build tests. When cross-compiling, the protoc
@@ -94,7 +109,7 @@ For advanced usage information on configure and make, see INSTALL.txt.
94109
has the same version as the protobuf source code you are trying to
95110
use it with.
96111

97-
** Note for Solaris users **
112+
**Note for Solaris users**
98113

99114
Solaris 10 x86 has a bug that will make linking fail, complaining
100115
about libstdc++.la being invalid. We have included a work-around
@@ -104,7 +119,7 @@ For advanced usage information on configure and make, see INSTALL.txt.
104119

105120
See src/solaris/libstdc++.la for more info on this bug.
106121

107-
** Note for HP C++ Tru64 users **
122+
**Note for HP C++ Tru64 users**
108123

109124
To compile invoke configure as follows:
110125

@@ -113,15 +128,15 @@ For advanced usage information on configure and make, see INSTALL.txt.
113128
Also, you will need to use gmake instead of make.
114129

115130
C++ Installation - Windows
116-
==========================
131+
--------------------------
117132

118133
If you are using Microsoft Visual C++, see vsprojects/readme.txt.
119134

120135
If you are using Cygwin or MinGW, follow the Unix installation
121136
instructions, above.
122137

123138
Binary Compatibility Warning
124-
============================
139+
----------------------------
125140

126141
Due to the nature of C++, it is unlikely that any two versions of the
127142
Protocol Buffers C++ runtime libraries will have compatible ABIs.
@@ -132,10 +147,10 @@ immediately on startup of your app. Still, you may want to consider
132147
using static linkage. You can configure this package to install
133148
static libraries only using:
134149

135-
./configure --disable-shared
150+
./configure --disable-shared
136151

137152
Java and Python Installation
138-
============================
153+
----------------------------
139154

140155
The Java and Python runtime libraries for Protocol Buffers are located
141156
in the java and python directories. See the README file in each
@@ -144,9 +159,9 @@ Note that both of them require you to first install the Protocol
144159
Buffer compiler (protoc), which is part of the C++ package.
145160

146161
Usage
147-
=====
162+
-----
148163

149164
The complete documentation for Protocol Buffers is available via the
150165
web at:
151166

152-
http://code.google.com/apis/protocolbuffers/
167+
https://developers.google.com/protocol-buffers/

cdk/protobuf/protobuf-2.6.0/configure.ac renamed to cdk/protobuf/protobuf-2.6.1/configure.ac

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ AC_PREREQ(2.59)
1212
# In the SVN trunk, the version should always be the next anticipated release
1313
# version with the "-pre" suffix. (We used to use "-SNAPSHOT" but this pushed
1414
# the size of one file name in the dist tarfile over the 99-char limit.)
15-
AC_INIT([Protocol Buffers],[2.6.0],[[email protected]],[protobuf])
15+
AC_INIT([Protocol Buffers],[2.6.1],[[email protected]],[protobuf])
1616

1717
AM_MAINTAINER_MODE([enable])
1818

@@ -139,6 +139,15 @@ AM_CONDITIONAL([USE_EXTERNAL_PROTOC], [test "$with_protoc" != "no"])
139139
ACX_PTHREAD
140140
AC_CXX_STL_HASH
141141

142+
case "$target_os" in
143+
mingw* | cygwin* | win*)
144+
;;
145+
*)
146+
# Need to link against rt on Solaris
147+
AC_SEARCH_LIBS([sched_yield], [rt], [], [AC_MSG_FAILURE([sched_yield was not found on your system])])
148+
;;
149+
esac
150+
142151
# HACK: Make gtest's configure script pick up our copy of CFLAGS and CXXFLAGS,
143152
# since the flags added by ACX_CHECK_SUNCC must be used when compiling gtest
144153
# too.

cdk/protobuf/protobuf-2.6.0/editors/proto.vim renamed to cdk/protobuf/protobuf-2.6.1/editors/proto.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
" Protocol Buffers - Google's data interchange format
22
" Copyright 2008 Google Inc. All rights reserved.
3-
" http://code.google.com/p/protobuf/
3+
" https://developers.google.com/protocol-buffers/
44
"
55
" Redistribution and use in source and binary forms, with or without
66
" modification, are permitted provided that the following conditions are

cdk/protobuf/protobuf-2.6.0/examples/README.txt renamed to cdk/protobuf/protobuf-2.6.1/examples/README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ All of these programs simply take an address book file as their parameter.
2222
The add_person programs will create the file if it doesn't already exist.
2323

2424
These examples are part of the Protocol Buffers tutorial, located at:
25-
http://code.google.com/apis/protocolbuffers/docs/tutorials.html
25+
https://developers.google.com/protocol-buffers/docs/tutorials
2626

2727
* Note that on some platforms you may have to edit the Makefile and remove
2828
"-lpthread" from the linker commands (perhaps replacing it with something else).

cdk/protobuf/protobuf-2.6.0/examples/list_people.cc renamed to cdk/protobuf/protobuf-2.6.1/examples/list_people.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include <fstream>
55
#include <string>
66
#include "addressbook.pb.h"
7-
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
87
using namespace std;
98

109
// Iterates though all people in the AddressBook and prints info about them.

cdk/protobuf/protobuf-2.6.0/src/Makefile.am renamed to cdk/protobuf/protobuf-2.6.1/src/Makefile.am

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,15 @@ MAINTAINERCLEANFILES = \
3939

4040
nobase_include_HEADERS = \
4141
google/protobuf/stubs/atomicops.h \
42-
google/protobuf/stubs/atomicops_internals_arm_gcc.h \
4342
google/protobuf/stubs/atomicops_internals_arm64_gcc.h \
43+
google/protobuf/stubs/atomicops_internals_arm_gcc.h \
4444
google/protobuf/stubs/atomicops_internals_arm_qnx.h \
4545
google/protobuf/stubs/atomicops_internals_atomicword_compat.h \
4646
google/protobuf/stubs/atomicops_internals_generic_gcc.h \
4747
google/protobuf/stubs/atomicops_internals_macosx.h \
4848
google/protobuf/stubs/atomicops_internals_mips_gcc.h \
4949
google/protobuf/stubs/atomicops_internals_pnacl.h \
50+
google/protobuf/stubs/atomicops_internals_solaris.h \
5051
google/protobuf/stubs/atomicops_internals_tsan.h \
5152
google/protobuf/stubs/atomicops_internals_x86_gcc.h \
5253
google/protobuf/stubs/atomicops_internals_x86_msvc.h \
@@ -95,7 +96,7 @@ nobase_include_HEADERS = \
9596
lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la
9697

9798
libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS)
98-
libprotobuf_lite_la_LDFLAGS = -version-info 9:0:0 -export-dynamic -no-undefined
99+
libprotobuf_lite_la_LDFLAGS = -version-info 9:1:0 -export-dynamic -no-undefined
99100
libprotobuf_lite_la_SOURCES = \
100101
google/protobuf/stubs/atomicops_internals_x86_gcc.cc \
101102
google/protobuf/stubs/atomicops_internals_x86_msvc.cc \
@@ -117,7 +118,7 @@ libprotobuf_lite_la_SOURCES = \
117118
google/protobuf/io/zero_copy_stream_impl_lite.cc
118119

119120
libprotobuf_la_LIBADD = $(PTHREAD_LIBS)
120-
libprotobuf_la_LDFLAGS = -version-info 9:0:0 -export-dynamic -no-undefined
121+
libprotobuf_la_LDFLAGS = -version-info 9:1:0 -export-dynamic -no-undefined
121122
libprotobuf_la_SOURCES = \
122123
$(libprotobuf_lite_la_SOURCES) \
123124
google/protobuf/stubs/strutil.cc \
@@ -146,7 +147,7 @@ libprotobuf_la_SOURCES = \
146147
google/protobuf/compiler/parser.cc
147148

148149
libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la
149-
libprotoc_la_LDFLAGS = -version-info 9:0:0 -export-dynamic -no-undefined
150+
libprotoc_la_LDFLAGS = -version-info 9:1:0 -export-dynamic -no-undefined
150151
libprotoc_la_SOURCES = \
151152
google/protobuf/compiler/code_generator.cc \
152153
google/protobuf/compiler/command_line_interface.cc \

0 commit comments

Comments
 (0)