Skip to content

Commit

Permalink
Compiling fix for scons on windows
Browse files Browse the repository at this point in the history
something is up with the pthreads library (dynamic compiles still broken), probably windows libraries all need to be recompiled and distributed separately like I did for visual studio
  • Loading branch information
jacob1 committed Mar 12, 2016
1 parent 1ef8b0c commit 13d3547
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 22 deletions.
6 changes: 0 additions & 6 deletions src/Config.h
Expand Up @@ -174,12 +174,6 @@
#define TPT_INLINE inline
#endif

#if defined(WIN) && defined(__GNUC__)
#define TH_ENTRY_POINT __attribute__((force_align_arg_pointer))
#else
#define TH_ENTRY_POINT
#endif

// old Platform.h stuff, maybe we should have a file for these kinds of things
typedef unsigned short Uint16;

Expand Down
3 changes: 1 addition & 2 deletions src/client/requestbroker/RequestBroker.h
Expand Up @@ -4,8 +4,7 @@
#include <utility>
#include <deque>
#include <string>
#include <pthread.h>
#undef GetUserName //God dammit microsoft!
#include "common/tpt-thread.h"

#include "Config.h"
#include "Singleton.h"
Expand Down
14 changes: 14 additions & 0 deletions src/common/tpt-thread.h
@@ -0,0 +1,14 @@
#ifndef TPT_THREAD_H
#define TPT_THREAD_H

#if defined(WIN) && defined(__GNUC__)
#define TH_ENTRY_POINT __attribute__((force_align_arg_pointer))
#define _TIMESPEC_DEFINED
#else
#define TH_ENTRY_POINT
#endif

#include <pthread.h>
#undef GetUserName

#endif
5 changes: 1 addition & 4 deletions src/graphics/OpenGLGraphics.cpp
@@ -1,9 +1,6 @@
#include "Graphics.h"
#include "font.h"
#include <pthread.h>
#ifdef GetUserName
#undef GetUserName //God dammit microsoft!
#endif
#include "common/tpt-thread.h"
#ifdef OGLI

static pthread_mutex_t gMutex = PTHREAD_MUTEX_INITIALIZER;
Expand Down
3 changes: 1 addition & 2 deletions src/gui/preview/PreviewModel.h
Expand Up @@ -3,8 +3,7 @@

#include <vector>
#include <iostream>
#include <pthread.h>
#undef GetUserName //God dammit microsoft!
#include "common/tpt-thread.h"
#include "PreviewView.h"
#include "client/SaveInfo.h"
#include "gui/preview/Comment.h"
Expand Down
3 changes: 1 addition & 2 deletions src/gui/search/SearchModel.h
Expand Up @@ -3,8 +3,7 @@

#include <vector>
#include <string>
#include <pthread.h>
#undef GetUserName //God dammit microsoft!
#include "common/tpt-thread.h"
#include <cmath>
#include "client/SaveInfo.h"
#include "SearchView.h"
Expand Down
3 changes: 1 addition & 2 deletions src/simulation/Gravity.cpp
@@ -1,7 +1,6 @@
#include <cmath>
#include <sys/types.h>
#include <pthread.h>
#undef GetUserName //God dammit microsoft!
#include "common/tpt-thread.h"
#include "Config.h"
#include "Gravity.h"
//#include "powder.h"
Expand Down
3 changes: 1 addition & 2 deletions src/simulation/Gravity.h
@@ -1,8 +1,7 @@
#ifndef GRAVITY_H
#define GRAVITY_H

#include <pthread.h>
#undef GetUserName //God dammit microsoft!
#include "common/tpt-thread.h"
#include "Config.h"
#include "Simulation.h"

Expand Down
3 changes: 1 addition & 2 deletions src/tasks/Task.h
Expand Up @@ -2,8 +2,7 @@
#define TASK_H_

#include <string>
#include <pthread.h>
#undef GetUserName //God dammit microsoft!
#include "common/tpt-thread.h"s
#include "TaskListener.h"
#include "Config.h"

Expand Down

0 comments on commit 13d3547

Please sign in to comment.