Compiling fix for scons on windows

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
This commit is contained in:
jacob1 2016-03-12 00:36:11 -05:00
parent 1ef8b0c08b
commit 13d3547211
9 changed files with 21 additions and 22 deletions

View File

@ -174,12 +174,6 @@
#define TPT_INLINE inline #define TPT_INLINE inline
#endif #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 // old Platform.h stuff, maybe we should have a file for these kinds of things
typedef unsigned short Uint16; typedef unsigned short Uint16;

View File

@ -4,8 +4,7 @@
#include <utility> #include <utility>
#include <deque> #include <deque>
#include <string> #include <string>
#include <pthread.h> #include "common/tpt-thread.h"
#undef GetUserName //God dammit microsoft!
#include "Config.h" #include "Config.h"
#include "Singleton.h" #include "Singleton.h"

14
src/common/tpt-thread.h Normal file
View File

@ -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

View File

@ -1,9 +1,6 @@
#include "Graphics.h" #include "Graphics.h"
#include "font.h" #include "font.h"
#include <pthread.h> #include "common/tpt-thread.h"
#ifdef GetUserName
#undef GetUserName //God dammit microsoft!
#endif
#ifdef OGLI #ifdef OGLI
static pthread_mutex_t gMutex = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t gMutex = PTHREAD_MUTEX_INITIALIZER;

View File

@ -3,8 +3,7 @@
#include <vector> #include <vector>
#include <iostream> #include <iostream>
#include <pthread.h> #include "common/tpt-thread.h"
#undef GetUserName //God dammit microsoft!
#include "PreviewView.h" #include "PreviewView.h"
#include "client/SaveInfo.h" #include "client/SaveInfo.h"
#include "gui/preview/Comment.h" #include "gui/preview/Comment.h"

View File

@ -3,8 +3,7 @@
#include <vector> #include <vector>
#include <string> #include <string>
#include <pthread.h> #include "common/tpt-thread.h"
#undef GetUserName //God dammit microsoft!
#include <cmath> #include <cmath>
#include "client/SaveInfo.h" #include "client/SaveInfo.h"
#include "SearchView.h" #include "SearchView.h"

View File

@ -1,7 +1,6 @@
#include <cmath> #include <cmath>
#include <sys/types.h> #include <sys/types.h>
#include <pthread.h> #include "common/tpt-thread.h"
#undef GetUserName //God dammit microsoft!
#include "Config.h" #include "Config.h"
#include "Gravity.h" #include "Gravity.h"
//#include "powder.h" //#include "powder.h"

View File

@ -1,8 +1,7 @@
#ifndef GRAVITY_H #ifndef GRAVITY_H
#define GRAVITY_H #define GRAVITY_H
#include <pthread.h> #include "common/tpt-thread.h"
#undef GetUserName //God dammit microsoft!
#include "Config.h" #include "Config.h"
#include "Simulation.h" #include "Simulation.h"

View File

@ -2,8 +2,7 @@
#define TASK_H_ #define TASK_H_
#include <string> #include <string>
#include <pthread.h> #include "common/tpt-thread.h"s
#undef GetUserName //God dammit microsoft!
#include "TaskListener.h" #include "TaskListener.h"
#include "Config.h" #include "Config.h"