typo fix
parent
5b0c09dbd0
commit
9f7363adab
src/libcore
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue