mirror of
https://github.com/darlinghq/darling.git
synced 2024-11-23 04:09:43 +00:00
Regression fixes and misc stuff
This commit is contained in:
parent
b47e14716b
commit
9735c8a7a7
@ -13,6 +13,7 @@
|
||||
/usr/lib/libiconv.2.dylib=libc.so.6
|
||||
/usr/lib/libauto.dylib=libauto.so
|
||||
/usr/lib/libsqlite3.dylib=libsqlite3.so
|
||||
/usr/lib/libsqlite3.0.dylib=libsqlite3.so.0
|
||||
/usr/lib/libncurses.5.4.dylib=libncursesdarwin.so
|
||||
/usr/lib/libltdl.7.dylib=libltdl.so
|
||||
/usr/lib/libmx.A.dylib=libc.so.6
|
||||
|
@ -55,6 +55,7 @@ set(libc_SRCS
|
||||
libc/dir.cpp
|
||||
libc/string.cpp
|
||||
libc/exec.cpp
|
||||
libc/uname.cpp
|
||||
libc/stdio.cpp
|
||||
libc/fopsmisc.cpp
|
||||
libc/aio.cpp
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "config,h"
|
||||
#include "../../config.h"
|
||||
#include "uname.h"
|
||||
#include "errno.h"
|
||||
#include <errno.h>
|
||||
@ -35,7 +35,7 @@ int __darwin_uname(__darwin_utsname* buf)
|
||||
strcpy(buf->release, nbuf.release);
|
||||
strcpy(buf->version, nbuf.version);
|
||||
#else
|
||||
static IniConfig iniConfig(ETC_DARWIN_PATH "/version.conf");
|
||||
static IniConfig iniConfig(ETC_DARLING_PATH "/version.conf", true);
|
||||
const char *sysname = nullptr, *release = nullptr, *version = nullptr;
|
||||
|
||||
if (iniConfig.hasSection("uname"))
|
||||
|
@ -149,11 +149,11 @@ void* __darwin_dlsym(void* handle, const char* symbol)
|
||||
|
||||
LOG << "__darwin_dlsym(): " << symbol << std::endl;
|
||||
|
||||
translated = processSymbolViaHooks(name);
|
||||
|
||||
removeSuffix(name, "$UNIX2003");
|
||||
removeSuffix(name, "$DARWIN_EXTSN");
|
||||
removeSuffix(name, "$NOCANCEL");
|
||||
|
||||
translated = processSymbolViaHooks(name);
|
||||
|
||||
if (handle == DARWIN_RTLD_DEFAULT)
|
||||
{
|
||||
|
@ -5,13 +5,16 @@
|
||||
#include <ctype.h>
|
||||
#include <iostream>
|
||||
|
||||
IniConfig::IniConfig(const char* path)
|
||||
IniConfig::IniConfig(const char* path, bool silentFail)
|
||||
{
|
||||
std::ifstream file(path);
|
||||
if (!file.is_open())
|
||||
throw std::runtime_error("Specified config file not found!");
|
||||
|
||||
loadConfig(file);
|
||||
{
|
||||
if (!silentFail)
|
||||
throw std::runtime_error("Specified config file not found!");
|
||||
}
|
||||
else
|
||||
loadConfig(file);
|
||||
}
|
||||
|
||||
IniConfig::~IniConfig()
|
||||
|
@ -8,7 +8,7 @@
|
||||
class IniConfig
|
||||
{
|
||||
public:
|
||||
IniConfig(const char* path);
|
||||
IniConfig(const char* path, bool silentFail = false);
|
||||
~IniConfig();
|
||||
|
||||
typedef std::map<std::string, std::string> ValueMap;
|
||||
|
Loading…
Reference in New Issue
Block a user