-
Notifications
You must be signed in to change notification settings - Fork 146
[CORE][CMAKE] Fix Linux compilation of WWLib #698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,7 +53,7 @@ | |
| #include "bittype.h" | ||
| #include "wwdebug.h" | ||
| #include "mutex.h" | ||
| #include <new.h> | ||
| #include <new> | ||
| #include <stdlib.h> | ||
| #include <stddef.h> | ||
|
|
||
|
|
@@ -157,8 +157,14 @@ class AutoPoolClass | |
| ** Macro to declare the allocator for your class. Put this in the cpp file for | ||
| ** the class. | ||
| */ | ||
| #if defined(_MSC_VER) && _MSC_VER < 1300 | ||
| #define DEFINE_AUTO_POOL(T,BLOCKSIZE) \ | ||
| ObjectPoolClass<T,BLOCKSIZE> AutoPoolClass<T,BLOCKSIZE>::Allocator; | ||
| #else | ||
| #define DEFINE_AUTO_POOL(T,BLOCKSIZE) \ | ||
| template<>\ | ||
| ObjectPoolClass<T,BLOCKSIZE> AutoPoolClass<T,BLOCKSIZE>::Allocator = {} | ||
|
||
| #endif | ||
|
|
||
|
|
||
| /*********************************************************************************************** | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,11 +38,25 @@ | |
| #ifndef _SYSTIMER_H | ||
|
|
||
| #include "always.h" | ||
| #ifdef _WIN32 | ||
|
||
| #include <windows.h> | ||
| #include "mmsys.h" | ||
|
|
||
| #define TIMEGETTIME SystemTime.Get | ||
| #define MS_TIMER_SECOND 1000 | ||
| #else | ||
| #include <sys/time.h> | ||
|
|
||
| inline unsigned long systimerGetMS(void) | ||
| { | ||
| struct timeval tv; | ||
| gettimeofday(&tv, NULL); | ||
| return (tv.tv_sec * 1000) + (tv.tv_usec / 1000); | ||
| } | ||
|
|
||
| #define TIMEGETTIME systimerGetMS | ||
| #define MS_TIMER_SECOND 1000 | ||
| #endif | ||
|
|
||
| /* | ||
| ** Class that just wraps around timeGetTime() | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.