summaryrefslogtreecommitdiffstats
path: root/src/lib/arch/unix
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2021-11-10 00:54:13 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2021-11-10 00:54:13 -0500
commitbeb08eb751fa8e1f72042f263316ab5e5ddb596d (patch)
tree3b00df983527648bdae610ac7b88cb639b1f1828 /src/lib/arch/unix
parentfbc30002ab3438356c0476e70c4577a0310d52c0 (diff)
New upstream version 2.4.0+dfsg.upstream/2.4.0+dfsgupstream
Diffstat (limited to 'src/lib/arch/unix')
-rw-r--r--src/lib/arch/unix/ArchConsoleUnix.cpp4
-rw-r--r--src/lib/arch/unix/ArchConsoleUnix.h4
-rw-r--r--src/lib/arch/unix/ArchDaemonUnix.cpp20
-rw-r--r--src/lib/arch/unix/ArchDaemonUnix.h4
-rw-r--r--src/lib/arch/unix/ArchInternetUnix.cpp8
-rw-r--r--src/lib/arch/unix/ArchLogUnix.cpp4
-rw-r--r--src/lib/arch/unix/ArchLogUnix.h4
-rw-r--r--src/lib/arch/unix/ArchMultithreadPosix.cpp35
-rw-r--r--src/lib/arch/unix/ArchMultithreadPosix.h7
-rw-r--r--src/lib/arch/unix/ArchNetworkBSD.cpp4
-rw-r--r--src/lib/arch/unix/ArchNetworkBSD.h4
-rw-r--r--src/lib/arch/unix/ArchSleepUnix.cpp4
-rw-r--r--src/lib/arch/unix/ArchSleepUnix.h4
-rw-r--r--src/lib/arch/unix/ArchStringUnix.cpp5
-rw-r--r--src/lib/arch/unix/ArchStringUnix.h4
-rw-r--r--src/lib/arch/unix/ArchSystemUnix.cpp4
-rw-r--r--src/lib/arch/unix/ArchSystemUnix.h4
-rw-r--r--src/lib/arch/unix/ArchTaskBarXWindows.cpp4
-rw-r--r--src/lib/arch/unix/ArchTaskBarXWindows.h4
-rw-r--r--src/lib/arch/unix/ArchTimeUnix.cpp4
-rw-r--r--src/lib/arch/unix/ArchTimeUnix.h4
-rw-r--r--src/lib/arch/unix/XArchUnix.cpp4
-rw-r--r--src/lib/arch/unix/XArchUnix.h4
23 files changed, 63 insertions, 84 deletions
diff --git a/src/lib/arch/unix/ArchConsoleUnix.cpp b/src/lib/arch/unix/ArchConsoleUnix.cpp
index 79a4634..d5e8e1d 100644
--- a/src/lib/arch/unix/ArchConsoleUnix.cpp
+++ b/src/lib/arch/unix/ArchConsoleUnix.cpp
@@ -2,11 +2,11 @@
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
diff --git a/src/lib/arch/unix/ArchConsoleUnix.h b/src/lib/arch/unix/ArchConsoleUnix.h
index 8326ab5..136c606 100644
--- a/src/lib/arch/unix/ArchConsoleUnix.h
+++ b/src/lib/arch/unix/ArchConsoleUnix.h
@@ -2,11 +2,11 @@
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
diff --git a/src/lib/arch/unix/ArchDaemonUnix.cpp b/src/lib/arch/unix/ArchDaemonUnix.cpp
index a03bf7a..f1ac1d5 100644
--- a/src/lib/arch/unix/ArchDaemonUnix.cpp
+++ b/src/lib/arch/unix/ArchDaemonUnix.cpp
@@ -2,11 +2,11 @@
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -53,15 +53,15 @@ execSelfNonDaemonized()
{
extern char** NXArgv;
char** selfArgv = NXArgv;
-
+
setenv("_BARRIER_DAEMONIZED", "", 1);
-
+
execvp(selfArgv[0], selfArgv);
return 0;
}
bool alreadyDaemonized() {
- return getenv("_BARRIER_DAEMONIZED") != NULL;
+ return std::getenv("_BARRIER_DAEMONIZED") != NULL;
}
#endif
@@ -73,7 +73,7 @@ ArchDaemonUnix::daemonize(const char* name, DaemonFunc func)
if (alreadyDaemonized())
return func(1, &name);
#endif
-
+
// fork so shell thinks we're done and so we're not a process
// group leader
switch (fork()) {
@@ -92,7 +92,7 @@ ArchDaemonUnix::daemonize(const char* name, DaemonFunc func)
// become leader of a new session
setsid();
-
+
#ifndef __APPLE__
// NB: don't run chdir on apple; causes strange behaviour.
// chdir to root so we don't keep mounted filesystems points busy
@@ -115,18 +115,18 @@ ArchDaemonUnix::daemonize(const char* name, DaemonFunc func)
// of standard I/O safely goes in the bit bucket.
open("/dev/null", O_RDONLY);
open("/dev/null", O_RDWR);
-
+
int dupErr = dup(1);
if (dupErr < 0) {
// NB: file logging actually isn't working at this point!
LOG((CLOG_ERR "dup error: %i", dupErr));
}
-
+
#ifdef __APPLE__
return execSelfNonDaemonized();
#endif
-
+
// invoke function
return func(1, &name);
}
diff --git a/src/lib/arch/unix/ArchDaemonUnix.h b/src/lib/arch/unix/ArchDaemonUnix.h
index 530159a..52a531e 100644
--- a/src/lib/arch/unix/ArchDaemonUnix.h
+++ b/src/lib/arch/unix/ArchDaemonUnix.h
@@ -2,11 +2,11 @@
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
diff --git a/src/lib/arch/unix/ArchInternetUnix.cpp b/src/lib/arch/unix/ArchInternetUnix.cpp
index 76966dc..dcea2ae 100644
--- a/src/lib/arch/unix/ArchInternetUnix.cpp
+++ b/src/lib/arch/unix/ArchInternetUnix.cpp
@@ -94,16 +94,16 @@ std::string CurlFacade::get(const std::string& url)
userAgent << "Barrier ";
userAgent << kVersion;
curl_easy_setopt(m_curl, CURLOPT_USERAGENT, userAgent.str().c_str());
-
+
std::string result;
curl_easy_setopt(m_curl, CURLOPT_WRITEDATA, &result);
-
+
CURLcode code = curl_easy_perform(m_curl);
if (code != CURLE_OK) {
LOG((CLOG_ERR "curl perform error: %s", curl_easy_strerror(code)));
throw XArch("CURL perform failed.");
}
-
+
return result;
}
@@ -114,7 +114,7 @@ std::string CurlFacade::urlEncode(const std::string& url)
if (resultCStr == NULL) {
throw XArch("CURL escape failed.");
}
-
+
std::string result(resultCStr);
curl_free(resultCStr);
diff --git a/src/lib/arch/unix/ArchLogUnix.cpp b/src/lib/arch/unix/ArchLogUnix.cpp
index b1f9089..2389f48 100644
--- a/src/lib/arch/unix/ArchLogUnix.cpp
+++ b/src/lib/arch/unix/ArchLogUnix.cpp
@@ -2,11 +2,11 @@
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
diff --git a/src/lib/arch/unix/ArchLogUnix.h b/src/lib/arch/unix/ArchLogUnix.h
index cdd733f..f37bab8 100644
--- a/src/lib/arch/unix/ArchLogUnix.h
+++ b/src/lib/arch/unix/ArchLogUnix.h
@@ -2,11 +2,11 @@
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
diff --git a/src/lib/arch/unix/ArchMultithreadPosix.cpp b/src/lib/arch/unix/ArchMultithreadPosix.cpp
index 4866edc..8400f9d 100644
--- a/src/lib/arch/unix/ArchMultithreadPosix.cpp
+++ b/src/lib/arch/unix/ArchMultithreadPosix.cpp
@@ -2,11 +2,11 @@
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -59,24 +59,19 @@ public:
int m_refCount;
IArchMultithread::ThreadID m_id;
pthread_t m_thread;
- IArchMultithread::ThreadFunc m_func;
- void* m_userData;
+ std::function<void()> func_;;
bool m_cancel;
bool m_cancelling;
bool m_exited;
- void* m_result;
void* m_networkData;
};
ArchThreadImpl::ArchThreadImpl() :
m_refCount(1),
m_id(0),
- m_func(NULL),
- m_userData(NULL),
m_cancel(false),
m_cancelling(false),
m_exited(false),
- m_result(NULL),
m_networkData(NULL)
{
// do nothing
@@ -319,11 +314,8 @@ ArchMultithreadPosix::unlockMutex(ArchMutex mutex)
}
}
-ArchThread
-ArchMultithreadPosix::newThread(ThreadFunc func, void* data)
+ArchThread ArchMultithreadPosix::newThread(const std::function<void()>& func)
{
- assert(func != NULL);
-
// initialize signal handler. we do this here instead of the
// constructor so we can avoid daemonizing (using fork())
// when there are multiple threads. clients can safely
@@ -341,8 +333,7 @@ ArchMultithreadPosix::newThread(ThreadFunc func, void* data)
// create thread impl for new thread
ArchThreadImpl* thread = new ArchThreadImpl;
- thread->m_func = func;
- thread->m_userData = data;
+ thread->func_ = func;
// create the thread. pthread_create() on RedHat 7.2 smp fails
// if passed a NULL attr so use a default attr.
@@ -389,7 +380,7 @@ ArchMultithreadPosix::closeThread(ArchThread thread)
// decrement ref count and clean up thread if no more references
if (--thread->m_refCount == 0) {
// detach from thread (unless it's the main thread)
- if (thread->m_func != NULL) {
+ if (thread->func_) {
pthread_detach(thread->m_thread);
}
@@ -526,13 +517,6 @@ ArchMultithreadPosix::isExitedThread(ArchThread thread)
return thread->m_exited;
}
-void*
-ArchMultithreadPosix::getResultOfThread(ArchThread thread)
-{
- std::lock_guard<std::mutex> lock(m_threadMutex);
- return thread->m_result;
-}
-
IArchMultithread::ThreadID
ArchMultithreadPosix::getIDOfThread(ArchThread thread)
{
@@ -549,7 +533,7 @@ ArchMultithreadPosix::setSignalHandler(
}
void
-ArchMultithreadPosix::raiseSignal(ESignal signal)
+ArchMultithreadPosix::raiseSignal(ESignal signal)
{
std::lock_guard<std::mutex> lock(m_threadMutex);
if (m_signalFunc[signal] != NULL) {
@@ -699,10 +683,8 @@ ArchMultithreadPosix::doThreadFunc(ArchThread thread)
std::lock_guard<std::mutex> lock(m_threadMutex);
}
- void* result = NULL;
try {
- // go
- result = (*thread->m_func)(thread->m_userData);
+ thread->func_();
}
catch (XThreadCancel&) {
@@ -721,7 +703,6 @@ ArchMultithreadPosix::doThreadFunc(ArchThread thread)
// thread has exited
{
std::lock_guard<std::mutex> lock(m_threadMutex);
- thread->m_result = result;
thread->m_exited = true;
}
diff --git a/src/lib/arch/unix/ArchMultithreadPosix.h b/src/lib/arch/unix/ArchMultithreadPosix.h
index 4bd879f..798147a 100644
--- a/src/lib/arch/unix/ArchMultithreadPosix.h
+++ b/src/lib/arch/unix/ArchMultithreadPosix.h
@@ -2,11 +2,11 @@
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -67,7 +67,7 @@ public:
virtual void closeMutex(ArchMutex);
virtual void lockMutex(ArchMutex);
virtual void unlockMutex(ArchMutex);
- virtual ArchThread newThread(ThreadFunc, void*);
+ virtual ArchThread newThread(const std::function<void()>& func);
virtual ArchThread newCurrentThread();
virtual ArchThread copyThread(ArchThread);
virtual void closeThread(ArchThread);
@@ -77,7 +77,6 @@ public:
virtual bool wait(ArchThread, double timeout);
virtual bool isSameThread(ArchThread, ArchThread);
virtual bool isExitedThread(ArchThread);
- virtual void* getResultOfThread(ArchThread);
virtual ThreadID getIDOfThread(ArchThread);
virtual void setSignalHandler(ESignal, SignalFunc, void*);
virtual void raiseSignal(ESignal);
diff --git a/src/lib/arch/unix/ArchNetworkBSD.cpp b/src/lib/arch/unix/ArchNetworkBSD.cpp
index 496c988..5507bfe 100644
--- a/src/lib/arch/unix/ArchNetworkBSD.cpp
+++ b/src/lib/arch/unix/ArchNetworkBSD.cpp
@@ -2,11 +2,11 @@
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
diff --git a/src/lib/arch/unix/ArchNetworkBSD.h b/src/lib/arch/unix/ArchNetworkBSD.h
index 3f5679a..e3f11d5 100644
--- a/src/lib/arch/unix/ArchNetworkBSD.h
+++ b/src/lib/arch/unix/ArchNetworkBSD.h
@@ -2,11 +2,11 @@
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
diff --git a/src/lib/arch/unix/ArchSleepUnix.cpp b/src/lib/arch/unix/ArchSleepUnix.cpp
index 48e2600..1f91c34 100644
--- a/src/lib/arch/unix/ArchSleepUnix.cpp
+++ b/src/lib/arch/unix/ArchSleepUnix.cpp
@@ -2,11 +2,11 @@
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
diff --git a/src/lib/arch/unix/ArchSleepUnix.h b/src/lib/arch/unix/ArchSleepUnix.h
index 3e307a5..d2cdbca 100644
--- a/src/lib/arch/unix/ArchSleepUnix.h
+++ b/src/lib/arch/unix/ArchSleepUnix.h
@@ -2,11 +2,11 @@
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
diff --git a/src/lib/arch/unix/ArchStringUnix.cpp b/src/lib/arch/unix/ArchStringUnix.cpp
index 591c826..dbb91c1 100644
--- a/src/lib/arch/unix/ArchStringUnix.cpp
+++ b/src/lib/arch/unix/ArchStringUnix.cpp
@@ -2,11 +2,11 @@
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -25,7 +25,6 @@
//
#include "arch/multibyte.h"
-#include "arch/vsnprintf.h"
ArchStringUnix::ArchStringUnix()
{
diff --git a/src/lib/arch/unix/ArchStringUnix.h b/src/lib/arch/unix/ArchStringUnix.h
index f7d0035..551f497 100644
--- a/src/lib/arch/unix/ArchStringUnix.h
+++ b/src/lib/arch/unix/ArchStringUnix.h
@@ -2,11 +2,11 @@
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
diff --git a/src/lib/arch/unix/ArchSystemUnix.cpp b/src/lib/arch/unix/ArchSystemUnix.cpp
index f51e47f..f956998 100644
--- a/src/lib/arch/unix/ArchSystemUnix.cpp
+++ b/src/lib/arch/unix/ArchSystemUnix.cpp
@@ -2,11 +2,11 @@
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
diff --git a/src/lib/arch/unix/ArchSystemUnix.h b/src/lib/arch/unix/ArchSystemUnix.h
index aa9c564..f3c2ad6 100644
--- a/src/lib/arch/unix/ArchSystemUnix.h
+++ b/src/lib/arch/unix/ArchSystemUnix.h
@@ -2,11 +2,11 @@
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2004 Chris Schoeneman
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
diff --git a/src/lib/arch/unix/ArchTaskBarXWindows.cpp b/src/lib/arch/unix/ArchTaskBarXWindows.cpp
index c3577ad..522c7fd 100644
--- a/src/lib/arch/unix/ArchTaskBarXWindows.cpp
+++ b/src/lib/arch/unix/ArchTaskBarXWindows.cpp
@@ -2,11 +2,11 @@
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2003 Chris Schoeneman
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
diff --git a/src/lib/arch/unix/ArchTaskBarXWindows.h b/src/lib/arch/unix/ArchTaskBarXWindows.h
index f2c8977..5b60a08 100644
--- a/src/lib/arch/unix/ArchTaskBarXWindows.h
+++ b/src/lib/arch/unix/ArchTaskBarXWindows.h
@@ -2,11 +2,11 @@
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2003 Chris Schoeneman
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
diff --git a/src/lib/arch/unix/ArchTimeUnix.cpp b/src/lib/arch/unix/ArchTimeUnix.cpp
index 24685aa..665a7eb 100644
--- a/src/lib/arch/unix/ArchTimeUnix.cpp
+++ b/src/lib/arch/unix/ArchTimeUnix.cpp
@@ -2,11 +2,11 @@
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
diff --git a/src/lib/arch/unix/ArchTimeUnix.h b/src/lib/arch/unix/ArchTimeUnix.h
index 3c5c0f8..c6a7dc6 100644
--- a/src/lib/arch/unix/ArchTimeUnix.h
+++ b/src/lib/arch/unix/ArchTimeUnix.h
@@ -2,11 +2,11 @@
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
diff --git a/src/lib/arch/unix/XArchUnix.cpp b/src/lib/arch/unix/XArchUnix.cpp
index fc7ff65..db2006d 100644
--- a/src/lib/arch/unix/XArchUnix.cpp
+++ b/src/lib/arch/unix/XArchUnix.cpp
@@ -2,11 +2,11 @@
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
diff --git a/src/lib/arch/unix/XArchUnix.h b/src/lib/arch/unix/XArchUnix.h
index 93d6d62..be2e689 100644
--- a/src/lib/arch/unix/XArchUnix.h
+++ b/src/lib/arch/unix/XArchUnix.h
@@ -2,11 +2,11 @@
* barrier -- mouse and keyboard sharing utility
* Copyright (C) 2012-2016 Symless Ltd.
* Copyright (C) 2002 Chris Schoeneman
- *
+ *
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
- *
+ *
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the