Changeset - 5dba4612b5f7
[Not reviewed]
0 4 0
Florian Kinder - 7 years ago 2018-12-01 11:38:15
florian.kinder@fankserver.com
Syntax fixes
4 files changed with 14 insertions and 6 deletions:
0 comments (0 inline, 0 general)
Dockerfile
Show inline comments
 
@@ -3,13 +3,13 @@ FROM frolvlad/alpine-glibc:alpine-3.6
 
EXPOSE 5222 5269
 
VOLUME ["/etc/spectrum2/transports", "/var/lib/spectrum2"]
 

	
 
ADD . /usr/src/spectrum2
 

	
 
RUN apk add --no-cache ca-certificates && \
 
    apk add --no-cache --virtual .build-deps cmake make gcc g++ musl-dev boost-dev glib-dev protobuf-dev mariadb-dev sqlite-dev postgresql-dev pidgin-dev libev-dev qt-dev apr-util-dev automake autoconf libtool git popt-dev curl-dev openssl && \
 
    apk add --no-cache --virtual .build-deps cmake make gcc g++ musl-dev boost-dev glib-dev protobuf-dev mariadb-dev sqlite-dev postgresql-dev pidgin-dev libev-dev qt-dev apr-util-dev automake autoconf libtool git popt-dev curl-dev openssl libevent-dev && \
 
    cd /usr/src/ && \
 

	
 
    wget https://github.com/communi/libcommuni/archive/v3.5.0.tar.gz -O libcommuni-3.5.0.tar.gz && \
 
    tar xfz libcommuni-*.tar.gz && \
 
    cd libcommuni-* && \
 
    ./configure && \
 
@@ -26,18 +26,22 @@ RUN apk add --no-cache ca-certificates && \
 
    cd .. && rm -rf logging-log4cxx && \
 

	
 
    wget http://pqxx.org/download/software/libpqxx/libpqxx-4.0.1.tar.gz && \
 
    tar xfz libpqxx-*.tar.gz && \
 
    cd libpqxx-* && \
 
    ./autogen.sh && \
 
    ./configure --disable-documentation && \
 
    ./configure --enable-shared --disable-documentation && \
 
    make && \
 
    make install && \
 
    cd .. && rm -rf libpqxx-* && \
 

	
 
    wget https://swift.im/downloads/releases/swift-4.0rc2/swift-4.0rc2.tar.gz && \
 
    tar xfz swift-*.tar.gz && \
 
    cd swift-* && \
 
    ./scons SWIFT_INSTALLDIR=/usr/local /usr/local && \
 
    ./scons Swiften SWIFTEN_INSTALLDIR=/usr/local /usr/local && \
 
    cd .. && rm -rf swift-* && \
 

	
 
    cd spectrum2 && \
 
    cmake . && \
 
    make && \
 

	
 
    apk del .build-deps
backends/libpurple/main.cpp
Show inline comments
 
@@ -479,13 +479,13 @@ class SpectrumNetworkPlugin : public NetworkPlugin {
 
				purple_account_set_enabled_wrapped(account, "spectrum", FALSE);
 

	
 
				m_accounts.erase(account);
 

	
 
				purple_accounts_delete_wrapped(account);
 
#ifndef WIN32
 
#if !defined(__FreeBSD__) && !defined(__APPLE__)
 
#if !defined(__FreeBSD__) && !defined(__APPLE__) && defined (__GLIBC__)
 
				malloc_trim(0);
 
#endif
 
#endif
 
// 				VALGRIND_DO_LEAK_CHECK;
 
			}
 
		}
 
@@ -2108,13 +2108,13 @@ static PurpleCoreUiOps coreUiOps =
 
};
 

	
 
static void signed_on(PurpleConnection *gc, gpointer unused) {
 
	PurpleAccount *account = purple_connection_get_account_wrapped(gc);
 
	np->handleConnected(np->m_accounts[account]);
 
#ifndef WIN32
 
#if !defined(__FreeBSD__) && !defined(__APPLE__)
 
#if !defined(__FreeBSD__) && !defined(__APPLE__) && defined (__GLIBC__)
 
	// force returning of memory chunks allocated by libxml2 to kernel
 
	malloc_trim(0);
 
#endif
 
#endif
 
	purple_roomlist_get_list_wrapped(gc);
 

	
 
@@ -2332,13 +2332,13 @@ static void transportDataReceived(gpointer data, gint source, PurpleInputConditi
 
}
 

	
 
int main(int argc, char **argv) {
 
	boost::locale::generator gen;
 
	std::locale::global(gen(""));
 
#ifndef WIN32
 
#if !defined(__FreeBSD__) && !defined(__APPLE__)
 
#if !defined(__FreeBSD__) && !defined(__APPLE__) && defined (__GLIBC__)
 
		mallopt(M_CHECK_ACTION, 2);
 
		mallopt(M_PERTURB, 0xb);
 
#endif
 

	
 
		signal(SIGPIPE, SIG_IGN);
 

	
backends/swiften/main.cpp
Show inline comments
 
@@ -224,16 +224,18 @@ class SwiftenPlugin : public NetworkPlugin, Swift::XMPPParserClient {
 
				m_handlers.erase(user);
 
			}
 

	
 
#ifndef WIN32
 
#ifndef __FreeBSD__
 
#ifndef __MACH__
 
#if defined (__GLIBC__)
 
			// force returning of memory chunks allocated by libxml2 to kernel
 
			malloc_trim(0);
 
#endif
 
#endif
 
#endif
 
#endif
 
		}
 

	
 
		void handleSwiftConnected(const std::string &user) {
 
			LOG4CXX_INFO(logger, user << ": Connected to XMPP server.");
 
			handleConnected(user);
spectrum/src/main.cpp
Show inline comments
 
@@ -317,17 +317,19 @@ int main(int argc, char **argv)
 
	std::string exe_file(szFilePath);
 
#endif
 
	setlocale(LC_ALL, "");
 
#ifndef WIN32
 
#ifndef __FreeBSD__
 
#ifndef __MACH__
 
#if defined (__GLIBC__)
 
	mallopt(M_CHECK_ACTION, 2);
 
	mallopt(M_PERTURB, 0xb);
 
#endif
 
#endif
 
#endif
 
#endif
 

	
 
#ifndef WIN32
 
	if (signal(SIGINT, spectrum_sigint_handler) == SIG_ERR) {
 
		std::cout << "SIGINT handler can't be set\n";
 
		return -1;
 
	}
0 comments (0 inline, 0 general)