Fixed Mac and Win support. I hate you, Mac and Win.
This commit is contained in:
parent
983c03661d
commit
2b7b7e85ac
1 changed files with 5 additions and 5 deletions
|
@ -27,7 +27,7 @@ namespace Buffer {
|
|||
///\brief A function running in a thread to send all statistics.
|
||||
///\param empty A null pointer.
|
||||
void handleStats(void * empty){
|
||||
#ifdef _TTHREAD_POSIX_
|
||||
#if defined(_TTHREAD_POSIX_) && !(defined(__FreeBSD__) || defined(__APPLE__) || defined(__MACH__) || defined(_WIN32) || defined(__CYGWIN__))
|
||||
pthread_setname_np(pthread_self(), "StatsHandler");
|
||||
#endif
|
||||
if (empty != 0){
|
||||
|
@ -55,7 +55,7 @@ namespace Buffer {
|
|||
///\brief A function to handle input data.
|
||||
///\param conn A socket reference.
|
||||
void handlePushIn(Socket::Connection & conn){
|
||||
#ifdef _TTHREAD_POSIX_
|
||||
#if defined(_TTHREAD_POSIX_) && !(defined(__FreeBSD__) || defined(__APPLE__) || defined(__MACH__) || defined(_WIN32) || defined(__CYGWIN__))
|
||||
pthread_setname_np(pthread_self(), "Push Input");
|
||||
#endif
|
||||
conn.setBlocking(true);
|
||||
|
@ -80,7 +80,7 @@ namespace Buffer {
|
|||
if (empty != 0){
|
||||
return;
|
||||
}
|
||||
#ifdef _TTHREAD_POSIX_
|
||||
#if defined(_TTHREAD_POSIX_) && !(defined(__FreeBSD__) || defined(__APPLE__) || defined(__MACH__) || defined(_WIN32) || defined(__CYGWIN__))
|
||||
pthread_setname_np(pthread_self(), "Standard Input");
|
||||
#endif
|
||||
long long int timeDiff = 0; //difference between local time and stream time
|
||||
|
@ -120,7 +120,7 @@ namespace Buffer {
|
|||
#if DEBUG >= 5
|
||||
std::cerr << "Thread launched for user " << usr->sID << ", socket number " << usr->S.getSocket() << std::endl;
|
||||
#endif
|
||||
#ifdef _TTHREAD_POSIX_
|
||||
#if defined(_TTHREAD_POSIX_) && !(defined(__FreeBSD__) || defined(__APPLE__) || defined(__MACH__) || defined(_WIN32) || defined(__CYGWIN__))
|
||||
pthread_setname_np(pthread_self(), usr->sID.c_str());
|
||||
#endif
|
||||
usr->myRing = thisStream->getRing();
|
||||
|
@ -289,7 +289,7 @@ namespace Buffer {
|
|||
}
|
||||
SS.setBlocking(false);
|
||||
conf.activate();
|
||||
#ifdef _TTHREAD_POSIX_
|
||||
#if defined(_TTHREAD_POSIX_) && !(defined(__FreeBSD__) || defined(__APPLE__) || defined(__MACH__) || defined(_WIN32) || defined(__CYGWIN__))
|
||||
pthread_setname_np(pthread_self(), "Main accepter");
|
||||
#endif
|
||||
thisStream = Stream::get();
|
||||
|
|
Loading…
Add table
Reference in a new issue