diff --git a/configure.ac b/configure.ac index 9a1e8bb2..9231a177 100644 --- a/configure.ac +++ b/configure.ac @@ -287,6 +287,12 @@ LOL_CHECK_OPENGL LOL_CHECK_SDL +dnl Use mingw threads if necessary +if true; then + LOL_CFLAGS="$LOL_CFLAGS -I\$(top_srcdir)/external/mingw-std-threads-0.0.ac5c9e3b/include/" +fi + + dnl Use pegtl? Yes, always if true; then LOL_CFLAGS="$LOL_CFLAGS -I\$(top_srcdir)/external/pegtl-0.32/include" diff --git a/src/base/log.cpp b/src/base/log.cpp index 8222099d..b61f2d5f 100644 --- a/src/base/log.cpp +++ b/src/base/log.cpp @@ -1,12 +1,13 @@ // // Lol Engine // -// Copyright: © 2010—2015 Sam Hocevar +// Copyright © 2010—2015 Sam Hocevar // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the Do What The Fuck You Want To -// Public License, Version 2, as published by Sam Hocevar. See -// http://www.wtfpl.net/ for more details. +// This library is free software. It comes without any warranty, to +// the extent permitted by applicable law. You can redistribute it +// and/or modify it under the terms of the Do What the Fuck You Want +// to Public License, Version 2, as published by the WTFPL Task Force. +// See http://www.wtfpl.net/ for more details. // #include @@ -95,7 +96,7 @@ void msg::helper(MessageType type, char const *fmt, va_list ap) String buf = String(prefix[(int)type]) + ": " + String::vformat(fmt, ap); array widechar; - widechar.Resize(buf.count() + 1); + widechar.resize(buf.count() + 1); MultiByteToWideChar(CP_UTF8, 0, buf.C(), buf.count() + 1, widechar.data(), widechar.count()); OutputDebugStringW(widechar.data()); # else diff --git a/src/gpu/shader.cpp b/src/gpu/shader.cpp index 2f996849..b57adbf9 100644 --- a/src/gpu/shader.cpp +++ b/src/gpu/shader.cpp @@ -174,7 +174,7 @@ private: // code_section < code_line{&(title / eof)} struct code_section - : ifapply>, code_line>, do_code> {}; + : ifapply>, code_line>, do_code> {}; // shader < title code_section struct shader diff --git a/src/lol/base/all.h b/src/lol/base/all.h index f33f7bb5..6ac38670 100644 --- a/src/lol/base/all.h +++ b/src/lol/base/all.h @@ -1,22 +1,24 @@ // -// Lol Engine +// Lol Engine // -// Copyright: (c) 2010-2013 Sam Hocevar -// This program is free software; you can redistribute it and/or -// modify it under the terms of the Do What The Fuck You Want To -// Public License, Version 2, as published by Sam Hocevar. See -// http://www.wtfpl.net/ for more details. +// Copyright © 2010—2013 Sam Hocevar +// +// This library is free software. It comes without any warranty, to +// the extent permitted by applicable law. You can redistribute it +// and/or modify it under the terms of the Do What the Fuck You Want +// to Public License, Version 2, as published by the WTFPL Task Force. +// See http://www.wtfpl.net/ for more details. // #pragma once -#include #include #include #include #include #include #include +#include #include #include #include diff --git a/src/sys/threadbase.h b/src/sys/threadbase.h index b232aa61..6307184a 100644 --- a/src/sys/threadbase.h +++ b/src/sys/threadbase.h @@ -39,6 +39,15 @@ # undef far /* Fuck Microsoft again */ #endif +/* XXX: workaround for missing std::thread in mingw */ +#if _GLIBCXX_MUTEX && !_GLIBCXX_HAS_GTHREADS && _WIN32 +# include "mingw.thread.h" +# include "mingw.mutex.h" +# include "mingw.condition_variable.h" +# undef near /* Fuck Microsoft */ +# undef far /* Fuck Microsoft again */ +#endif + namespace lol { diff --git a/tools/lolremez/expression.h b/tools/lolremez/expression.h index 1f36142e..5198880a 100644 --- a/tools/lolremez/expression.h +++ b/tools/lolremez/expression.h @@ -1,5 +1,5 @@ // -// LolRemez - Remez algorithm implementation +// LolRemez — Remez algorithm implementation // // Copyright © 2005—2015 Sam Hocevar // @@ -291,7 +291,7 @@ private: star>> {}; // r_stmt <- r_expr - struct r_stmt : seq<_, r_expr, _, eof> {}; + struct r_stmt : seq<_, r_expr, _, pegtl::eof> {}; }; } /* namespace grammar */