summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/Http.h6
-rw-r--r--includes/SimpleMustache.h2
-rw-r--r--includes/Socket.h2
-rw-r--r--includes/Task.h11
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;