add travis integration to hermes
fix also some problems with openssl building
This commit is contained in:
parent
ad0a63e275
commit
b627f7dcd0
30
.travis.yml
Normal file
30
.travis.yml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
language: c++
|
||||||
|
jobs:
|
||||||
|
include:
|
||||||
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
|
dist: bionic
|
||||||
|
- compiler: clang
|
||||||
|
os: linux
|
||||||
|
dist: bionic
|
||||||
|
- compiler: gcc
|
||||||
|
os: linux
|
||||||
|
dist: xenial
|
||||||
|
- compiler: clang
|
||||||
|
os: linux
|
||||||
|
dist: xenial
|
||||||
|
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- libspf2-dev
|
||||||
|
homebrew:
|
||||||
|
packages:
|
||||||
|
- gettext
|
||||||
|
- openssl
|
||||||
|
|
||||||
|
script:
|
||||||
|
- ./bootstrap
|
||||||
|
- ./configure
|
||||||
|
- make install prefix=$PWD/install-dir
|
||||||
|
- find $PWD/install-dir
|
|
@ -1,6 +1,6 @@
|
||||||
INCLUDES = $(OpenSSL_CFLAGS) $(SQLite3_CFLAGS)
|
INCLUDES = $(OpenSSL_CFLAGS) $(SQLite3_CFLAGS)
|
||||||
LIBS = $(OpenSSL_LIBS) $(SQLite3_LIBS)
|
LIBS = $(OpenSSL_LIBS) $(SQLite3_LIBS)
|
||||||
CXXFLAGS += -Wall -ansi -pedantic -Wshadow -pthread -Werror --std=c++11
|
CXXFLAGS += -Wall -pedantic -Wshadow -pthread -Werror --std=c++11
|
||||||
|
|
||||||
bin_PROGRAMS = hermes
|
bin_PROGRAMS = hermes
|
||||||
nodist_hermes_SOURCES = Configfile.cpp
|
nodist_hermes_SOURCES = Configfile.cpp
|
||||||
|
|
|
@ -64,13 +64,13 @@ __thread unsigned long connection_id;
|
||||||
|
|
||||||
list<unsigned long> children;
|
list<unsigned long> children;
|
||||||
|
|
||||||
#ifdef HAVE_SSL
|
#if defined(HAVE_SSL) && OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||||
pthread_mutex_t ssl_locks[CRYPTO_num_locks()]={PTHREAD_MUTEX_INITIALIZER};
|
pthread_mutex_t ssl_locks[CRYPTO_NUM_LOCKS]={PTHREAD_MUTEX_INITIALIZER};
|
||||||
|
|
||||||
void ssl_locking_function(int mode,int n,const char *file,int line)
|
void ssl_locking_function(int mode,int n,const char *file,int line)
|
||||||
{
|
{
|
||||||
if(n>CRYPTO_num_locks())
|
if(n>CRYPTO_NUM_LOCKS)
|
||||||
throw Exception(_("Error, "+Utils::inttostr(n)+" is bigger than CRYPTO_num_locks()("+Utils::inttostr(CRYPTO_num_locks())+")"),__FILE__,__LINE__);
|
throw Exception(_("Error, "+Utils::inttostr(n)+" is bigger than CRYPTO_NUM_LOCKS()("+Utils::inttostr(CRYPTO_NUM_LOCKS)+")"),__FILE__,__LINE__);
|
||||||
if(mode&CRYPTO_LOCK)
|
if(mode&CRYPTO_LOCK)
|
||||||
pthread_mutex_lock(&ssl_locks[n]);
|
pthread_mutex_lock(&ssl_locks[n]);
|
||||||
else
|
else
|
||||||
|
@ -95,7 +95,7 @@ main
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_SSL
|
#if defined(HAVE_SSL) && OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||||
CRYPTO_set_locking_callback(ssl_locking_function);
|
CRYPTO_set_locking_callback(ssl_locking_function);
|
||||||
#ifndef WIN32 //getpid() returns different values for threads on windows, therefor this is not needed
|
#ifndef WIN32 //getpid() returns different values for threads on windows, therefor this is not needed
|
||||||
CRYPTO_set_id_callback(pthread_self);
|
CRYPTO_set_id_callback(pthread_self);
|
||||||
|
|
Loading…
Reference in a new issue