diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2013-12-20 01:34:09 -0800 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2013-12-20 01:34:09 -0800 |
commit | 3a91332a70abfc777a352c46727f54426c982371 (patch) | |
tree | e2ea6da7b045af8daf749c957b70bdf721864a1e /includes | |
parent | 28e250cda01038c91fb9b69206c6f61f24764469 (diff) |
A few more Win32 / VisualStudio fixes.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/Http.h | 6 | ||||
-rw-r--r-- | includes/SimpleMustache.h | 2 | ||||
-rw-r--r-- | includes/Socket.h | 2 | ||||
-rw-r--r-- | includes/Task.h | 11 |
4 files changed, 10 insertions, 11 deletions
diff --git a/includes/Http.h b/includes/Http.h index 62f8786..7c351a6 100644 --- a/includes/Http.h +++ b/includes/Http.h @@ -4,6 +4,12 @@ #include <BString.h> #include <Handle.h> +#ifdef _MSC_VER +// SERIOUSLY ?! +#undef DELETE +#undef ERROR +#endif + namespace Balau { namespace Http { diff --git a/includes/SimpleMustache.h b/includes/SimpleMustache.h index b01955b..f30c831 100644 --- a/includes/SimpleMustache.h +++ b/includes/SimpleMustache.h @@ -57,8 +57,6 @@ class SimpleMustache { LAMBDA, } m_type = CONTEXTLIST; Context(ContextType type) : m_type(type), m_root(false) { } - Context(Context & c) { Failure("You can't copy a Context; use references"); } - Context & operator=(Context & c) { Failure("You can't assign a Context; use references"); return *this; } String m_str; bool m_bool; typedef std::map<String, Context *> SubContext; diff --git a/includes/Socket.h b/includes/Socket.h index cfa8218..22bf972 100644 --- a/includes/Socket.h +++ b/includes/Socket.h @@ -1,7 +1,9 @@ #pragma once #ifdef _WIN32 +#ifndef _MSC_VER #include <windows.h> +#endif #include <winsock2.h> #include <ws2tcpip.h> #else diff --git a/includes/Task.h b/includes/Task.h index 3d206ff..1041d08 100644 --- a/includes/Task.h +++ b/includes/Task.h @@ -10,10 +10,6 @@ #include <Exceptions.h> #include <Printer.h> -#ifdef _MSC_VER -#include <Windows.h> // for CALLBACK -#endif - namespace Balau { namespace Events { class BaseEvent; }; @@ -119,10 +115,6 @@ class Async : public BaseEvent { ev::async m_evt; }; -#ifndef _WIN32 -#define CALLBACK -#endif - class Custom : public BaseEvent { public: void doSignal() { BaseEvent::doSignal(); ev_break(m_loop, EVBREAK_ALL); } @@ -180,6 +172,7 @@ class Task { private: bool m_oldStatus; }; + static void registerTrampoline(); protected: void yield() throw (GeneralException) { if (yield(false)) { @@ -223,7 +216,7 @@ class Task { void setup(TaskMan * taskMan, void * stack); static bool needsStacks(); void switchTo(); - static void CALLBACK coroutineTrampoline(void *); + static void coroutineTrampoline(void *); void coroutine(); bool enterSimpleContext() { bool r; |