Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
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
brpc
Commits
36fc4e5f
Commit
36fc4e5f
authored
Aug 20, 2017
by
gejun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issues on ubuntu
Change-Id: If093feda75832e30403599b34c86a47b010ab477
parent
50625b48
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
18 additions
and
22 deletions
+18
-22
Makefile
Makefile
+2
-2
ssl_compat.h
base/ssl_compat.h
+6
-4
Makefile
example/echo_c++/Makefile
+1
-2
Makefile
example/http_c++/Makefile
+2
-4
http_server.cpp
example/http_c++/http_server.cpp
+1
-1
Makefile
example/memcache_c++/Makefile
+1
-2
Makefile
example/multi_threaded_echo_c++/Makefile
+2
-4
Makefile
example/redis_c++/Makefile
+1
-2
Makefile
test/Makefile
+2
-1
No files found.
Makefile
View file @
36fc4e5f
...
...
@@ -13,8 +13,8 @@ LIBPATHS = $(addprefix -L, $(LIBS))
SRCEXTS
=
.c .cc .cpp .proto
HDREXTS
=
.h .hpp
ifeq
($(shell
test
$(shell
$(CXX)
-dumpversion)
-ge
7;
echo
$$?),0)
CXXFLAGS
+=
-Wno-aligned-new
ifeq
($(shell
test
$(shell
$(CXX)
-dumpversion
|
sed
-e
's/\..*$$//g'
)
-ge
7;
echo
$$?),0)
CXXFLAGS
+=
-Wno-aligned-new
endif
BASE_SOURCES
=
\
...
...
base/ssl_compat.h
View file @
36fc4e5f
...
...
@@ -303,7 +303,7 @@ BRPC_INLINE unsigned char *EVP_CIPHER_CTX_iv_noconst(EVP_CIPHER_CTX *ctx) {
}
BRPC_INLINE
EVP_MD_CTX
*
EVP_MD_CTX_new
(
void
)
{
return
OPENSSL_zalloc
(
sizeof
(
EVP_MD_CTX
));
return
(
EVP_MD_CTX
*
)
OPENSSL_zalloc
(
sizeof
(
EVP_MD_CTX
));
}
BRPC_INLINE
void
EVP_MD_CTX_free
(
EVP_MD_CTX
*
ctx
)
{
...
...
@@ -314,7 +314,7 @@ BRPC_INLINE void EVP_MD_CTX_free(EVP_MD_CTX *ctx) {
BRPC_INLINE
RSA_METHOD
*
RSA_meth_dup
(
const
RSA_METHOD
*
meth
)
{
RSA_METHOD
*
ret
;
ret
=
OPENSSL_malloc
(
sizeof
(
RSA_METHOD
));
ret
=
(
RSA_METHOD
*
)
OPENSSL_malloc
(
sizeof
(
RSA_METHOD
));
if
(
ret
!=
NULL
)
{
memcpy
(
ret
,
meth
,
sizeof
(
*
meth
));
...
...
@@ -381,9 +381,10 @@ BRPC_INLINE RSA *EVP_PKEY_get0_RSA(EVP_PKEY *pkey) {
return
pkey
->
pkey
.
rsa
;
}
/* following 2 functions don't compile in openssl 1.0.1f*/
/*
BRPC_INLINE HMAC_CTX *HMAC_CTX_new(void) {
HMAC_CTX
*
ctx
=
OPENSSL_malloc
(
sizeof
(
*
ctx
));
HMAC_CTX *ctx =
(HMAC_CTX*)
OPENSSL_malloc(sizeof(*ctx));
if (ctx != NULL) {
if (!HMAC_CTX_reset(ctx)) {
HMAC_CTX_free(ctx);
...
...
@@ -402,6 +403,7 @@ BRPC_INLINE void HMAC_CTX_free(HMAC_CTX *ctx) {
OPENSSL_free(ctx);
}
}
*/
#endif
/* OPENSSL_VERSION_NUMBER < 0x10100000L */
...
...
example/echo_c++/Makefile
View file @
36fc4e5f
BRPC_PATH
=
../../
include
$(BRPC_PATH)/config.mk
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-fno-omit-frame-pointer
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
CXXFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-D__const__
=
-pipe
-W
-Wall
-Werror
-fPIC
-fno-omit-frame-pointer
HDRPATHS
=
-I
$(BRPC_PATH)
/output/include
$
(
addprefix
-I
,
$(HDRS)
)
LIBPATHS
=
-L
$(BRPC_PATH)
/output/lib
$
(
addprefix
-L
,
$(LIBS)
)
STATIC_LINKINGS
+=
-lbase
-lbvar
-lbthread
-lbrpc
-ljson2pb
-lmcpack2pb
...
...
example/http_c++/Makefile
View file @
36fc4e5f
NEED_GPERFTOOLS
=
1
BRPC_PATH
=
../../
include
$(BRPC_PATH)/config.mk
C
PPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-fno-omit-frame-pointer
-D__const__
=
C
XXFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-D__const__
=
-pipe
-W
-Wall
-Werror
-fPIC
-fno-omit-frame-pointer
ifeq
($(NEED_GPERFTOOLS),
1)
C
PP
FLAGS
+=
-DBRPC_ENABLE_CPU_PROFILER
-DBRPC_ENABLE_HEAP_PROFILER
C
XX
FLAGS
+=
-DBRPC_ENABLE_CPU_PROFILER
-DBRPC_ENABLE_HEAP_PROFILER
endif
CXXFLAGS
=
$(CPPFLAGS)
CFLAGS
=
$(CPPFLAGS)
HDRPATHS
=
-I
$(BRPC_PATH)
/output/include
$
(
addprefix
-I
,
$(HDRS)
)
LIBPATHS
=
-L
$(BRPC_PATH)
/output/lib
$
(
addprefix
-L
,
$(LIBS)
)
STATIC_LINKINGS
+=
-lbase
-lbvar
-lbthread
-lbrpc
-ljson2pb
-lmcpack2pb
...
...
example/http_c++/http_server.cpp
View file @
36fc4e5f
...
...
@@ -53,7 +53,7 @@ public:
os
.
move_to
(
cntl
->
response_attachment
());
}
void
EchoProtobuf
(
google
::
protobuf
::
RpcController
*
cntl_base
,
void
EchoProtobuf
(
google
::
protobuf
::
RpcController
*
,
const
HttpRequest
*
request
,
HttpResponse
*
response
,
google
::
protobuf
::
Closure
*
done
)
{
...
...
example/memcache_c++/Makefile
View file @
36fc4e5f
BRPC_PATH
=
../../
include
$(BRPC_PATH)/config.mk
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-fno-omit-frame-pointer
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
CXXFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-D__const__
=
-pipe
-W
-Wall
-Werror
-fPIC
-fno-omit-frame-pointer
HDRPATHS
=
-I
$(BRPC_PATH)
/output/include
$
(
addprefix
-I
,
$(HDRS)
)
LIBPATHS
=
-L
$(BRPC_PATH)
/output/lib
$
(
addprefix
-L
,
$(LIBS)
)
STATIC_LINKINGS
+=
-lbase
-lbvar
-lbthread
-lbrpc
-ljson2pb
-lmcpack2pb
...
...
example/multi_threaded_echo_c++/Makefile
View file @
36fc4e5f
NEED_GPERFTOOLS
=
1
BRPC_PATH
=
../..
include
$(BRPC_PATH)/config.mk
C
PPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-fno-omit-frame-pointer
-D__const__
=
C
XXFLAGS
=
-std
=
c++0x
-DNDEBUG
-O2
-D__const__
=
-pipe
-W
-Wall
-Werror
-fPIC
-fno-omit-frame-pointer
ifeq
($(NEED_GPERFTOOLS),
1)
C
PP
FLAGS
+=
-DBRPC_ENABLE_CPU_PROFILER
-DBRPC_ENABLE_HEAP_PROFILER
C
XX
FLAGS
+=
-DBRPC_ENABLE_CPU_PROFILER
-DBRPC_ENABLE_HEAP_PROFILER
endif
CXXFLAGS
=
$(CPPFLAGS)
CFLAGS
=
$(CPPFLAGS)
HDRPATHS
=
-I
$(BRPC_PATH)
/output/include
$
(
addprefix
-I
,
$(HDRS)
)
LIBPATHS
=
-L
$(BRPC_PATH)
/output/lib
$
(
addprefix
-L
,
$(LIBS)
)
STATIC_LINKINGS
+=
-lbase
-lbvar
-lbthread
-lbrpc
-ljson2pb
-lmcpack2pb
...
...
example/redis_c++/Makefile
View file @
36fc4e5f
BRPC_PATH
=
../../
include
$(BRPC_PATH)/config.mk
CPPFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-pipe
-W
-Wall
-Werror
-fPIC
-Wno-deprecated
-Wno-unused-parameter
-fno-omit-frame-pointer
-D__const__
=
CXXFLAGS
=
$(CPPFLAGS)
CXXFLAGS
=
-std
=
c++0x
-g
-DNDEBUG
-O2
-D__const__
=
-pipe
-W
-Wall
-Werror
-fPIC
-fno-omit-frame-pointer
HDRPATHS
=
-I
$(BRPC_PATH)
/output/include
$
(
addprefix
-I
,
$(HDRS)
)
LIBPATHS
=
-L
$(BRPC_PATH)
/output/lib
$
(
addprefix
-L
,
$(LIBS)
)
DYNAMIC_LINKINGS
+=
-lreadline
-lncurses
...
...
test/Makefile
View file @
36fc4e5f
...
...
@@ -6,7 +6,8 @@ CPPFLAGS=-DBTHREAD_USE_FAST_PTHREAD_MUTEX -D__const__= -D_GNU_SOURCE -DUSE_SYMBO
CPPFLAGS
+=
-DUNIT_TEST
-Dprivate
=
public
-Dprotected
=
public
-DBVAR_NOT_LINK_DEFAULT_VARIABLES
CXXFLAGS
=
$(CPPFLAGS)
-g
-pipe
-Wall
-W
-fPIC
-fstrict-aliasing
-Wno-invalid-offsetof
-Wno-unused-parameter
-fno-omit-frame-pointer
-std
=
c++0x
CFLAGS
=
$(CPPFLAGS)
-g
-pipe
-Wall
-W
-fPIC
-fstrict-aliasing
-Wno-unused-parameter
-fno-omit-frame-pointer
ifeq
($(shell
test
$(shell
$(CXX)
-dumpversion)
-ge
7;
echo
$$?),0)
ifeq
($(shell
test
$(shell
$(CXX)
-dumpversion
|
sed
-e
's/\..*$$//g'
)
-ge
7;
echo
$$?),0)
CXXFLAGS
+=
-Wno-aligned-new
endif
...
...
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