diff --git a/src/libcore/mmap.cpp b/src/libcore/mmap.cpp index c00586c4..77a3bf54 100644 --- a/src/libcore/mmap.cpp +++ b/src/libcore/mmap.cpp @@ -38,7 +38,7 @@ struct MemoryMappedFile::MemoryMappedFilePrivate { Log(EError, "Could not map \"%s\" to memory!", filename.string().c_str()); if (close(fd) != 0) Log(EError, "close(): unable to close file!"); - #elif defined(___WINDOWS__) + #elif defined(__WINDOWS__) file = CreateFile(filename.string().c_str(), GENERIC_WRITE | GENERIC_READ, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (file == INVALID_HANDLE_VALUE) diff --git a/src/libcore/plugin.cpp b/src/libcore/plugin.cpp index 25116f25..27290040 100644 --- a/src/libcore/plugin.cpp +++ b/src/libcore/plugin.cpp @@ -61,7 +61,7 @@ struct Plugin::PluginPrivate { Plugin::Plugin(const std::string &shortName, const fs::path &path) : d(new PluginPrivate(shortName, path)) { -#if defined(___WINDOWS__) +#if defined(__WINDOWS__) d->handle = LoadLibraryW(path.c_str()); if (!d->handle) { SLog(EError, "Error while loading plugin \"%s\": %s", @@ -77,7 +77,7 @@ Plugin::Plugin(const std::string &shortName, const fs::path &path) try { d->getDescription = (GetDescriptionFunc) getSymbol("GetDescription"); } catch (...) { -#if defined(___WINDOWS__) +#if defined(__WINDOWS__) FreeLibrary(d->handle); #else dlclose(d->handle); @@ -102,7 +102,7 @@ Plugin::Plugin(const std::string &shortName, const fs::path &path) } bool Plugin::hasSymbol(const std::string &sym) const { -#if defined(___WINDOWS__) +#if defined(__WINDOWS__) void *ptr = GetProcAddress(d->handle, sym.c_str()); #else void *ptr = dlsym(d->handle, sym.c_str()); @@ -111,7 +111,7 @@ bool Plugin::hasSymbol(const std::string &sym) const { } void *Plugin::getSymbol(const std::string &sym) { -#if defined(___WINDOWS__) +#if defined(__WINDOWS__) void *data = GetProcAddress(d->handle, sym.c_str()); if (!data) { SLog(EError, "Could not resolve symbol \"%s\" in \"%s\": %s", @@ -152,7 +152,7 @@ const std::string& Plugin::getShortName() const { } Plugin::~Plugin() { -#if defined(___WINDOWS__) +#if defined(__WINDOWS__) FreeLibrary(d->handle); #else dlclose(d->handle); diff --git a/src/libcore/random.cpp b/src/libcore/random.cpp index 9f1d8a0f..aea66a53 100644 --- a/src/libcore/random.cpp +++ b/src/libcore/random.cpp @@ -473,7 +473,7 @@ void Random::State::init_by_array(const uint32_t *init_key, int key_length) { Random::Random() : mt(NULL) { mt = (State *) allocAligned(sizeof(State)); Assert(mt != NULL); -#if defined(___WINDOWS__) +#if defined(__WINDOWS__) seed(); #else #if 0