From 3a91332a70abfc777a352c46727f54426c982371 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 20 Dec 2013 01:34:09 -0800 Subject: A few more Win32 / VisualStudio fixes. --- includes/Http.h | 6 ++++++ includes/SimpleMustache.h | 2 -- includes/Socket.h | 2 ++ includes/Task.h | 11 ++--------- 4 files changed, 10 insertions(+), 11 deletions(-) (limited to 'includes') 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 #include +#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 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 +#endif #include #include #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 #include -#ifdef _MSC_VER -#include // 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; -- cgit v1.2.3